Help Center> Cloud Trace Service> API Reference> V3 APIs (Recommended)> Other APIs> Querying All Operations on a Cloud Service
Updated on 2024-05-24 GMT+08:00

Querying All Operations on a Cloud Service

Function

This API is used to list all operations on a cloud service.

URI

GET /v3/{project_id}/operations

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining an Account ID and Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

service_type

No

String

Type of the cloud service on which operations are performed.

resource_type

No

String

Type of the resource on which operations are performed. If this parameter is used, service_type is mandatory.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

operations

Array of ListOperation objects

All operations on the cloud service.

Table 4 ListOperation

Parameter

Type

Description

service_type

String

Type of the cloud service on which operations are performed.

resource_type

String

Type of the resource on which operations are performed.

operation_list

Array of strings

Array of operation names.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Status code: 503

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code. Format: CTS.XXX.

error_msg

String

Error message.

Example Request

GET https://{endpoint}/v3/{project_id}/operations

Example Response

Status code: 200

The request is successfully sent.

{
  "operations" : [ {
    "service_type" : "cts",
    "resource_type" : "tracker",
    "operation_list" : [ "updateTracker", "createTracker", "deleteTracker" ]
  }, {
    "service_type" : "cts",
    "resource_type" : "notification",
    "operation_list" : [ "updateNotification", "createNotification", "deleteNotification" ]
  } ]
}

Status Codes

Status Code

Description

200

The request is successfully sent.

400

The server failed to process the request.

401

The request is rejected due to authentication failure.

403

The server understood the request but refused to authorize it.

404

The requested resource does not exist.

500

Failed to complete the request because of an internal service error.

503

The requested service is invalid. The client should not repeat the request without modifications.

Error Codes

For details, see Error Codes.