Get Non-Log Text Data Schema Information¶
GET /api/v1/metric_info/text_data/schema
Overview¶
Get the field names and data types discovered today in the specified non-log data namespace.
Before Calling and Usage Steps¶
The query scope is the current day in the workspace time zone. When no data matches, the corresponding result fields are empty arrays. If the namespace is left empty or is unsupported, the request returns success and content is {}. For log fields, call Get Log Schema.
Request Headers¶
| Parameter Name | 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 Name | Type | Required | Description |
|---|---|---|---|
| namespace | string | Y | Supported values: "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 ignored. Allows null: False Example: tracingHow to obtain or enter: Select from the namespaces listed in this table based on the data type being written. |
Additional Parameter Notes¶
Use GET to read data from the workspace to which the current API Key belongs.
Request Example¶
curl --get -H "DF-API-KEY: <DF-API-KEY>" \
"https://openapi.guance.com/api/v1/metric_info/text_data/schema" \
--data-urlencode "namespace=tracing"
Response¶
HTTP 200, application/json.
| Field | Type | Description |
|---|---|---|
| content.namespace | string | The requested namespace with leading and trailing whitespace removed. |
| content.fields | array<object> |
Result list. Empty if no results match. |
| content.fields[].name | string | Field name, which can be used in subsequent queries. |
| content.fields[].value_type | string | Field value type returned by the data source; can be an empty string. |
| content.fields[].type | string | Field category, fixed to text. |
| content.fields[].description | string | Field description; currently an empty string. |
| content.declaration | object or null | Workspace common declaration attached to non-empty content; when not configured, it can be null or an empty object; not added when the content object is empty. |
{
"code": 200,
"content": {
"namespace": "tracing",
"fields": [
{
"name": "service",
"value_type": "string",
"type": "text",
"description": ""
}
],
"declaration": null
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definition.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | A required Query parameter is missing, or an undeclared Query parameter is 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 for the target data. |
| 503 | ft.QueryServiceUnavailable | The dependent query service is temporarily unavailable | The query service is temporarily unavailable. Try again later. | Check content.retryable; for transient errors, retry after a delay. |