Help Center> Cloud Connect> API Reference> API> Authorizations> Querying the Permission List
Updated on 2024-05-13 GMT+08:00

Querying the Permission List

Function

This API is used to query the list of permissions to use network instances in another account.

Parameters marker and limit are used for pagination query. The two parameters take effect only when they are used together.

Calling Method

For details, see Calling APIs.

URI

GET /v3/{domain_id}/ccaas/permissions

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Account ID.

Minimum: 10

Maximum: 32

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records on each page.

Value range: 1 to 1000

Minimum: 1

Maximum: 1000

Default: 1000

marker

No

String

Pagination query information. You can obtain the marker values from the response of the last API call. You can enter the marker value of the previous page or the next page. If you enter the marker value of the previous page, the previous page will be queried. If you enter the marker value of the next page, the next page will be queried. During pagination query, the query criteria, including the filters, sorting criteria, and the limit value, cannot be modified.

Minimum: 1

Maximum: 4096

id

No

Array

Resource ID. Multiple IDs can be queried.

Array Length: 1 - 20

name

No

Array

Resource name. Multiple names can be queried.

Array Length: 1 - 20

description

No

Array

Description. Multiple descriptions can be queried.

Array Length: 1 - 20

cloud_connection_id

No

Array

Cloud connection IDs.

Array Length: 1 - 20

instance_id

No

Array

Network instance ID used to query authorizations.

Array Length: 1 - 10

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token.

Minimum: 0

Maximum: 2000000

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Resource ID.

Minimum: 32

Maximum: 36

page_info

PageInfo object

Pagination query information.

permissions

Array of Permission objects

List of the authorized instances.

Array Length: 0 - 2000

Table 5 PageInfo

Parameter

Type

Description

next_marker

String

Backward pagination identifier.

Minimum: 1

Maximum: 4096

previous_marker

String

Forward pagination identifier.

Minimum: 1

Maximum: 4096

current_count

Integer

Number of the resources in the current list.

Minimum: 0

Maximum: 2000

Table 6 Permission

Parameter

Type

Description

id

String

Resource ID.

name

String

Resource name.

description

String

Resource description. Angle brackets (<>) are not allowed.

Minimum: 0

Maximum: 255

instance_id

String

Resource ID.

project_id

String

Project ID.

region_id

String

Region ID.

created_at

String

Time when the resource was created. The time is in the yyyy-MM-ddTHH:mm:ss format.

domain_id

String

ID of the account that the instance belongs to.

cloud_connection_id

String

Resource ID.

status

String

Authorization status.

Minimum: 0

Maximum: 255

instance_type

String

Type of an authorized network instance.

Minimum: 0

Maximum: 255

instance_domain_id

String

Account ID of the network instance that another account allows you to use.

Minimum: 0

Maximum: 36

Example Requests

Querying the permission list

GET https://{cc_endpoint}/v3/{domain_id}/ccaas/permissions

Example Responses

Status code: 200

The permission list has been queried.

{
  "request_id" : "bce57c774ed47dd828963e5ec3a0b06d",
  "permissions" : [ {
    "id" : "XXX",
    "name" : "",
    "description" : "",
    "domain_id" : "XXX",
    "created_at" : "2023-09-20T08:03:51Z",
    "project_id" : "XXX",
    "region_id" : "region_id",
    "instance_type" : "vpc",
    "instance_id" : "XXX",
    "instance_domain_id" : "XXX",
    "cloud_connection_id" : "XXX",
    "status" : "authorized"
  } ],
  "page_info" : {
    "previous_marker" : "XXX",
    "current_count" : 1
  }
}

Status Codes

Status Code

Description

200

The permission list has been queried.

Error Codes

See Error Codes.