To send an EventBridge API request, you must send an HTTP request to the EventBridge endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API, the system returns a response. All requests and responses are encoded in UTF-8.
Endpoints
The endpoint of the EventBridge API is {accountId}.eventbridge.{regionId}.aliyuncs.com.
Protocols
You can send requests over HTTP or HTTPS. We recommend that you send requests over HTTPS to enhance security.
Request syntax
EventBridge provides a RESTful API. When you send an HTTP request, use the following syntax:
HTTPMethod /resource_URI_parameters
RequestHeader
RequestBody
- HTTPMethod: the method of the HTTP request, such as PUT, POST, GET, and DELETE.
- resource_URI_parameters: the identifier of the resource that you want to access, such as
/cluster
. - RequestHeader: the request header. It contains information such as the API version, hostname, and
authentication information. For more information, see Common request and response parameters.
Request parameters include both common parameters and operation-specific parameters. The common request header contains information such as the API version and authentication information.
- RequestBody: the request parameters.
Example
POST /openapi/createEventBus HTTP/1.1
Host: 123456789098****.eventbridge.cn-hangzhou.aliyuncs.com
Date: Sat, 18 Apr 2020 05:30:41 GMT
x-eventbridge-version: 2020-04-01
Authorization: acs vZ3VL0SuJdHi****:Jo2PbTj*******YAYoYslKLvWzg=
Content-Type: application/json;charset=UTF-8
Content-Length: 26
{
"EventBusName":"MyEventBus"
}
Encoding
All requests and responses are encoded in UTF-8.