When you call the console OpenAPI interface, it is done by sending a request to the specified service endpoint, and it requires an appropriate signature along with the specific interface's business information. An OpenAPI request needs to include the service endpoint, request method, request parameters, and other information.
Taking the creating space API as an example, a sample request with an unencoded URL is as follows:
- POST is the request method supported by the console OpenAPI. The supported Content-Type is application/json.
- Host specifies the service access endpoint. The service endpoints for the server-side (apmplus_server) and client-side (apmplus_openapi) vary across different regions. For details, see Service addresses.
- Action={Action name} specifies the API to be called.
- Version={Registered version} specifies the version of the API to be called. For details, see Public parameters.
- AccessKey and SecretKey are used to verify signature information. For details, see Signature mechanism.
- Data specifies the request parameters of the API.
Communication protocols
Both HTTP and HTTPS are supported for sending requests. We recommend using HTTPS, the more secure method for sending API requests.
Request methods
The request method depends on the specific requirements of each API. Select either GET or POST to initiate the request.
warning
When using the POST method, the public parameters Action and Version must be placed in the Query String.
Request parameters
When initiating an OpenAPI request, the request body may contain two types of parameters: public request parameters and API-specific request parameters.
- Public request parameters are required for every API. For details, see Public parameters.
- API-specific request parameters are unique to each API. For details, see the description of each API.
Character encoding
Both requests and responses are encoded using the UTF-8 character set.