- What's New
- Function Overview
- Service Overview
- Getting Started
- User Guide
- Best Practices
- Developer Guide
-
API Reference
- Before You Start
- API Overview
- API Calling
-
API
-
Console
- Instance Management
- Job Management
-
Service Authorization Management
- Granting Permissions for Accessing Other Cloud Services
- Querying Cloud Service Access Permissions
- Registering a Tenant Agreement
- Querying whether a Tenant Has Registered an Agreement
- Deleting a Tenant Agreement
- Registering a Tenant Agreement
- Querying whether a Tenant Has Registered an Agreement
- Deleting a Tenant Agreement
- Querying the Current System Agreement
- OBS Management
- Access Management
- Specification Management
- Quota Management Service
- Tag Management Service
- Agency Management
- Alarm Management
- Metadata Management
- Location
-
LakeCat
- Function Management
- Catalog Management
- Database Management
- Table Management
- Data Table Statistics
- Zone-based Management
- Partition Statistics
- Authorization Management
- User Group Management
- Metadata Statistics
-
Role Management
- Creating a Role
- Listing Roles on Different Pages by Condition
- Deleting a Role
- Obtaining a Role
- Modifying a Role
- Listing All Role Names
- Querying the Users or User groups Under a Role
- Adding One or More Users or User Groups to a Role
- Removing One or More Users or User Groups from a Role
- Updating the Entities in a Role
- Credential Management
- Configuration Management
- User
-
Console
- Application Examples
- Permissions and Supported Actions
- Appendix
- FAQs
- General Reference
Copied.
Authentication
You can use either of the following authentication methods to call APIs:
- Authentication using tokens: General requests are authenticated using tokens.
- Authentication using AK/SK: Requests are encrypted using access key ID (AK)/secret access key (SK). This authentication method is recommended because it is more secure than token-based authentication.
Authentication Using Tokens
The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently API calling.
Ensure that the token is valid when you use it. Using a token that will soon expire may cause API calling failures.
A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to a request to get permissions for calling the API.
When calling an API to obtain a user token, you must set auth.scope in the request body to project.
{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "username", //Username "password": "********", //Password of the username "domain": { "name": "domainname" //Domain name which the user belongs to } } } }, "scope": { "project": { "id": "xxxxxxxx" //Resource set ID } } } }
After a token is obtained, add field X-Auth-Token to the request header to specify the token when other APIs are called. For example, if the token is ABCDEFJ...., add X-Auth-Token: ABCDEFJ.... in a request as follows:
Content-Type: application/json X-Auth-Token: ABCDEFJ....
Authentication Using AK/SK
Authentication using AK/SK supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended.
This authentication method uses AK/SK to sign requests, and the signature is then added to request headers for authentication.
- AK: access key ID. It is a unique identifier used with a secret access key to sign requests cryptographically.
- SK: secret access key. It is used together with an AK to sign requests. They can identify request senders and prevent requests from being modified.
The signing SDKs are only used for signing requests and different from the SDKs provided by services.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot