Querying Authorization Details
Function
Query authorization details.
URI
GET /v2/servicerequest/authorizations/{authorization_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
authorization_id |
Yes |
String |
Specifies the authorization ID. Minimum length: 1 Maximum length: 32 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
group_id |
No |
String |
Specifies the group ID. Minimum length: 1 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-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 |
|---|---|---|
|
id |
String |
Specifies the authorization ID. Minimum length: 1 Maximum length: 32 |
|
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: 0 Maximum length: 2000 |
|
resource_type_id |
String |
Specifies the resource type ID of the authorization. Minimum length: 0 Maximum length: 32 |
|
resource_type_name |
String |
Specifies the resource type name of the authorization. Minimum length: 0 Maximum length: 64 |
|
visit_type_id |
String |
Specifies the access type ID of the authorization. Minimum length: 0 Maximum length: 32 |
|
visit_type_name |
String |
Specifies the access type name of the authorization. Minimum length: 0 Maximum length: 64 |
|
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 |
|
incident_auth_detail_list |
Array of IncidentOrderAuthDetailInfoV2 objects |
Specifies the authorization details list. |
|
xcustomer_name |
String |
Specifies the member account name. Minimum length: 0 Maximum length: 256 |
|
auth_handler_name |
String |
Specifies the authorization handler name. Minimum length: 1 Maximum length: 64 |
|
agency_name |
String |
Specifies the agency name. Minimum length: 0 Maximum length: 128 |
|
auth_describe |
String |
Description of the authorization. Minimum length: 0 Maximum length: 256 |
|
content_type_id |
String |
Specifies the authorization content ID. Minimum length: 0 Maximum length: 64 |
|
content_type_name |
String |
Specifies the authorization content name. Minimum length: 0 Maximum length: 64 |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
Long |
Specifies the authorization detail ID. Minimum value: 0 Maximum value: 9223372036854775807 |
|
port |
Integer |
Specifies the port. Minimum value: 0 Maximum value: 65535 |
|
account |
String |
Specifies the account. Minimum length: 0 Maximum length: 64 |
|
type |
Integer |
Specifies the authorization details type. The value can be 0 (Console) or 1 (Host resource). Minimum value: 0 Maximum value: 1 |
|
instance_id |
String |
Specifies the instance ID. Minimum length: 0 Maximum length: 64 |
|
instance_name |
String |
Specifies the instance name. Minimum length: 0 Maximum length: 64 |
|
region_id |
String |
Specifies the region ID. Minimum length: 0 Maximum length: 64 |
Request Example
GET https://{endpoint}/v2/servicerequest/authorizations/Auth-123456?group_id=123
null
Response Example
Status code: 200
Code 200 is returned if the operation is successful.
{
"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,
"incident_auth_detail_list" : [ {
"id" : 123,
"port" : 22,
"account" : "test",
"type" : 0,
"instance_id" : "",
"instance_name" : "",
"region_id" : ""
} ],
"xcustomer_name" : "test",
"auth_handler_name" : "test",
"agency_name" : null,
"auth_describe" : "test",
"content_type_id" : "123",
"content_type_name" : "Key"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Code 200 is returned if the operation is successful. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.