Spaces method and path for this operation:
put /s/{space_id}/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/origin
Refer to Spaces for more information.
Update the origin reference for an attachment. Use this after saving a by-value attachment to link it to its persistent store.
[Required authorization] Route required privileges: agentBuilder:read.
Path parameters
-
The unique identifier of the conversation.
-
The unique identifier of the attachment to update.
PUT
/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/origin
curl \
--request PUT 'https://<KIBANA_URL>/api/agent_builder/conversations/{conversation_id}/attachments/{attachment_id}/origin' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"origin":"abc123"}'
Request example
Example request for linking an attachment to a saved visualization
{
"origin": "abc123"
}
Response examples (200)
Example response returning the attachment with updated origin
{
"success": true,
"attachment": {
"id": "att-123",
"type": "visualization",
"active": true,
"origin": "abc123",
"versions": [
{
"data": {
"esql": "FROM sales | STATS count=COUNT(*) BY month",
"query": "Show monthly sales",
"chart_type": "bar",
"visualization": {}
},
"version": 1,
"created_at": "2025-01-06T10:00:00.000Z",
"content_hash": "sha256-xyz",
"estimated_tokens": 50
}
],
"description": "Sales chart",
"current_version": 1
}
}