Help Center/ Cloud Trace Service/ API Reference/ Examples/ Example 2: Querying a Tracker List
Updated on 2023-07-21 GMT+08:00

Example 2: Querying a Tracker List

Introduction

This section describes how to query all trackers of an account.

Other Involved APIs

None

Querying a Tracker List

  • URI:

    GET /v3/{project_id}/trackers

  • Example request:

    GET https://{cts_endpoint}/v3/{project_id}/trackers

    Obtain the value of {cts_endpoint} from Regions and Endpoints.

  • Example response:
    {
    	"trackers": [
    		{
    			"is_support_trace_files_encryption": true,
    			"create_time": 1589886034121,
    			"streamId": "4a1ef2b6-d79a-4dc6-90f0-48151cd5491b",
    			"kms_id": "7dbbb3fa-93e4-4528-bc7b-9beb794b0229",
    			"groupId": "26fa12ac-75f7-42ed-8118-ab9f2263042f",
    			"is_support_validate": false,
    			"obs_info": {
    				"is_obs_created": false,
    				"bucket_name": "",
    				"is_authorized_bucket": false,
    				"file_prefix_name": "",
    				"bucket_lifecycle": 0
    			},
    			"lts": {
    				"log_group_name": "CTS",
    				"is_lts_enabled": true,
    				"log_topic_name": "system-trace"
    			},
    			"tracker_type": "system",
    			"domain_id": "2306579dc99f4c8690b14b68e734fcd9",
    			"project_id": "24edf66e79d04187acb99a463e610764",
    			"tracker_name": "system",
    			"id": "ebf8d1c3-762b-4ce3-b316-6b1aa32f8be3",
    			"status": "enabled"
    		},
    		{
    			"domain_id": "2306579dc99f4c8690b14b68e734fcd9",
    			"is_support_trace_files_encryption": false,
    			"obs_info": {
    				"is_obs_created": false,
    				"bucket_name": "",
    				"is_authorized_bucket": false,
    				"file_prefix_name": "",
    				"bucket_lifecycle": 0
    			},
    			"create_time": 1589276171198,
    			"project_id": "24edf66e79d04187acb99a463e610764",
    			"data_bucket": {
    				"data_event": [
    					"READ",
    					"WRITE"
    				],
    				"search_enabled": false,
    				"data_bucket_name": "cstest0423"
    			},
    			"tracker_name": "sdsa",
    			"is_support_validate": false,
    			"lts": {
    				"log_group_name": "CTS",
    				"is_lts_enabled": false,
    				"log_topic_name": "sdsa"
    			},
    			"id": "c9a3961d-3aa0-4e60-8e63-dd4ce7f1a88a",
    			"status": "enabled",
    			"tracker_type": "data"
    		}
    	]
    }