summary
diff --git a/docs/css/api-ref/css_03_0137.html b/docs/css/api-ref/css_03_0137.html
new file mode 100644
index 00000000..3c02759c
--- /dev/null
+++ b/docs/css/api-ref/css_03_0137.html
@@ -0,0 +1,15 @@
+
+
+Calling APIs
+
+
+
diff --git a/docs/css/api-ref/iam_02_0008.html b/docs/css/api-ref/css_03_0138.html
similarity index 54%
rename from docs/css/api-ref/iam_02_0008.html
rename to docs/css/api-ref/css_03_0138.html
index 42918f0a..fcda3965 100644
--- a/docs/css/api-ref/iam_02_0008.html
+++ b/docs/css/api-ref/css_03_0138.html
@@ -1,97 +1,97 @@
-
+
Making an API Request
-This section describes the structure of a RESTful API request, and uses the API for Obtaining a User Token as an example to describe how to call an API. A token is a user's access credential, which contains the user identity and permission information. The obtained token is used to authenticate the calling of other APIs.
- Request URIA request URI is in the following format:
- {URI-scheme}://{Endpoint}/{resource-path}?{query-string}
+ This section describes the structure of a RESTful API request, and uses the API for Obtaining a User Token as an example to describe how to call an API. A token is a user's access credential, which contains the user identity and permission information. The obtained token is used to authenticate the calling of other APIs.
+ Request URIA request URI is in the following format:
+ {URI-scheme}://{Endpoint}/{resource-path}?{query-string}
- Table 1 Request URLParameter
+Table 1 Request URLParameter
|
-Description
+ | Description
|
-URI-scheme
+ | URI-scheme
|
-Protocol used to transmit requests. All APIs use HTTPS.
+ | Protocol used to transmit requests. All APIs use HTTPS.
|
-Endpoint
+ | Endpoint
|
-Domain name or IP address of the server running the REST service. The endpoint varies between services in different regions. It can be obtained from Endpoints.
+ | Domain name or IP address of the server running the REST service. The endpoint varies between services in different regions. It can be obtained from Endpoints.
|
-resource-path
+ | resource-path
|
-API access path for performing a specified operation. Obtain the value from the URI of the API. For example, the resource-path of the API for obtaining a user token is /v3/auth/tokens.
+ | API access path for performing a specified operation. Obtain the value from the URI of the API. For example, the resource-path of the API for obtaining a user token is /v3/auth/tokens.
|
-query-string
+ | query-string
|
-Query parameter, which is optional. Ensure that a question mark (?) is included before a query parameter that is in the format of "Parameter name=Parameter value". For example, limit=10 indicates that a maximum of 10 pieces of data is to be viewed.
+ | Query parameter, which is optional. Ensure that a question mark (?) is included before a query parameter that is in the format of "Parameter name=Parameter value". For example, limit=10 indicates that a maximum of 10 pieces of data is to be viewed.
|
-
-For example, to obtain an IAM token in a region, obtain the endpoint of IAM for this region and the resource-path ( /v3/auth/tokens) in the URI of the API used to obtain a user token. Then, construct the URI as follows: https://<iam-endpoint>/v3/auth/tokens
+
+ For example, to obtain an IAM token in a region, obtain the endpoint of IAM for this region and the resource-path ( /v3/auth/tokens) in the URI of the API used to obtain a user token. Then, construct the URI as follows: https://<iam-endpoint>/v3/auth/tokens
- To simplify the URI display, each API is provided with only a resource-path and a request method. This is because the URI-scheme value of all APIs is HTTPS, and the endpoints in a region are the same. Therefore, the two parts are omitted.
+ To simplify the URI display, each API is provided with only a resource-path and a request method. This is because the URI-scheme value of all APIs is HTTPS, and the endpoints in a region are the same. Therefore, the two parts are omitted.
- Request MethodsHTTP-based request methods, which are also called operations or actions, specify the type of operations that you are requesting.
- - GET: requests the server to return specified resources.
- PUT: requests the server to update specified resources.
- POST: requests the server to add resources or perform special operations.
- DELETE: requests the server to delete specified resources, for example, an object.
- HEAD: requests a server resource header.
- PATCH: requests the server to update partial content of a specified resource. If the target resource does not exist, PATCH may create a resource.
- If POST is displayed in the URI of the API for obtaining a user token, the request is as follows:
-
-POST https://{iam-endpoint}/v3/auth/tokens
+ Request MethodsHTTP-based request methods, which are also called operations or actions, specify the type of operations that you are requesting.
+ - GET: requests the server to return specified resources.
- PUT: requests the server to update specified resources.
- POST: requests the server to add resources or perform special operations.
- DELETE: requests the server to delete specified resources, for example, an object.
- HEAD: requests a server resource header.
- PATCH: requests the server to update partial content of a specified resource. If the target resource does not exist, PATCH may create a resource.
+ If POST is displayed in the URI of the API for obtaining a user token, the request is as follows:
+
+POST https://{iam-endpoint}/v3/auth/tokens
- Request HeaderYou can also add additional fields to a request, such as the fields required by a specified URI or an HTTP method. For example, to request for the authentication information, add Content-Type, which specifies the request body type.
- Table 2 lists common request header fields.
+ Request HeaderYou can also add additional fields to a request, such as the fields required by a specified URI or an HTTP method. For example, to request for the authentication information, add Content-Type, which specifies the request body type.
+ Table 2 lists common request header fields.
- Table 2 Common request headersParameter
+Table 2 Common request headersParameter
|
-Mandatory
+ | Mandatory
|
-Description
+ | Description
|
-Content-Type
+ | Content-Type
|
-Yes
+ | Yes
|
-Message body type (or format). You are advised to use the default value application/json.
+ | Message body type (or format). You are advised to use the default value application/json.
|
-X-Auth-Token
+ | X-Auth-Token
|
-No (Mandatory for token-based authentication)
+ | No (Mandatory for token-based authentication)
|
-User token.
-Response for calling the "Obtaining a User Token" API. This API is the only one that does not require authentication. After the request is processed, the value of X-Subject-Token in the response header (Header) is the token value.
+ | User token.
+Response for calling the "Obtaining a User Token" API. This API is the only one that does not require authentication. After the request is processed, the value of X-Subject-Token in the response header (Header) is the token value.
|
-X-Language
+ | X-Language
|
-No
+ | No
|
-Request language
+ | Request language
|
-The API used to obtain a user token does not require authentication. Therefore, only the Content-Type field needs to be added to requests for calling the API. An example of such requests is as follows:
-POST https://{iam-endpoint}/v3/auth/tokens
+The API used to obtain a user token does not require authentication. Therefore, only the Content-Type field needs to be added to requests for calling the API. An example of such requests is as follows:
+POST https://{iam-endpoint}/v3/auth/tokens
Content-Type: application/json
-Request BodyA request body conveys information other than the request header and is generally sent in a structured format defined by the request header field Content-Type.
- The request body varies according to the APIs. Certain APIs do not require the request body, such as the GET and DELETE APIs.
- In the case of the API used to obtain a user token, the request parameters and parameter description can be obtained from the API request. The following provides an example request with a body included. Replace username, domainname, ******** (login password), and xxxxxxxxxxxxxxxxxx (project ID) with the actual values. To learn how to obtain a project ID, see Obtaining a Project ID and Name.
- The scope parameter defines the application scope of the token, indicating that the obtained token can access only the resources in the specified project.
+ Request BodyA request body conveys information other than the request header and is generally sent in a structured format defined by the request header field Content-Type.
+ The request body varies according to the APIs. Certain APIs do not require the request body, such as the GET and DELETE APIs.
+ In the case of the API used to obtain a user token, the request parameters and parameter description can be obtained from the API request. The following provides an example request with a body included. Replace username, domainname, ******** (login password), and xxxxxxxxxxxxxxxxxx (project ID) with the actual values. To learn how to obtain a project ID, see Obtaining a Project ID and Name.
+ The scope parameter defines the application scope of the token, indicating that the obtained token can access only the resources in the specified project.
- POST https://{iam-endpoint}/v3/auth/tokens
+POST https://{iam-endpoint}/v3/auth/tokens
Content-Type: application/json
{
"auth": {
@@ -101,27 +101,27 @@ Content-Type: application/json
],
"password": {
"user": {
- "name": "username", //Username
- "password": "********", //Login password
+ "name": "username", //Username
+ "password": "********", //Login password
"domain": {
- "name": "domainname " //Name of the account to which the user belongs
+ "name": "domainname " //Name of the account to which the user belongs
}
}
}
},
"scope": {
"project": {
- "id": "xxxxxxxxxxxxxxxxxx" //Project ID
+ "id": "xxxxxxxxxxxxxxxxxx" //Project ID
}
}
}
}
-If all data required by a request is available, you can send the request to call an API through curl, Postman, or coding. For the API of obtaining a user token, x-subject-token in the response header is the desired user token. Then, you can use the token to authenticate the calling of other APIs.
+If all data required by a request is available, you can send the request to call an API through curl, Postman, or coding. For the API of obtaining a user token, x-subject-token in the response header is the desired user token. Then, you can use the token to authenticate the calling of other APIs.
diff --git a/docs/css/api-ref/iam_02_0510.html b/docs/css/api-ref/css_03_0139.html
similarity index 63%
rename from docs/css/api-ref/iam_02_0510.html
rename to docs/css/api-ref/css_03_0139.html
index d0ba91b4..0b573091 100644
--- a/docs/css/api-ref/iam_02_0510.html
+++ b/docs/css/api-ref/css_03_0139.html
@@ -1,12 +1,12 @@
-
+
Authentication
- CSS supports token authentication.
- Authentication Using Tokens The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API.
+ CSS supports token authentication.
+ Authentication Using Tokens The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API.
- A token specifies certain permissions in a computer system. Authentication using a token adds the token to a request as its header during API calling to obtain permissions to operate APIs through IAM.
- The API for obtaining a token is POST https://{IAM endpoint}/v3/auth/tokens. For details about how to obtain IAM endpoints, see Endpoints.
- {
+A token specifies certain permissions in a computer system. Authentication using a token adds the token to a request as its header during API calling to obtain permissions to operate APIs through IAM.
+The API for obtaining a token is POST https://{IAM endpoint}/v3/auth/tokens. For details about how to obtain IAM endpoints, see Endpoints.
+{
"auth": {
"identity": {
"methods": [
@@ -29,15 +29,15 @@
}
}
}
-After a token is obtained, the X-Auth-Token header field must be added to requests to specify the token when calling other APIs. For example, if the token is ABCDEFJ...., X-Auth-Token: ABCDEFJ.... can be added to a request as follows:
-POST https://{endpoint}/v3/auth/projects
+After a token is obtained, the X-Auth-Token header field must be added to requests to specify the token when calling other APIs. For example, if the token is ABCDEFJ...., X-Auth-Token: ABCDEFJ.... can be added to a request as follows:
+POST https://{endpoint}/v3/auth/projects
Content-Type: application/json
-X-Auth-Token: ABCDEFJ....
+X-Auth-Token: ABCDEFJ....
diff --git a/docs/css/api-ref/iam_02_0511.html b/docs/css/api-ref/css_03_0140.html
similarity index 62%
rename from docs/css/api-ref/iam_02_0511.html
rename to docs/css/api-ref/css_03_0140.html
index 1926aa20..880d0bd8 100644
--- a/docs/css/api-ref/iam_02_0511.html
+++ b/docs/css/api-ref/css_03_0140.html
@@ -1,17 +1,17 @@
-
+
Returned Values
- Status CodeAfter sending a request, you will receive a response containing the status code, response header, and response body.
- A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For more information, see Status Code.
- If status code 201 is returned for the calling of the API for obtaining a user token, the request is successful.
+ Status CodeAfter sending a request, you will receive a response containing the status code, response header, and response body.
+ A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For more information, see Status Code.
+ If status code 201 is returned for the calling of the API for obtaining a user token, the request is successful.
- Response HeaderA response header corresponds to a request header, for example, Content-Type.
- Figure 1 shows the response header for the API of obtaining a user token, where x-subject-token is the desired user token. Then, you can use the token to authenticate the calling of other APIs.
- Figure 1 Header of the response to the request for obtaining a user token
+ Response HeaderA response header corresponds to a request header, for example, Content-Type.
+ Figure 1 shows the response header for the API of obtaining a user token, where x-subject-token is the desired user token. Then, you can use the token to authenticate the calling of other APIs.
+ Figure 1 Header of the response to the request for obtaining a user token
- Response BodyA response body is generally returned in a structured format, corresponding to the Content-Type in the response header, and is used to transfer content other than the response header.
- The following shows part of the response body for the API of obtaining a user token.
- {
+Response BodyA response body is generally returned in a structured format, corresponding to the Content-Type in the response header, and is used to transfer content other than the response header.
+ The following shows part of the response body for the API of obtaining a user token.
+ {
"token": {
"expires_at": "2019-02-13T06:52:13.855000Z",
"methods": [
@@ -23,17 +23,17 @@
{
"region_id": "xxx",
......
- If an error occurs during API calling, the system returns an error code and a message to you. The following shows the format of an error response body:
- {
+If an error occurs during API calling, the system returns an error code and a message to you. The following shows the format of an error response body:
+{
"error_msg": "The format of message is error",
"error_code": "AS.0001"
}
-In the preceding information, error_code is an error code, and error_msg describes the error.
+In the preceding information, error_code is an error code, and error_msg describes the error.
diff --git a/docs/css/api-ref/iam_01_0023.html b/docs/css/api-ref/iam_01_0023.html
deleted file mode 100644
index 40992d7b..00000000
--- a/docs/css/api-ref/iam_01_0023.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- Calling APIs
-
-
-
|
---|
|
---|
|