Export stream content Experimental; added in 9.1.0

POST /api/streams/{name}/content/export

Spaces method and path for this operation:

post /s/{space_id}/api/streams/{name}/content/export

Refer to Spaces for more information.

Exports a content pack with the stream structure (routing, mappings, and processing). Significant-event queries are not included; manage them via the /api/streams/{name}/queries endpoints.

[Required authorization] Route required privileges: manage_stream.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • name string Required

    The name of the stream to export content from.

application/json

Body

  • description string Required
  • include object Required

    Any of:
  • name string Required
  • version string Required

Responses

  • 200

    Content pack archive for the stream.

POST /api/streams/{name}/content/export
curl \
 --request POST 'https://localhost:5601/api/streams/{name}/content/export' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '"{\n  \"description\": \"Nginx stream content pack\",\n  \"include\": {\n    \"objects\": {\n      \"all\": {}\n    }\n  },\n  \"name\": \"nginx-pack\",\n  \"version\": \"1.0.0\"\n}"'
Request example
{
  "description": "Nginx stream content pack",
  "include": {
    "objects": {
      "all": {}
    }
  },
  "name": "nginx-pack",
  "version": "1.0.0"
}