Skip to content

Jobs Endpoints

The Jobs API provides endpoints for monitoring background tasks such as data synchronization, role generation, and policy analysis.

Base URL

All endpoints are relative to /api/v1/jobs.


List Jobs

Retrieve a list of background jobs with optional filtering.

http
GET /api/v1/jobs

::: note Administrator Only This endpoint requires Administrator role. :::

Query Parameters

ParameterTypeDescription
job_typestringFilter by job type
statusstringFilter by status (pending, running, completed, failed, cancelled)
start_datestringFilter jobs started after this date (ISO 8601)
end_datestringFilter jobs started before this date (ISO 8601)
firstnumberNumber of items to return
afterstringCursor for pagination

Response

json
{
  "jobs": [
    {
      "id": "job-123",
      "job_type": "full_sync",
      "status": "completed",
      "progress": 100,
      "start_time": "2024-02-01T10:00:00Z",
      "end_time": "2024-02-01T10:15:00Z",
      "duration_ms": 900000,
      "records_created": 150,
      "records_updated": 45,
      "records_deleted": 10
    }
  ],
  "pageInfo": {
    "hasNextPage": true,
    "endCursor": "cursor-token"
  }
}

Get Job

Retrieve details for a specific job.

http
GET /api/v1/jobs/{id}

::: note Administrator Only This endpoint requires Administrator role. :::

Path Parameters

ParameterTypeDescription
idstringJob ID

Response

Returns the complete job object with all details.


Get Job Progress

Retrieve real-time progress for a running job.

http
GET /api/v1/jobs/{id}/progress

::: note Administrator Only This endpoint requires Administrator role. :::

Path Parameters

ParameterTypeDescription
idstringJob ID

Response

json
{
  "id": "job-123",
  "status": "running",
  "progress": 65,
  "current_step": "Processing accounts",
  "records_processed": 650,
  "total_records": 1000,
  "elapsed_ms": 45000
}

Cancel Job

Cancel a running job.

http
DELETE /api/v1/jobs/{id}

::: note Administrator Only This endpoint requires Administrator role. :::

Path Parameters

ParameterTypeDescription
idstringJob ID

Response

Returns 204 No Content on success.

Partial Results

Cancelling a job mid-process may result in partial data. Records already processed will remain in the system.


Get Running Jobs

Retrieve all currently running jobs.

http
GET /api/v1/jobs/running

::: note Administrator Only This endpoint requires Administrator role. :::

Response

json
{
  "jobs": [
    {
      "id": "job-123",
      "job_type": "account_sync",
      "status": "running",
      "progress": 45,
      "start_time": "2024-02-01T10:00:00Z"
    }
  ]
}

Job Types

Job TypeDescription
full_syncComplete synchronization of all entity types
incremental_syncSync only changes since last sync
account_syncSynchronize accounts only
owner_syncSynchronize owners only
group_syncSynchronize groups only
application_syncSynchronize applications only
role_generationGenerate roles from owner attributes
policy_analysisAnalyze roles against policies
manager_resolutionResolve manager hierarchies
enrichmentData enrichment operations

Job Statuses

StatusDescription
pendingJob queued, waiting to start
runningJob currently executing
completedJob finished successfully
failedJob encountered an error
cancelledJob stopped by user

Error Responses

Status CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
404Not Found - Job does not exist
500Internal Server Error

Hydden Documentation and Training Hub