Agents
Links one or more existing analysis groups to the agent identified by agent_id in a single call. This establishes the many-to-many association so that, after each call, the agent runs the data collections defined by those analysis groups. The response returns one link_id per created link; record these to unlink later. The analysis groups must already exist — create them with POST /api/ext/analysis first.
curl --request POST \
--url 'https://api.nabrah.ai/api/ext/agent/<agent_id>/analysis_groups' \
--header 'X-API-Key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"analysis_group_ids": [
"018f3a2b-1111-7e1a-bf52-0a1b2c3d4e5f"
]
}'{
"link_ids": [
"00000000-0000-4000-8000-000000000000"
]
}Agents and analysis groups are created independently, then linked.
1) Create the agent (POST /api/ext/agent). 2) Create the analysis group (POST /api/ext/analysis). 3) Link them with this endpoint (or with POST /api/ext/analysis/{analysis_group_id}/agent(s) from the analysis side).
agent_id (path) comes from GET /api/ext/agent. Each value in analysis_group_ids comes from GET /api/ext/analysis.
Returns { "link_ids": [...] } — one ID per analysis group linked. Use any of these with DELETE /api/ext/analysis/link/{link_id} to remove that specific link.
link_idsX-API-KeystringheaderrequiredYour workspace API key. Create one in the dashboard under API keys.
agent_idstringrequiredUUID of the agent to attach analysis groups to.
Get this from GET /api/ext/agent or from the create-agent response (POST /api/ext/agent).
Link one analysis group to the agent.
{
"analysis_group_ids": [
"018f3a2b-1111-7e1a-bf52-0a1b2c3d4e5f"
]
}Successful Response
application/json
Validation Error
application/json