POST /api/timeline/_import

Spaces method and path for this operation:

post /s/{space_id}/api/timeline/_import

Refer to Spaces for more information.

Import Timelines.

application/json

Body Required

The Timelines to import as a readable stream.

  • isImmutable string

    Whether the Timeline should be immutable

    Values are true or false.

Responses

  • 200 application/json

    Indicates a successful call.

    Hide response attributes Show response attributes object
    • errors array[object]

      The list of failed Timeline imports

      Hide errors attributes Show errors attributes object
      • error object

        The error containing the reason why the timeline could not be imported

        Hide error attributes Show error attributes object
        • message string

          The reason why the timeline could not be imported

        • status_code number

          The HTTP status code of the error

      • id string

        The ID of the timeline that failed to import

    • success boolean

      Indicates whether any of the Timelines were successfully imports

    • success_count number

      The amount of successfully imported/updated Timelines

    • timelines_installed number

      The amount of successfully installed Timelines

    • timelines_updated number

      The amount of successfully updated Timelines

  • 400 application/json

    Bad Request response.

    Hide response attributes Show response attributes object
    • body string

      The error message

    • statusCode number
  • 404 application/json

    Not found response.

    Hide response attributes Show response attributes object
    • body string

      The error message

    • statusCode number
  • 409 application/json

    Indicates the import of Timelines was unsuccessful.

    Hide response attributes Show response attributes object
    • body string

      The error message

    • statusCode number
POST /api/timeline/_import
curl \
 --request POST 'https://<KIBANA_URL>/api/timeline/_import' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"file":"{\"savedObjectId\":\"15c1929b-0af7-42bd-85a8-56e234cc7c4e\",\"version\":\"WzE0LDFd\"}\\n","isImmutable":"false"}'
Request example
{
  "file": "{\"savedObjectId\":\"15c1929b-0af7-42bd-85a8-56e234cc7c4e\",\"version\":\"WzE0LDFd\"}\\n",
  "isImmutable": "false"
}
Response examples (200)
{
  "errors": [],
  "success": true,
  "success_count": 5,
  "timelines_installed": 3,
  "timelines_updated": 2
}
Response examples (400)
{
  "body": "Invalid file extension",
  "statusCode": 400
}
Response examples (404)
{
  "body": "Unable to find saved object client",
  "statusCode": 404
}
Response examples (409)
{
  "body": "Could not import timelines",
  "statusCode": 409
}