SDK reference
Agents
GET/
Devices, pending network requests and recent jobs.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/agents' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Renames a device or changes its network mode and host allowlist.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/devices/{deviceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"networkMode": "allowlist",
"hosts": [
"example"
],
"name": "Example"
}'DELETE/
Revokes a device. Its credential stops working on the next request.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/devices/{deviceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Answers a device's request for a host. Approving adds the host to the device's allowlist.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/requests/{deviceId}/{host}/{decision}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Queues a job. The first eligible device that polls claims it.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/jobs' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"type": "http.batch",
"input": {}
}'GET/
A job's status, with a temporary resultsUrl once it's done.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/jobs/{jobId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Cancels a queued job, or asks the device running it to stop (canceling until it does).
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/jobs/{jobId}/cancel' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
For a queued job a device can't run: files network requests for the hosts it lacks and emails the device's owner what else it needs (capability, full network access). Nothing changes until someone approves.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/agents/jobs/{jobId}/request-access' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"deviceId": "<deviceId>"
}'