Skip to content
Zaraftis API
Esc
↑↓navigate↵open⌘Jpreview

Get a task

Returns the status of asynchronous work and references to what it produced. Every accepted scan, check, site audit, scan report, export, and connection sync returns a task_id and task_url that point here. Poll until the task reaches a terminal status.

GET/tasks/{task_id}
Authorization
AuthorizationBearer token · headerrequired

API key sent as Authorization: Bearer <key>. A key belongs to one workspace, has scopes, and can be limited to some brands.

or
AuthorizationOAuth2 access token · headerrequired

OAuth 2.1 sign-in (authorization code with PKCE) used by AI assistants that connect through the Zaraftis MCP server. Discovery URLs are at https://api.zaraftis.com/api/auth.

Path parameters
task_idstring<uuid>required
Responses
200

Task status (the status values include partial)

successbooleanrequired
dataTaskObjectrequired

The public task status shape served by GET /v1/tasks/{task_id} (and the task_id/task_url reference members carried by accepted scan, check, audit, report, and export responses). Status uses the shared vocabulary including partial; the error member is the safe {code,message} shape only, never vendor or task ids. Each operation populates only the reference pair (or integration snapshot arrays) matching it.

Show properties
task_idstring<uuid>required
matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
operationstringrequired
Allowed:scansite_auditsetup_generationreport_creationexportintegration_sync
statusstringrequired
Allowed:queuedrunningcompletedpartialfailedcancelled
progressobjectrequired
Show properties
requestedintegerrequired
min 0 · max 9007199254740991
completedintegerrequired
min 0 · max 9007199254740991
failedintegerrequired
min 0 · max 9007199254740991
errorobject | nullrequired
Show properties
Any of:
object
codestringrequired
min length 1
messagestringrequired
min length 1
null
null
timestampsobjectrequired
Show properties
created_atstringrequired
started_atstring | nullrequired
completed_atstring | nullrequired
scan_idstring<uuid> | nullrequired
Show properties
Any of:
string<uuid>
string<uuid>
null
null
scan_urlstring | nullrequired
site_audit_idstring<uuid> | nullrequired
Show properties
Any of:
string<uuid>
string<uuid>
null
null
site_audit_urlstring | nullrequired
report_idstring<uuid> | nullrequired
Show properties
Any of:
string<uuid>
string<uuid>
null
null
report_urlstring | nullrequired
export_idstring<uuid> | nullrequired
Show properties
Any of:
string<uuid>
string<uuid>
null
null
export_urlstring | nullrequired
integration_snapshot_idsstring<uuid>[]required
integration_snapshot_urlsstring[]required
request_idstringrequired
min length 1
404

not_found: unknown id, or an id this key cannot see

successbooleanrequired
errorobjectrequired
Show properties
codestringrequired
messagestringrequired
retryablebooleanrequired
detailsobject
field_errorsobject[]
Show properties
Array of object
fieldstringrequired
codestringrequired
Allowed:requiredformattoo_smalltoo_largeunrecognized_keyinvalid
messagestringrequired
request_idRequestIdrequired
Request
curl -X GET 'https://api.zaraftis.com/v1/tasks/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "success": true,
  "data": {
    "task_id": "736fde4d-9029-4915-8189-01353d6982cb",
    "operation": "scan",
    "status": "queued",
    "progress": {
      "requested": 0,
      "completed": 0,
      "failed": 0
    },
    "error": {
      "code": "string",
      "message": "string"
    },
    "timestamps": {
      "created_at": "string",
      "started_at": "string",
      "completed_at": "string"
    },
    "scan_id": "9a59f0f5-5572-476d-a7fc-c960ef43a5af",
    "scan_url": "string",
    "site_audit_id": "f1a556fb-6cd6-4489-93d7-27a576f86eea",
    "site_audit_url": "string",
    "report_id": "5ed7905a-4735-4cf7-b1ab-521e066fb971",
    "report_url": "string",
    "export_id": "a9a55f8d-48b1-4a5b-a88e-c41b0cd75102",
    "export_url": "string",
    "integration_snapshot_ids": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "integration_snapshot_urls": [
      "string"
    ]
  },
  "request_id": "string"
}

Was this page helpful?