Skip to content

Get Tags Information for Non-Log Text Data



GET /api/v1/metric_info/text_data/tags

Overview

Retrieve sampled values for a specified field within a non-log data namespace.

Prerequisites and Usage Steps

The query scope is the current day in the Workspace time zone. If no data meets the conditions, the corresponding result field is an empty array. A subset of non-null values is returned; this cannot be used to enumerate all historical values. null, empty strings, 0, and false in upstream query results are not included in the sample list. If namespace is empty or unsupported, or the field name is empty, the request returns success with content set to {}.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y AK identifier used for authentication
Example: <DF-API-KEY>
How to obtain or enter: Create or obtain a Key with permissions for this API in API Key Management of the target Workspace.

Query Request Parameters

Parameter Type Required Description
namespace string Y Supports "lineage", "object", "object_history", "custom_object", "custom_object_history", "keyevent", "audit_event", "unrecovered_event", "tracing", "rum", "security", "network", "backup_log", "profiling", "rum_metric", "network_metric", "tracing_metric", "billing", "dialtest", "execution_log", "llm", "agent_monitor", "errorhub". Case-insensitive; leading and trailing whitespace is trimmed.
Null allowed: False
Example: tracing
How to obtain or enter: Select from the namespaces listed in this table based on the data type being written.
tag string Y Name of the field from which to sample values.
Null allowed: False
Example: service
How to obtain or enter: Get content.fields[].name from the Get Non-Log Text Data Schema response for the same namespace.
limit integer Default 10; values greater than 10 are treated as 10. Pass a positive integer.
Null allowed: True
Default value: 10
Example: 10
How to obtain or enter: Set according to the number of samples required by the caller; 1 to 10 is recommended.

Additional Parameter Notes

Use GET to read data in the Workspace that owns the current API Key.

Request Example

curl --get -H "DF-API-KEY: <DF-API-KEY>" \
  "https://openapi.guance.com/api/v1/metric_info/text_data/tags" \
  --data-urlencode "namespace=tracing" \
  --data-urlencode "tag=service" \
  --data-urlencode "limit=10"

Response

HTTP 200, application/json.

Field Type Description
content.namespace string Requested namespace after leading and trailing whitespace is trimmed.
content.tag string Field or Tag name in the request.
content.values array Sampled values. Element type depends on the data source field; empty array when no values match.
content.declaration object or null Workspace common declaration attached to non-empty content; may be null or an empty object when not configured; not added for an empty content object.
{
  "code": 200,
  "content": {
    "namespace": "tracing",
    "tag": "service",
    "values": [
      "api",
      "worker"
    ],
    "declaration": null
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed Missing required Query parameters or an undeclared Query parameter was passed Request field validation failed; the message indicates the field or rule. Check the parameter table and example.
403 ft.ForbiddenQuery The current credentials are not authorized to query the data corresponding to the request Insufficient query permissions. Check the API Key query permissions and the authorization scope of the target data.
503 ft.QueryServiceUnavailable The dependent query service is temporarily unavailable The query service is temporarily unavailable. Retry later. Check content.retryable; for transient errors, retry after a delay.
500 ft.InternalServerError limit contains a string that cannot be converted to an integer Internal error. Verify the pagination field used against the parameter table, then pass a decimal integer string and retry.

Feedback

Is this page helpful?