Update Observability Exporter
PATCH /environments/{env_id}/observability_exporters/{exporter_id}
PATCH /environments/{env_id}/observability_exporters/{exporter_id}Interactive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Path Parameters
Environment ID that scopes the request.
uuidObservability exporter ID within the environment.
uuidRequest Body
application/json
Patch selected exporter fields. The name and kind are fixed
at creation, and a field that does not belong to the
exporter's kind is rejected. Set fields are merged into the
stored configuration and the result is validated against the
same rules as create. An explicit empty string clears optional
fields such as the object_store region; sample_rate
cannot be cleared back to absent — 1 is the equivalent of
exporting everything. The object_store provider is
immutable.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "$AISIX_CP/environments/$ENV_ID/observability_exporters/$EXPORTER_ID" \ -H "Authorization: Bearer $AISIX_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'OK
{
"observability_exporter": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"env_id": "3f917d0d-4dff-42f3-97c4-6a5455dfe8c2",
"name": "string",
"enabled": true,
"kind": "otlp_http",
"endpoint": "string",
"header_keys": [
"string"
],
"headers_set": true,
"trace_ui_url_template": "string",
"sample_rate": 0,
"project": "string",
"logstore": "string",
"content_mode": "metadata_only",
"content_max_bytes": 0,
"provider": "s3",
"bucket": "string",
"prefix": "string",
"region": "string",
"compression": "gzip",
"auth_mode": "credential_ref",
"site": "string",
"service": "string",
"ddsource": "string",
"tags": [
"string"
],
"credential_ref": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}Request body or parameters failed validation.
{
"error": {
"code": "string",
"message": "string"
}
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Authenticated request is not permitted.
{
"error": {
"code": "CUSTOM_KEY_DISABLED",
"message": "custom API key values are disabled for this organization"
}
}Resource not found.
{
"error": {
"code": "NOT_FOUND",
"message": "provider key not found"
}
}Complete operation details and schema variants
PATCH /environments/{env_id}/observability_exporters/{exporter_id}
Update Observability Exporter
Update selected fields on an exporter. The exporter name and
kind are fixed at creation, and a field that does not belong
to the exporter's kind is rejected. Configuration changes are
validated against the same rules as create; an explicit empty
string clears optional fields such as the object_store
region.
Parameters
env_id(path, string, required): Environment ID that scopes the request.exporter_id(path, string, required): Observability exporter ID within the environment.
Request body
Content type: application/json
-
enabled(boolean, optional): Sendfalseto stop the gateway from shipping telemetry to this exporter, ortrueto re-enable it. -
endpoint(string, optional): Replacement endpoint. Forotlp_http, the receiver URL; foraliyun_sls, the bare SLS region host; forobject_store, the S3-compatible host override. -
headers(object, optional): Replacement static header set (otlp_http). Replaces the stored headers as a whole; values are encrypted at rest and never returned. -
trace_ui_url_template(string, optional): Replacement deep-link template (otlp_http). An empty string clears it. -
sample_rate(number, optional): Replacement trace sampling fraction (otlp_http). -
project(string, optional): Replacement SLS project name (aliyun_sls). -
logstore(string, optional): Replacement SLS logstore name (aliyun_sls). -
credential_ref(string, optional): Replacement credential name (aliyun_sls,datadog,object_store). -
content_mode(string, optional): What the exporter captures per request.metadata_onlyships operational metadata such as latency, token counts, and status.fulladditionally captures the prompt and the assembled response, each truncated tocontent_max_bytes. -
content_max_bytes(integer, optional): Replacement per-field capture cap in bytes (otlp_http,aliyun_sls,datadog).0applies the default of131072(128 KiB); the ceiling is 1 MiB. -
site(string, optional): Replacement Datadog site host (datadog). -
service(string, optional): Replacement Datadogserviceattribute (datadog). -
ddsource(string, optional): Replacement Datadogddsourceattribute (datadog). An empty string resets it toaisix-ai-gateway. -
tags(array, optional): Replacement Datadog tag list (datadog). -
provider(string, optional): Object-storage service forobject_storeexporters. Fixed at creation because it selects the credential family the gateway resolves. -
bucket(string, optional): Replacement bucket or container name (object_store). -
prefix(string, optional): Replacement key prefix (object_store). -
region(string, optional): Replacement cloud region (object_store). An empty string clears it. -
compression(string, optional): Compression for the telemetry files anobject_storeexporter writes. Defaults togzipwhen omitted. -
auth_mode(string, optional): How the gateway authenticates to the object store.credential_ref(the default) resolves a static cloud key from a named credential the gateway holds locally.cloud_identityuses the gateway's own attached cloud identity — supported fors3andgcs, and incompatible with a customendpointor acredential_ref.
Responses
-
200: OK -
observability_exporter(object, required): A configured telemetry exporter. The gateway ships telemetry directly to the target; the AISIX Cloud control plane stores the configuration only. Fields other thanname,enabled, andkindare present when the exporter's kind uses them. Secrets are never returned:otlp_httpreads exposeheader_keysandheaders_setinstead of header values, and the other kinds expose only thecredential_refpointer. -
observability_exporter.id(string, required): Observability exporter ID. -
observability_exporter.env_id(string, required): Environment ID that owns this exporter. -
observability_exporter.name(string, required): Human-readable exporter name, unique within the environment. Fixed at creation. -
observability_exporter.enabled(boolean, required): Disabled exporters are kept but the gateway stops shipping telemetry to them. -
observability_exporter.kind(string, required): Telemetry destination type, fixed at creation.otlp_httpsends traces over OTLP/HTTP to an OpenTelemetry-compatible receiver.aliyun_slsdelivers request logs to an Alibaba Cloud SLS logstore.object_storewrites newline-delimited JSON telemetry files to S3, Google Cloud Storage, or Azure Blob Storage.datadogdelivers request logs to the Datadog Logs intake. -
observability_exporter.endpoint(string, optional): Forotlp_http, the receiver URL. Foraliyun_sls, the bare SLS region host. Forobject_store, the optional S3-compatible host override. -
observability_exporter.header_keys(array, optional): Names of the static headers attached to every export request (otlp_http). Header values are never returned. -
observability_exporter.headers_set(boolean, optional): Whether encrypted header values are stored for this exporter (otlp_http). -
observability_exporter.trace_ui_url_template(string, optional): Deep-link template used by log views to open a request's trace in an external UI (otlp_http). Contains a{request_id}placeholder, a{trace_id}placeholder, or both —{trace_id}addresses the trace by the trace ID the gateway exported its spans under;{request_id}suits backends that search the request-ID span attribute. -
observability_exporter.sample_rate(number, optional): Fraction of requests whose traces are exported, between 0 and 1 (otlp_http). Absent means every request is exported. -
observability_exporter.project(string, optional): SLS project name (aliyun_sls). -
observability_exporter.logstore(string, optional): SLS logstore name (aliyun_sls). -
observability_exporter.content_mode(string, optional): What the exporter captures per request.metadata_onlyships operational metadata such as latency, token counts, and status.fulladditionally captures the prompt and the assembled response, each truncated tocontent_max_bytes. -
observability_exporter.content_max_bytes(integer, optional): Per-field capture cap in bytes whencontent_modeisfull(otlp_http,aliyun_sls,datadog). -
observability_exporter.provider(string, optional): Object-storage service forobject_storeexporters. Fixed at creation because it selects the credential family the gateway resolves. -
observability_exporter.bucket(string, optional): Bucket or container name (object_store). -
observability_exporter.prefix(string, optional): Key prefix for written objects (object_store). -
observability_exporter.region(string, optional): Cloud region of the bucket (object_store). -
observability_exporter.compression(string, optional): Compression for the telemetry files anobject_storeexporter writes. Defaults togzipwhen omitted. -
observability_exporter.auth_mode(string, optional): How the gateway authenticates to the object store.credential_ref(the default) resolves a static cloud key from a named credential the gateway holds locally.cloud_identityuses the gateway's own attached cloud identity — supported fors3andgcs, and incompatible with a customendpointor acredential_ref. -
observability_exporter.site(string, optional): Datadog site host, such asdatadoghq.comordatadoghq.eu(datadog). -
observability_exporter.service(string, optional): Datadogserviceattribute (datadog). -
observability_exporter.ddsource(string, optional): Datadogddsourceattribute (datadog). -
observability_exporter.tags(array, optional): Tags rendered into Datadog'sddtagsattribute (datadog). -
observability_exporter.credential_ref(string, optional): Name of the credential the gateway resolves from its own runtime environment (aliyun_sls,object_store,datadog). The referenced secret never leaves the gateway host. -
observability_exporter.created_at(string, required): Time when the exporter was created. -
observability_exporter.updated_at(string, required): Time when the exporter was last updated. -
400: Request body or parameters failed validation. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
401: Missing or invalid bearer. Response fields (application/json): identical toPATCH /environments/{env_id}/observability_exporters/{exporter_id}, response 400 above. -
403: Authenticated request is not permitted. Response fields (application/json): identical toPATCH /environments/{env_id}/observability_exporters/{exporter_id}, response 400 above. -
404: Resource not found. Response fields (application/json): identical toPATCH /environments/{env_id}/observability_exporters/{exporter_id}, response 400 above.
cURL
curl -X PATCH '$AISIX_CP/environments/{env_id}/observability_exporters/{exporter_id}' -H 'Authorization: Bearer $AISIX_TOKEN'