• Cloud Trace Service

cts
  1. Help Center
  2. Cloud Trace Service
  3. API Reference
  4. API Description
  5. Tracker Management
  6. Querying a Tracker

Querying a Tracker

Function

This API is used to query a tracker created on the Tracker Information page. The detailed information includes the name of the tracker, name of the OBS bucket for storing traces, and prefix of the traces stored in an OBS bucket.

URI

GET /v1.0/{project_id}/tracker?tracker_name={tracker_name}

For details about the parameters, see Querying a Tracker.
Table 1 Parameters in the URI

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

tracker_name

No

String

Specifies the tracker name.

If this parameter is not specified, all trackers will be queried.

Currently, only tracker "system" is available.

NOTE:

CTS may support multiple trackers in the future. If the query request GET /v1.0/{project_id}/tracker does not contain parameter tracker_name, the response is in array format. Otherwise, the response is in object format.

Request

  • Parameters

    None

  • Example request
    GET /v1.0/{project_id}/tracker?tracker_name=system

Response

  • Parameters
    Table 2 Parameters in the request

    Parameter

    Sub-Parameter

    Type

    Description

    tracker_name

    N/A

    String

    Specifies the tracker name. Currently, only tracker "system" is available.

    bucket_name

    N/A

    String

    Specifies the OBS bucket name. Starts with a digit or letter and contains 3 to 63 characters, including lowercase letters, digits, hyphens (-), and periods (.)

    file_prefix_name

    N/A

    String

    Specifies the prefix of a log that needs to be stored in an OBS bucket.

    status

    N/A

    String

    Specifies the status of a tracker. The value can be enabled, disabled, or error. If the value is set to error, the detail field is required for specifying the source of the error.

    detail

    N/A

    String

    Indicates the tracker exception cause. It is only returned in the response when the tracker status becomes abnormal. The value of this parameter can be one of the following:

    • bucketPolicyError
    • noBucket
    • arrears

    smn

    is_support_smn

    Boolean

    Specifies whether SMN is supported.

    topic_id

    String

    Specifies the theme of the SMN service.

    operations

    Array

    • Specifies trigger conditions for sending a notification when Typical is selected. You can select Delete, Create, or Login or at least one of them.
    • Specifies trigger conditions for sending a notification when All is selected. All conditions including Delete, Create, Change, and OpenStack API Event are selected by default. Modification is not allowed.

    is_send_all_key_operation

    Boolean

    You can select Typical or All for Trigger Condition.

    • When the value is false, operations cannot be left empty.
    • When the value is true, operations is not supported.

    need_notify_user_list

    Array

    In Typical scenario, you can specify the users using the login function. When these users log in, notifications will be sent.

    • After this function is enabled, the value is the list of the specified users. Use a comma (,) to separate every two users. A maximum of 50 users is supported.
    • If the value is null, the target objects are all users by default.
  • Example response
    {
     "bucket_name" : "my_created_bucket",
     "tracker_name" : "system",
     "detail" : "noBucket",
     "file_prefix_name" : "some_folder",
     "status" : "disabled"
     "smn": { 
      "is_support_smn": false,
      "topic_id": "urn:smn:regionId:328c0a60cba6444ead0579aa0c244f04:cts-test",
      "is_send_all_key_operation":false,
      "operations": [ "delete", "create","login"],
      "need_notify_user_list": ["user1","user2"] 
     }
    }

Returned Value

  • Normal
    Table 3 Return code for successful requests

    Returned Value

    Description

    200

    The request is successful and the query result is returned.

  • Abnormal
    Table 4 Return code for failed requests

    Returned Value

    Description

    400

    The server failed to process the request.

    500

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

    401

    Your access request is rejected.

    403

    You are forbidden to access the requested page.