{"type":"api","title":"Update data stream","meta":{"id":"/apps/pubhub/media/000-v7-apis/5b3454a4300b838cc17f7b2cdc0690fdd15058d5/4bef5bf8-85e1-3e97-9841-756deb0d4d50","info":{"description":"ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry.\n\nThousandEyes for OTel is made up of the following components:\n\n* Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams,\nin particular to configure how ThousandEyes telemetry data is exported to client integrations.\n* A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional\ndetail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs.\n* Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client\nconfiguration.\n\nFor more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry).\n","title":"ThousandEyes for OpenTelemetry API","version":"7.0.34"},"security":[{"BearerAuth":[]}],"tags":[{"description":"Configure data streaming","name":"Streaming"}],"openapi":"3.0.1","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"description":"Bearer authentication token","scheme":"bearer","type":"http"}}},"spec":{"description":"Updates a configured data stream using its ID. The fields are overwritten, not appended.","operationId":"updateStream","parameters":[{"description":"ID of stream to query","explode":false,"in":"path","name":"id","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.","in":"query","name":"aid","required":false,"schema":{"example":"1234","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"customHeaders":{"additionalProperties":{"type":"string"},"description":"Custom headers.\n**Note**: When using the `splunk-hec` `type`, the `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*.","example":{"Authorization":"*****","Content-Type":"*****"},"type":"object"},"streamEndpointUrl":{"description":"The URL ThousandEyes sends data stream to.\nFor a URL to be valid, it needs to: - Be syntactically correct. - Be reachable. - Use the HTTPS protocol. - When using the `grpc` endpointType, streamEndpointUrl cannot contain paths:\n - Valid . `grpc` - `https://example.com`\n - Invalid . `grpc` - `https://example.com/collector`.\n - Valid . `http` - `https://example.com/collector`.\n\n- When using the `http` endpointType, the operation must match the exact final full URL (including the path if there is one) to which the data will be sent. Examples below:\n - `https://api.honeycomb.io:443/v1/metrics`\n - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`","example":"https://api.thousandeyes.otel-collector","type":"string"},"tagMatch":{"description":"A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics.","example":[{"key":"keyA","value":"valueA"},{"key":"keyB","value":"valueB"}],"items":{"properties":{"key":{"description":"The name of the tag key to match","example":"keyA","type":"string"},"value":{"description":"The value of the tag to match","example":"valueA","type":"string"}},"type":"object","$$ref":"#/components/schemas/TagMatch"},"type":"array"},"testMatch":{"description":"A collection of tests to be included in the data stream.","example":[{"id":"1234","domain":"cea"},{"id":"5678","domain":"endpoint"}],"items":{"properties":{"id":{"description":"The ID of the test to match.","example":"1234","type":"string"},"domain":{"description":"The domain of the test to match.\n `cea` - Cloud and Enterprise Agent\n `endpoint` - Endpoint Agent","enum":["cea","endpoint"],"example":"cea","type":"string","$$ref":"#/components/schemas/TestMatchDomain"}},"type":"object","$$ref":"#/components/schemas/TestMatch"},"type":"array"},"enabled":{"description":"Flag to enable or disable the stream integration.","example":true,"type":"boolean"},"filters":{"description":"Provides the ability to filter data points based on the specified test types.","properties":{"testTypes":{"description":"Test types that can be used for filtering data points.","properties":{"values":{"description":"A list of test types to filter data points.","example":["agent-to-server","bgp","http-server"],"items":{"description":"This is a read only value, as test type is implicit in the test creation url.","enum":["api","agent-to-agent","agent-to-server","bgp","http-server","page-load","web-transactions","ftp-server","dns-trace","dns-server","dnssec","sip-server","voice"],"example":"agent-to-server","readOnly":true,"type":"string","$$ref":"#/components/schemas/TestType"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/FiltersTestTypes"}},"type":"object","$$ref":"#/components/schemas/Filters"},"exporterConfig":{"description":"Capability to set exporter configuration.","properties":{"splunkHec":{"description":"Splunk HEC configuration. This can only be configured when the `type` is `splunk-hec`.","properties":{"token":{"description":"The Splunk HEC `token`. This is a required field.","example":"d0a91307-be2f-4218-a9f8-71c02d98846b","type":"string"},"source":{"default":"ThousandEyesOTel","description":"The Splunk HEC `source`. This field is optional.","example":"ThousandEyesOTel","type":"string"},"sourceType":{"default":"ThousandEyesOTel","description":"The Splunk HEC `sourceType`. This field is optional.","example":"ThousandEyesOTel","type":"string"},"index":{"description":"The name of the Splunk HEC index where the event data will be stored. This field is optional.","example":"thousandeyes_otel_events_index","type":"string"}},"type":"object","$$ref":"#/components/schemas/ExporterConfigSplunkHec"}},"type":"object","$$ref":"#/components/schemas/ExporterConfig"}},"type":"object","$$ref":"#/components/schemas/PutStream"}}}},"responses":{"200":{"content":{"application/hal+json":{"schema":{"properties":{"id":{"description":"The data stream ID","example":"342ieu09","readOnly":true,"type":"string"},"enabled":{"description":"Flag to enable or disable the stream integration.","example":true,"readOnly":true,"type":"boolean"},"_links":{"properties":{"self":{"properties":{"href":{"example":"https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799","format":"url","type":"string"}},"type":"object","$$ref":"#/components/schemas/StreamSelfLink"}},"readOnly":true,"type":"object","$$ref":"#/components/schemas/StreamLinks"},"type":{"description":"The type of data stream to configure.\nWhen using `splunk-hec`:\n - `endpointType` must be `http`.\n - `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*.","enum":["opentelemetry","splunk-hec"],"example":"opentelemetry","type":"string","$$ref":"#/components/schemas/StreamType"},"signal":{"default":"metric","description":"The OpenTelemetry signal of the stream integration.\nWhen using `trace`:\n - `dataModelVersion` must be `v2`.","enum":["metric","trace"],"example":"metric","type":"string","$$ref":"#/components/schemas/Signal"},"endpointType":{"default":"grpc","description":"The type of connection used to send data to the endpoint.\n**Note**: When using the `splunk-hec` 'type', the `EndpointType` must be `http`.","enum":["grpc","http"],"example":"grpc","type":"string","$$ref":"#/components/schemas/EndpointType"},"streamEndpointUrl":{"description":"The URL ThousandEyes sends data stream to.\nFor a URL to be valid, it needs to: - Be syntactically correct. - Be reachable. - Use the HTTPS protocol. - When using the `grpc` endpointType, streamEndpointUrl cannot contain paths:\n - Valid . `grpc` - `https://example.com`\n - Invalid . `grpc` - `https://example.com/collector`.\n - Valid . `http` - `https://example.com/collector`.\n\n- When using the `http` endpointType, the operation must match the exact final full URL (including the path if there is one) to which the data will be sent. Examples below:\n - `https://api.honeycomb.io:443/v1/metrics`\n - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`","example":"https://api.thousandeyes.otel-collector","type":"string","$$ref":"#/components/schemas/StreamEndpointUrl"},"dataModelVersion":{"default":"v2","description":"The version of the data model used in the data stream.\nWhen using `v1`:\n - The `signal` cannot be `trace`.","enum":["v1","v2"],"example":"v2","type":"string","$$ref":"#/components/schemas/DataModelVersion"},"customHeaders":{"additionalProperties":{"type":"string"},"description":"Custom headers.\n**Note**: When using the `splunk-hec` `type`, the `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*.","example":{"Authorization":"*****","Content-Type":"*****"},"type":"object"},"tagMatch":{"description":"A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics.","example":[{"key":"keyA","value":"valueA"},{"key":"keyB","value":"valueB"}],"items":{"properties":{"key":{"description":"The name of the tag key to match","example":"keyA","type":"string"},"value":{"description":"The value of the tag to match","example":"valueA","type":"string"}},"type":"object","$$ref":"#/components/schemas/TagMatch"},"type":"array"},"testMatch":{"description":"A collection of tests to be included in the data stream.","example":[{"id":"1234","domain":"cea"},{"id":"5678","domain":"endpoint"}],"items":{"properties":{"id":{"description":"The ID of the test to match.","example":"1234","type":"string"},"domain":{"description":"The domain of the test to match.\n `cea` - Cloud and Enterprise Agent\n `endpoint` - Endpoint Agent","enum":["cea","endpoint"],"example":"cea","type":"string","$$ref":"#/components/schemas/TestMatchDomain"}},"type":"object","$$ref":"#/components/schemas/TestMatch"},"type":"array"},"filters":{"description":"Provides the ability to filter data points based on the specified test types.","properties":{"testTypes":{"description":"Test types that can be used for filtering data points.","properties":{"values":{"description":"A list of test types to filter data points.","example":["agent-to-server","bgp","http-server"],"items":{"description":"This is a read only value, as test type is implicit in the test creation url.","enum":["api","agent-to-agent","agent-to-server","bgp","http-server","page-load","web-transactions","ftp-server","dns-trace","dns-server","dnssec","sip-server","voice"],"example":"agent-to-server","readOnly":true,"type":"string","$$ref":"#/components/schemas/TestType"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/FiltersTestTypes"}},"type":"object","$$ref":"#/components/schemas/Filters"},"exporterConfig":{"description":"Capability to set exporter configuration.","properties":{"splunkHec":{"description":"Splunk HEC configuration. This can only be configured when the `type` is `splunk-hec`.","properties":{"token":{"description":"The Splunk HEC `token`. This is a required field.","example":"d0a91307-be2f-4218-a9f8-71c02d98846b","type":"string"},"source":{"default":"ThousandEyesOTel","description":"The Splunk HEC `source`. This field is optional.","example":"ThousandEyesOTel","type":"string"},"sourceType":{"default":"ThousandEyesOTel","description":"The Splunk HEC `sourceType`. This field is optional.","example":"ThousandEyesOTel","type":"string"},"index":{"description":"The name of the Splunk HEC index where the event data will be stored. This field is optional.","example":"thousandeyes_otel_events_index","type":"string"}},"type":"object","$$ref":"#/components/schemas/ExporterConfigSplunkHec"}},"type":"object","$$ref":"#/components/schemas/ExporterConfig"},"auditOperation":{"properties":{"createdBy":{"description":"ID of the user who created the integration","example":3962,"format":"int64","type":"integer"},"createdDate":{"description":"Creation date of the integration","example":1679677853573,"format":"int64","type":"integer"},"updatedBy":{"description":"ID of the user who last updated the integration","example":3962,"format":"int64","nullable":true,"type":"integer"},"updatedDate":{"description":"Date of the last update to the integration","example":1679677853573,"format":"int64","nullable":true,"type":"integer"}},"type":"object","$$ref":"#/components/schemas/AuditOperationWithUpdate"}},"type":"object","$$ref":"#/components/schemas/GetStreamResponse"}}},"description":"Stream updated"},"204":{"description":"No content"},"400":{"content":{"application/problem+json":{"schema":{"properties":{"timestamp":{"example":1679677853573,"format":"int64","type":"integer"},"httpStatus":{"example":"BAD_REQUEST","type":"string"},"errors":{"items":{"example":"JSON parse error: invalid type","type":"string"},"type":"array"},"path":{"example":"https://api.thousandeyes.com/v7/stream","format":"url","type":"string"}},"type":"object","$$ref":"#/components/schemas/BadRequestError"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{"schema":{"properties":{"error":{"example":"invalid_token","type":"string"},"error_description":{"example":"Invalid access token","type":"string"}},"type":"object","$$ref":"#/components/schemas/UnauthorizedError"}}},"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{"schema":{"properties":{"timestamp":{"example":1679677853573,"format":"int64","type":"integer"},"status":{"example":500,"type":"integer"},"errors":{"example":"Internal Server Error","type":"string"},"path":{"example":"https://api.thousandeyes.com/v7/request/path","format":"url","type":"string"}},"type":"object","$$ref":"#/components/schemas/ApiError"}}},"description":"Internal Server Error"}},"summary":"Update data stream","tags":["Streaming"],"__originalOperationId":"updateStream","security":[{"BearerAuth":[]}],"method":"put","path":"/stream/{id}"}}