PATCH /api/timeline/_favorite

Spaces method and path for this operation:

patch /s/{space_id}/api/timeline/_favorite

Refer to Spaces for more information.

Favorite a Timeline or Timeline template for the current user.

application/json

Body Required

The required fields used to favorite a (template) Timeline.

  • templateTimelineId string | null Required
  • templateTimelineVersion number | null Required
  • timelineId string | null Required
  • timelineType string Required

    The type of Timeline.

    Values are default or template.

Responses

  • 200 application/json

    Indicates a successful call.

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

      Indicates when and who marked a Timeline as a favorite.

      • favoriteDate number | null
      • fullName string | null
      • userName string | null
    • savedObjectId string Required
    • templateTimelineId string | null
    • templateTimelineVersion number | null
    • timelineType string

      The type of Timeline.

      Values are default or template.

    • version string Required
  • 403 application/json

    Indicates the user does not have the required permissions to persist the favorite status.

    Hide response attributes Show response attributes object
    • body string
    • statusCode number
PATCH /api/timeline/_favorite
curl \
 --request PATCH 'https://localhost:5601/api/timeline/_favorite' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"templateTimelineId":null,"templateTimelineVersion":null,"timelineId":"15c1929b-0af7-42bd-85a8-56e234cc7c4e","timelineType":"default"}'
Request example
{
  "templateTimelineId": null,
  "templateTimelineVersion": null,
  "timelineId": "15c1929b-0af7-42bd-85a8-56e234cc7c4e",
  "timelineType": "default"
}
Response examples (200)
{
  "favorite": [
    {
      "favoriteDate": 1741337636741,
      "userName": "elastic"
    }
  ],
  "savedObjectId": "15c1929b-0af7-42bd-85a8-56e234cc7c4e",
  "timelineType": "default",
  "version": "WzE2LDFd"
}
Response examples (403)
{
  "body": "Forbidden",
  "statusCode": 403
}