Viewing Authorization List
Function Description
To query the authorization list.
Debugging
You can debug this API in API Explorer.
URI
GET /v2/servicerequest/authorizations
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| sub_customer_name | No | String | Specifies the sub-user name. Minimum length: 0 Maximum length: 256 |
| incident_id | No | String | Specifies the service ticket ID. Minimum length: 0 Maximum length: 64 |
| status | No | Integer | Specifies the authorization status. Minimum value: 0 Maximum value: 10 |
| simple_description | No | String | A brief description. Minimum length: 0 Maximum length: 2000 |
| offset | No | Integer | Specifies the query offset. Minimum value: 0 Maximum value: 65535 |
| limit | No | Integer | Specifies the limited number of records that can be queried. Minimum value: 1 Maximum value: 100 |
| group_id | No | String | Specifies the group ID. Minimum length: 0 Maximum length: 64 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Specifies the user token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). Minimum length: 1 Maximum length: 5000 |
| X-Site | No | Integer | Specifies the site. The value can be 0 (China site) or 1 (International site). If this parameter is left blank, it is 0 by default. Minimum value: 0 Maximum value: 1 |
| X-Language | No | String | Specifies the language environment. The value is a common language description character string, for example, zh-cn. It is zh-cn by default. Some internationalization information, such as the service ticket type and name, is displayed based on the language environment. Minimum length: 1 Maximum length: 32 |
| X-Time-Zone | No | String | Specifies the time zone. The value is a common time zone description character string, for example, GMT+8. It is GMT+8 by default. Time-related data is processed based on the time zone of the environment. Minimum length: 1 Maximum length: 32 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Specifies the total number. Minimum value: 0 Maximum value: 9223372036854775807 |
| incident_auth_list | Array of IncidentOrderAuthV2 objects | Specifies the authorization list. |
| Parameter | Type | Description |
|---|---|---|
| id | Long | Specifies the authorization ID. Minimum value: 0 Maximum value: 9223372036854775807 |
| status | Integer | Specifies the authorization status. Minimum value: 0 Maximum value: 10 |
| incident_id | String | Specifies the service ticket ID. Minimum length: 1 Maximum length: 64 |
| simple_description | String | A brief description. Minimum length: 1 Maximum length: 2000 |
| resource_type_name | String | Specifies the resource type name of the authorization. Minimum length: 1 Maximum length: 64 |
| visit_type_name | String | Specifies the access type name of the authorization. Minimum length: 1 Maximum length: 64 |
| create_time | String | Specifies the creation time. |
| auth_effective_time | String | Specifies the authorization start time. |
| auth_expire_time | String | Specifies the authorization expiration time. |
| reject_reason | String | Specifies the reason for rejection. Minimum length: 0 Maximum length: 300 |
| customer_id | String | Specifies the master account ID. Minimum length: 1 Maximum length: 64 |
| x_customer_id | String | Specifies the sub-user ID. Minimum length: 0 Maximum length: 64 |
| x_customer_name | String | Specifies the sub-user name. Minimum length: 0 Maximum length: 256 |
Request Example
GET https://{endpoint}/v2/servicerequest/authorizations?incident_id=test-123
null Response Example
Status code: 200
Code 200 is returned.
{
"total" : 123,
"incident_auth_list" : [ {
"id" : 123,
"status" : 0,
"incident_id" : "test-123",
"simple_description" : "test",
"resource_type_id" : "2",
"resource_type_name" : "HUAWEI CLOUD account",
"visit_type_id" : "4",
"visit_type_name" : "Console log-in",
"auth_effective_time" : "2020-07-07T09:33:43.000Z",
"auth_expire_time" : "2020-07-07T09:33:43.000Z",
"reject_reason" : null,
"create_time" : "2020-07-07T09:33:43.000Z",
"customer_id" : "customer-123",
"x_customer_id" : "x-customer-123",
"xcustomer_name" : "test",
"auth_handler_name" : "test",
"agency_name" : null,
"auth_describe" : "",
"content_type_id" : "123",
"content_type_name" : "Key"
} ]
} Status Code
| Status Code | Description |
|---|---|
| 200 | Code 200 is returned. |
Error Code
See here.
Last Article: Confirming Tenant Authorization
Next Article: Querying Bastion Host Operation History
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.