Import Timelines

POST /api/timeline/_import

Import Timelines.

application/json

Body Required

The Timelines to import as a readable stream.

  • Whether the Timeline should be immutable

    Values are true or false.

Responses

  • 200 application/json

    Indicates the import of Timelines was successful.

    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

        • 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

    • The amount of successfully imported/updated Timelines

    • The amount of successfully installed Timelines

    • The amount of successfully updated Timelines

  • 400 application/json

    Indicates the import of Timelines was unsuccessful because of an invalid file extension.

    Hide response attributes Show response attributes object
  • 404 application/json

    Indicates that we were unable to locate the saved object client necessary to handle the import.

    Hide response attributes Show response attributes object
  • 409 application/json

    Indicates the import of Timelines was unsuccessful.

    Hide response attributes Show response attributes object
POST /api/timeline/_import
curl \
 --request POST 'http://localhost:5622/api/timeline/_import' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"isImmutable":"true"}'
Request examples
{
  "isImmutable": "true"
}
Response examples (200)
{
  "errors": [
    {
      "error": {
        "message": "Malformed JSON",
        "status_code": 400
      },
      "id": "6ce1b592-84e3-4b4a-9552-f189d4b82075"
    }
  ],
  "success": true,
  "success_count": 99,
  "timelines_installed": 80,
  "timelines_updated": 19
}
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
}