Anomaly Detection Streams API
The streams API from Anomaly Detection — 3 operation(s) for streams.
The streams API from Anomaly Detection — 3 operation(s) for streams.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/anomaly-detection:anomaly-detection-streams-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Elasticsearch Streams API
license:
name: Apache 2.0
url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
version: ''
description: 'Elasticsearch provides REST APIs that are used by the UI components and can be called directly to configure and access Elasticsearch features.
## Documentation source and versions
This documentation is derived from the `main` branch of the elasticsearch-specification repository. It is provided under license Attribution-NonCommercial-NoDerivatives 4.0 International.
This documentation contains work-in-progress information for future Elastic Stack releases.'
x-doc-license:
name: Attribution-NonCommercial-NoDerivatives 4.0 International
url: https://creativecommons.org/licenses/by-nc-nd/4.0/
x-feedbackLink:
label: Feedback
url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
security:
- apiKeyAuth: []
- basicAuth: []
- bearerAuth: []
tags:
- name: Streams
x-displayName: Streams
paths:
/_streams/{name}/_disable:
post:
tags:
- Streams
summary: Disable a named stream
description: 'Turn off the named stream feature for this cluster.
## Required authorization
* Cluster privileges: `manage`'
operationId: streams-logs-disable
parameters:
- in: path
name: name
description: "The stream type to disable.\n\nSupported values include:\n - `logs`: The logs stream type.\n - `logs.otel`: The logs.otel stream type, meant for OTel-formatted data.\n - `logs.ecs`: The logs.ecs stream type, meant for ECS-formatted data.\n\n"
required: true
deprecated: false
schema:
$ref: '#/components/schemas/streams._types.StreamType'
style: simple
- in: query
name: master_timeout
description: 'The period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.'
deprecated: false
schema:
default: 30s
allOf:
- $ref: '#/components/schemas/_types.Duration'
style: form
- in: query
name: timeout
description: 'The period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.'
deprecated: false
schema:
default: 30s
allOf:
- $ref: '#/components/schemas/_types.Duration'
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/_types.AcknowledgedResponseBase'
examples:
PostStreamsLogsDisableResponseExample1:
summary: Disable logs.otel streams
description: 'A successful response from `POST _streams/logs.otel/_disable` endpoint
'
value: "{\n \"acknowledged\": true\n}"
x-state: Experimental; Added in 9.1.0
x-codeSamples:
- lang: Console
source: 'POST _streams/logs.otel/_disable
'
- lang: Python
source: "resp = client.streams.logs_disable(\n name=\"logs.otel\",\n)"
- lang: JavaScript
source: "const response = await client.streams.logsDisable({\n name: \"logs.otel\",\n});"
- lang: Ruby
source: "response = client.streams.logs_disable(\n name: \"logs.otel\"\n)"
- lang: PHP
source: "$resp = $client->streams()->logsDisable([\n \"name\" => \"logs.otel\",\n]);"
- lang: curl
source: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_streams/logs.otel/_disable"'
- lang: C#
source: 'var response = await client.Streams.LogsDisableAsync(name: StreamType.LogsOtel);'
- lang: Java
source: 'client.streams().logsDisable(l -> l);
'
x-metaTags:
- content: Elasticsearch
name: product_name
/_streams/{name}/_enable:
post:
tags:
- Streams
summary: Enable a named stream
description: 'Turn on the named stream feature for this cluster.
NOTE: To protect existing data, this feature can be turned on only if the cluster does not have
existing indices or data streams that match the pattern `|.*` for the enabled stream
type name. If those indices or data streams exist, a `409 - Conflict` response and error is
returned.
## Required authorization
* Cluster privileges: `manage`'
operationId: streams-logs-enable
parameters:
- in: path
name: name
description: "The stream type to enable.\n\nSupported values include:\n - `logs`: The logs stream type.\n - `logs.otel`: The logs.otel stream type, meant for OTel-formatted data.\n - `logs.ecs`: The logs.ecs stream type, meant for ECS-formatted data.\n\n"
required: true
deprecated: false
schema:
$ref: '#/components/schemas/streams._types.StreamType'
style: simple
- in: query
name: master_timeout
description: 'The period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.'
deprecated: false
schema:
default: 30s
allOf:
- $ref: '#/components/schemas/_types.Duration'
style: form
- in: query
name: timeout
description: 'The period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.'
deprecated: false
schema:
default: 30s
allOf:
- $ref: '#/components/schemas/_types.Duration'
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/_types.AcknowledgedResponseBase'
examples:
PostStreamsEnableResponseExample1:
summary: Enable logs streams
description: 'A successful response from `POST _streams/logs.otel/_enable` endpoint
'
value: "{\n \"acknowledged\": true\n}"
x-state: Experimental; Added in 9.1.0
x-codeSamples:
- lang: Console
source: 'POST _streams/logs.otel/_enable
'
- lang: Python
source: "resp = client.streams.logs_enable(\n name=\"logs.otel\",\n)"
- lang: JavaScript
source: "const response = await client.streams.logsEnable({\n name: \"logs.otel\",\n});"
- lang: Ruby
source: "response = client.streams.logs_enable(\n name: \"logs.otel\"\n)"
- lang: PHP
source: "$resp = $client->streams()->logsEnable([\n \"name\" => \"logs.otel\",\n]);"
- lang: curl
source: 'curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_streams/logs.otel/_enable"'
- lang: C#
source: 'var response = await client.Streams.LogsEnableAsync(name: StreamType.LogsOtel);'
- lang: Java
source: 'client.streams().logsEnable(l -> l);
'
x-metaTags:
- content: Elasticsearch
name: product_name
/_streams/status:
get:
tags:
- Streams
summary: Get the status of streams
description: 'Get the current status for all types of streams.
## Required authorization
* Cluster privileges: `monitor`'
operationId: streams-status
parameters:
- in: query
name: master_timeout
description: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
deprecated: false
schema:
default: 30s
allOf:
- $ref: '#/components/schemas/_types.Duration'
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
logs:
allOf:
- $ref: '#/components/schemas/streams.status.StreamStatus'
logs.otel:
allOf:
- $ref: '#/components/schemas/streams.status.StreamStatus'
logs.ecs:
allOf:
- $ref: '#/components/schemas/streams.status.StreamStatus'
required:
- logs
- logs.otel
- logs.ecs
examples:
GetStreamsStatusResponseExample1:
summary: Get Streams Status A successful response from `GET _streams/status` that outlines the current state of all wired streams in the cluster.
value: "{\n \"logs\": {\n \"enabled\": false\n }\n \"logs.ecs\": {\n \"enabled\": true\n }\n \"logs.otel\": {\n \"enabled\": true\n }\n}"
x-state: Experimental; Added in 9.1.0
x-codeSamples:
- lang: Console
source: 'GET _streams/status
'
- lang: Python
source: resp = client.streams.status()
- lang: JavaScript
source: const response = await client.streams.status();
- lang: Ruby
source: response = client.streams.status
- lang: PHP
source: $resp = $client->streams()->status();
- lang: curl
source: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_streams/status"'
- lang: C#
source: var response = await client.Streams.StatusAsync();
- lang: Java
source: 'client.streams().status(s -> s);
'
x-metaTags:
- content: Elasticsearch
name: product_name
components:
schemas:
streams._types.StreamType:
type: string
enum:
- logs
- logs.otel
- logs.ecs
streams.status.StreamStatus:
type: object
properties:
enabled:
description: If true, the stream feature is enabled.
type: boolean
required:
- enabled
_types.AcknowledgedResponseBase:
type: object
properties:
acknowledged:
description: For a successful response, this value is always true. On failure, an exception is returned instead.
type: boolean
required:
- acknowledged
_types.Duration:
externalDocs:
url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/api-conventions#time-units
description: 'A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
`d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.'
type: string
securitySchemes:
apiKeyAuth:
in: header
name: Authorization
type: apiKey
description: "Elasticsearch APIs support key-based authentication.\nYou must create an API key and use the encoded value in the request header.\nFor example:\n\n\n```\ncurl -X GET \"${ES_URL}/_cat/indices?v=true\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n```\n\nTo get API keys, use the `/_security/api_key` APIs.\n"
basicAuth:
scheme: basic
type: http
bearerAuth:
scheme: bearer
type: http
description: 'Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
For examples, refer to [Token-based authentication services](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/token-based-authentication-services)
'
x-provenance:
method: harvested
publisher: Anomaly Detection
source: https://www.elastic.co/docs/api/doc/elasticsearch/group/elasticsearch-openapi-source.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)