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}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| tracker_name | No | String | Tracker name. If this parameter is not specified, all trackers will be queried. Currently, only tracker "system" is available. |
CTS may support multiple trackers. 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
Tracker name. Currently, only tracker "system" is available.
bucket_name
N/A
String
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
Prefix of a log that needs to be stored in an OBS bucket.
status
N/A
String
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
Used to indicate 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
is_obs_created
N/A
Boolean
Whether a new OBS bucket can be created.
- When the value is true, you can create an OBS bucket to store trace files.
- When the value is false, you can select an existing OBS bucket to store trace files.
The bucket name is a string of 3 to 64 characters and can only contain digits, letters, hyphens (-), and periods (.). Only one period and hyphen can be contained in the string.
is_support_trace_files_encryption
N/A
Boolean
Whether the function of encrypting stored trace files is enabled or not. This parameter must be used with kms_id.
kms_id
N/A
String
Key ID used for dumping and encrypting trace files. This key ID is obtained from KMS.
This parameter is mandatory when the value of is_support_trace_files_encryption is true.
- Example response
{ "bucket_name" : "my_created_bucket", "tracker_name" : "system", "detail" : "noBucket", "file_prefix_name" : "some_folder", "status" : "disabled", "is_obs_created": true, "is_support_trace_files_encryption": true, "kms_id": "13a4207c-7abe-4b68-8510-16b84c3b5504" }
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.
Last Article: Modifying a Tracker
Next Article: Deleting a Tracker
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.