Restore deleted attachment Technical Preview

POST /api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/_restore

Spaces method and path for this operation:

post /s/{space_id}/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/_restore

Refer to Spaces for more information.

Restore a soft-deleted attachment.

[Required authorization] Route required privileges: read_agent_builder.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • conversation_id string Required

    The unique identifier of the conversation.

  • attachment_id string Required

    The unique identifier of the attachment to restore.

Responses

  • 200 application/json

    Indicates a successful response

POST /api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/_restore
curl \
 --request POST 'https://<KIBANA_URL>/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/_restore' \
 --header "Authorization: $API_KEY" \
 --header "kbn-xsrf: true"
Response examples (200)
Example response returning the restored attachment
{
  "success": true,
  "attachment": {
    "id": "att-abc123",
    "type": "text",
    "active": true,
    "versions": [
      {
        "data": "Restored content",
        "version": 1,
        "created_at": "2025-01-06T10:00:00.000Z",
        "content_hash": "sha256-xyz",
        "estimated_tokens": 10
      }
    ],
    "description": "Restored attachment",
    "current_version": 1
  }
}