Migrate from Integration Endpoints to Conversations (Alfresco)
The /integrations endpoints are disabled (CIN-20059) and return 404 Not Found. They are no longer published in the OpenAPI documentation. Migrate to the standard conversation endpoints described below.
This guide helps teams currently using the integration endpoints (single-shot + polling) migrate to the standard conversation endpoints (synchronous response, multi-turn ready).
Why migrate?
- No polling: the conversation endpoints return the answer synchronously.
- No service user: the integration “service-to-service” model (with an external user passed explicitly) is removed.
- Future-proof: conversations enable multi-turn, richer context, and improvements that won’t land in the legacy integration flow.
Quick mapping (old → new)
Base URL note: examples below use
{{baseUrl}}/agent/...for Agent API and{{baseUrl}}/qna/...for QnA API.
| Workflow step | Integration flow (legacy) | Conversation flow (standard) | Notes |
|---|---|---|---|
| Get agents by source ID | GET /agent/integrations/agents?sourceId={sourceId} | GET /agent/agents?sourceId={sourceId} | In the standard endpoint, sourceId is optional, but you should keep it to preserve scoping. |
| Get agent by ID | GET /agent/integrations/agents/{agentId} | GET /agent/agents/{agentId} | Response shape is the same (agent configuration). |
| Submit question | POST /agent/integrations/agents/{agentId}/questions | POST /qna/agents/{agentId}/conversations | Standard flow returns the first message (question + answer) immediately. |
| Poll for answer | GET /qna/integrations/questions/{questionId}/answer?userId={externalUserId} | Removed | Polling is replaced by synchronous response from POST /conversations. |
| Flow | Hxp-App | Required token scope |
|---|---|---|
| Integration (legacy) | hxai-discovery | hxp.integrations iam.jti-capture |
| Agent and Conversation | cin-ece-kd | hxp |
The Agent endpoints in the new flow target ECE-powered Knowledge Discovery, so they use cin-ece-kd. Agent management and Agent discovery paths are shared by both implementations; legacy Knowledge Discovery continues to use hxai-discovery and the hxp iam.jti-capture scopes for those paths. ECE-powered Agent and Conversation APIs do not require iam.jti-capture.
Step-by-step migration
Step 1 — List agents by sourceId
- HTTP
- curl
GET {{baseUrl}}/agent/agents?sourceId={{sourceId}}
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: cin-ece-kd
SOURCE_ID="550e8400-e29b-41d4-a716-446655440000"
curl -X GET "${DISCOVERY_API_BASE_URL}/agent/agents?sourceId=${SOURCE_ID}" \
-H "Authorization: Bearer ${DISCOVERY_ACCESS_TOKEN}" \
-H "Hxp-Environment: ${ENVIRONMENT_KEY}" \
-H "Hxp-App: cin-ece-kd"
Response (example)
[
{
"id": "a3dbf6e1-3b89-4caa-9b16-0cfa1b1d5d5f",
"name": "Alfresco Discovery Agent",
"description": "Answers questions using Alfresco content",
"modelName": "amazon.nova-micro-v1:0",
"version": 3,
"latest": true,
"sourceIds": ["550e8400-e29b-41d4-a716-446655440000"],
"accessRights": [
{ "id": "<user-id>", "type": "User" },
{ "id": "<user-group-id>", "type": "UserGroup" }
]
}
]
Step 2 — Get agent by ID
- HTTP
- curl
GET {{baseUrl}}/agent/agents/{{agentId}}
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: cin-ece-kd
AGENT_ID="a3dbf6e1-3b89-4caa-9b16-0cfa1b1d5d5f"
curl -X GET "${DISCOVERY_API_BASE_URL}/agent/agents/${AGENT_ID}" \
-H "Authorization: Bearer ${DISCOVERY_ACCESS_TOKEN}" \
-H "Hxp-Environment: ${ENVIRONMENT_KEY}" \
-H "Hxp-App: cin-ece-kd"
Response (example)
{
"id": "a3dbf6e1-3b89-4caa-9b16-0cfa1b1d5d5f",
"name": "Alfresco Discovery Agent",
"description": "Answers questions using Alfresco content",
"modelName": "amazon.nova-micro-v1:0",
"version": 3,
"latest": true,
"sourceIds": ["550e8400-e29b-41d4-a716-446655440000"],
"accessRights": [
{ "id": "<user-id>", "type": "User" },
{ "id": "<user-group-id>", "type": "UserGroup" }
],
"staticFilterExpression": null,
"dynamicFilterTemplate": null,
"knowledgeGraphId": null
}
Step 3 — Submit question by starting a conversation (synchronous)
This is the key migration step: replace POST /integrations/.../questions + polling with a single POST /conversations call.
Request
- HTTP
- curl
POST {{baseUrl}}/qna/agents/{{agentId}}/conversations
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: cin-ece-kd
Content-Type: application/json
{
"question": "What is the status of my latest order?",
"contextObjectIds": [
"123e4567-e89b-12d3-a456-426614174000"
]
}
AGENT_ID="a3dbf6e1-3b89-4caa-9b16-0cfa1b1d5d5f"
curl -X POST "${DISCOVERY_API_BASE_URL}/qna/agents/${AGENT_ID}/conversations" \
-H "Authorization: Bearer ${DISCOVERY_ACCESS_TOKEN}" \
-H "Hxp-Environment: ${ENVIRONMENT_KEY}" \
-H "Hxp-App: cin-ece-kd" \
-H "Content-Type: application/json" \
-d '{
"question": "What is the status of my latest order?",
"contextObjectIds": ["123e4567-e89b-12d3-a456-426614174000"]
}'
Response
You get both the new conversation metadata and the first message.
{
"conversation": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Conversation",
"description": null,
"lastModified": "2026-04-07T10:30:00Z"
},
"message": {
"id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
"question": "What is the status of my latest order?",
"answer": "Based on the documents, your latest order is currently processing.",
"status": "Answered",
"agentVersion": 3,
"dateCreated": "2026-04-07T10:30:00Z",
"dateAnswered": "2026-04-07T10:30:02Z",
"documentReferences": [],
"graphDocumentReferences": [],
"feedback": null,
"staticFilter": null,
"dynamicFilter": null
}
}
(Optional) Step 4 — Multi-turn follow-up questions
If you previously used the integrations flow for single-shot only, you can stop at Step 3.
If you want multi-turn follow-ups, call ContinueConversation with the conversationId returned from Step 3.
- HTTP
- curl
POST {{baseUrl}}/qna/agents/{{agentId}}/conversations/{{conversationId}}/messages
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: cin-ece-kd
Content-Type: application/json
{
"question": "Can you summarize the last update?",
"contextObjectIds": []
}
curl -X POST "${DISCOVERY_API_BASE_URL}/qna/agents/${AGENT_ID}/conversations/${CONVERSATION_ID}/messages" \
-H "Authorization: Bearer ${DISCOVERY_ACCESS_TOKEN}" \
-H "Hxp-Environment: ${ENVIRONMENT_KEY}" \
-H "Hxp-App: cin-ece-kd" \
-H "Content-Type: application/json" \
-d '{
"question": "Can you summarize the last update?",
"contextObjectIds": []
}'
Before vs. after (legacy integrations → conversations)
Before: submit + poll
1) Submit a single-shot question (integration flow)
POST {{baseUrl}}/agent/integrations/agents/{{agentId}}/questions
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: hxai-discovery
Content-Type: application/json
{
"question": "What is the status of my latest order?",
"userId": "12345678-90ab-cdef-1234-567890abcdef",
"contextObjectIds": [
"123e4567-e89b-12d3-a456-426614174000"
]
}
Response (202 Accepted)
{ "questionId": "550e8400-e29b-41d4-a716-446655440000" }
2) Poll for the answer (integration flow)
GET {{baseUrl}}/qna/integrations/questions/{{questionId}}/answer?userId={{externalUserId}}
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: hxai-discovery
After: single synchronous call
Replace both calls above with:
POST {{baseUrl}}/qna/agents/{{agentId}}/conversations
Authorization: Bearer {{accessToken}}
Hxp-Environment: {{environmentKey}}
Hxp-App: cin-ece-kd
Content-Type: application/json
{
"question": "What is the status of my latest order?",
"contextObjectIds": ["123e4567-e89b-12d3-a456-426614174000"]
}
The 200 OK response contains the answer immediately (see Step 3 response example).
Auth differences (what changes for Alfresco)
Integration flow (legacy)
- Uses
Hxp-App: hxai-discoveryand requires thehxp.integrations iam.jti-capturetoken scopes. - Uses a service user and passes an external user identity explicitly (e.g.
externalUserIdin the integration request, andexternalUserIdquery parameter when fetching answers). - Used to support polling for the answer.
Conversation flow (standard)
- Uses
Hxp-App: cin-ece-kdand requires only thehxptoken scope. Theiam.jti-capturescope is not required. - No service user requirement.
- User identity is taken from the JWT token — no
userId/externalUserIdparameter in the API contract.
Code change checklist (consumer-side)
- Replace
/agent/integrations/agentswith/agent/agents. - Replace
/agent/integrations/agents/{agentId}/questionswith/qna/agents/{agentId}/conversations. - Change
Hxp-Appfromhxai-discoverytocin-ece-kdand request only thehxptoken scope. - Remove polling logic (drop
GET /qna/integrations/questions/{id}/answer). - Stop sending
userIdin the request body; use the real user token instead. - (Optional) store
conversationIdand use it for follow-up messages.