Obtaining Required Information¶
Obtain the required information before calling APIs.
Required Information¶
Item |
Parameter |
Description |
---|---|---|
Service name |
serviceName |
Service name, for example, iam, vpc, and ecs. |
Region/Endpoint |
|
Region and endpoint. |
Project ID |
project_id |
Project ID, which is configured in the URI in most cases. For details about how to obtain the value of this parameter, see Obtaining a Project ID. |
username/password |
username/password |
Username and password, which are used to obtain a token in token authentication mode. |
AK/SK |
ak/sk |
AK/SK pair. It is used in AK/SK authentication mode. For details about how to obtain the value of this parameter, see Generating an AK and SK. |
uri |
uri |
Request path and parameters. Obtain the URI according to the API reference guide of each service. |
Domain Name |
|
Account name, which is used to obtain a token in token authentication mode. For details about how to obtain the value of this parameter, see Obtaining the Domain Name and Domain ID. |
Domain ID |
X-Domain-Id |
Account ID, which is used to:
For details about how to obtain the value of this parameter, see Obtaining the Domain Name and Domain ID. |
Sub-project ID |
X-Project-Id |
Sub-project ID, which is used in multi-project scenarios. For details about how to obtain the value of this parameter, see Obtaining a Project ID. |
Obtaining a Project ID¶
A project ID needs to be specified in the URIs of some APIs. Therefore, you need to obtain the project ID before calling APIs. The following procedure describes how to obtain a project ID:
Log in to the management console.
Click the username and choose My Credential from the drop-down list.
On the My Credential page, view project IDs in the project list.
In multi-project scenarios, expand the region, and obtain your sub-project ID from the Project ID column.
Obtaining the Domain Name and Domain ID¶
When you call APIs, your domain name and domain ID are required in some URLs. Obtain your domain name and domain ID on the console by performing the following steps:
Log in to the management console.
Click the username and choose My Credential from the drop-down list.
On the My Credential page, view the domain name and domain ID.