# Integration Jobs

Integration job events are the lowest-level execution records in Veza Lifecycle Management. Each job event represents a single call to an integration agent—for example, creating a user in Active Directory, adding a group membership in Okta, or sending a webhook to ServiceNow.

These APIs correspond to the **Integration Jobs** tab on the [Activity Log](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/getting-started/activity-log.md) page in the Veza UI.

**Integration Job APIs** help you:

* Debug integration-level failures with full request/response payloads
* Track which specific agent calls succeeded or failed
* Push results back from webhook-based integrations
* Export job event data for compliance and troubleshooting

## Endpoints

| Method | Endpoint                                | Description                                                   |
| ------ | --------------------------------------- | ------------------------------------------------------------- |
| GET    | [List Job Events](#list-job-events)     | Retrieve a paginated list of integration job events           |
| GET    | [Get Job Event](#get-job-event)         | Retrieve a single job event with full request/result payloads |
| POST   | [Export Job Events](#export-job-events) | Export job events to a downloadable file                      |
| POST   | [Push Job Result](#push-job-result)     | Push a result back from a webhook-based integration           |

## Key Concepts

### Job Request and Result

Each job event can include detailed request and result payloads:

* **JobRequest**: Contains the target data source configuration, input entities, action type, and action-specific configuration
* **JobResult**: Contains the job outcome including output entities, error messages, and flags indicating whether changes were made

Use `details=true` on the List endpoint or the Get endpoint to retrieve these payloads.

### Event Source

The `event_source` field indicates what initiated the job:

| Value         | Description                                 |
| ------------- | ------------------------------------------- |
| `POLICY`      | Job was triggered by an LCM Policy workflow |
| `ACCESS_PLAN` | Job was triggered by an Access Plan         |

## List Job Events

### Endpoint

```sh
GET /api/private/lifecycle_management/action_job_events
```

### Description

Retrieve a paginated list of integration job events. Set the `details` query parameter to `true` to include the full job request and result payloads in the response.

### Filterable Fields

| Field                   | Operators      | Description                             |
| ----------------------- | -------------- | --------------------------------------- |
| `state`                 | eq             | Current execution state                 |
| `job_id`                | eq, co         | Job ID                                  |
| `policy_task`           | eq             | Parent workflow task ID                 |
| `action_name`           | eq, co         | Action name (case-insensitive)          |
| `action_type`           | eq             | Type of action executed                 |
| `policy_id`             | eq             | Policy ID                               |
| `workflow_name`         | eq, co         | Workflow name                           |
| `identity_id`           | eq, co, sw, ew | Identity ID                             |
| `identity_name`         | eq, co, sw, ew | Identity name                           |
| `event_source`          | eq             | Source (POLICY or ACCESS\_PLAN)         |
| `event_source_id`       | eq             | Source ID (policy ID or access plan ID) |
| `extraction_event`      | eq             | Extraction event ID                     |
| `extraction_event_type` | eq, ne         | Extraction type (case-insensitive)      |
| `started_at`            | gt, ge, lt, le | Job start time                          |
| `completed_at`          | gt, ge, lt, le | Job completion time                     |
| `created_at`            | gt, ge, lt, le | Job creation time                       |
| `any_changes`           | eq             | Whether the job made any changes        |
| `events_created`        | eq             | Number of events produced               |

### API Reference

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/private/lifecycle\_management/action\_job\_events" method="get" %}
[openapi.yaml](https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-f5344805587160cf141bde637e04e03e2aa86778%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Request Examples

**List errored jobs with details:**

```bash
curl -X GET "https://your-tenant.vezacloud.com/api/private/lifecycle_management/action_job_events?filter=state%20eq%20%22ERRORED%22&details=true&page_size=50" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

**List jobs for a specific workflow task:**

```bash
curl -X GET "https://your-tenant.vezacloud.com/api/private/lifecycle_management/action_job_events?filter=policy_task%20eq%20%22task-abc-123%22" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Get Job Event

### Endpoint

```sh
GET /api/private/lifecycle_management/action_job_events/{job_id}
```

### Description

Retrieve a single job event by its job ID. The response always includes the full `request` and `result` payloads, providing complete visibility into what was sent to the integration agent and what came back.

### API Reference

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/private/lifecycle\_management/action\_job\_events/{job\_id}" method="get" %}
[openapi.yaml](https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-f5344805587160cf141bde637e04e03e2aa86778%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Request Example

```bash
curl -X GET "https://your-tenant.vezacloud.com/api/private/lifecycle_management/action_job_events/job-abc-123" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Export Job Events

### Endpoint

```sh
POST /api/private/lifecycle_management/action_job_events:export
```

### Description

Export integration job events matching a filter to a downloadable CSV file.

### API Reference

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/private/lifecycle\_management/action\_job\_events:export" method="post" %}
[openapi.yaml](https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-f5344805587160cf141bde637e04e03e2aa86778%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Request Example

```bash
curl -X POST "https://your-tenant.vezacloud.com/api/private/lifecycle_management/action_job_events:export" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "body": {
      "filter": "state eq \"ERRORED\" and action_type eq \"SYNC_IDENTITIES\"",
      "order_by": "completed_at desc"
    },
    "format": "CSV"
  }'
```

## Push Job Result

### Endpoint

```sh
POST /api/private/lifecycle_management/action_job_events/{job_id}:push
```

### Description

Push a job result back to Veza after an external integration has completed processing. This endpoint is used by **webhook-based integrations** (such as ServiceNow, custom REST actions, or any integration using the `SEND_REST_PAYLOAD` action type) that receive job requests via webhook and must report results asynchronously.

{% hint style="info" %}
**Integration requirement**: The webhook payload sent to your external system includes a `return_post_url` field. Your system should POST the result to that URL, which routes to this endpoint.
{% endhint %}

{% hint style="warning" %}
**Requires admin, operator, or oaa\_push role.**
{% endhint %}

### API Reference

{% openapi src="/files/Aco9gj4MY2XoNiD4zIjr" path="/api/private/lifecycle\_management/action\_job\_events/{job\_id}:push" method="post" %}
[openapi.yaml](https://1967633068-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZDkWMxox3pekd0NsZJ%2Fuploads%2Fgit-blob-f5344805587160cf141bde637e04e03e2aa86778%2Fopenapi.yaml?alt=media)
{% endopenapi %}

### Request Example

```bash
curl -X POST "https://your-tenant.vezacloud.com/api/private/lifecycle_management/action_job_events/job-abc-123:push" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "value": {
      "job_id": "job-abc-123",
      "action_type": "SEND_REST_PAYLOAD",
      "output_entities": [],
      "any_changes": true,
      "any_created": false
    }
  }'
```

## Authentication

All Integration Job API requests require authentication. See [API Authentication](/4yItIzMvkpAvMVFAamTf/developers/api/authentication.md) for details.

## Related Documentation

* [Activity Log](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/getting-started/activity-log.md)
* [Conditions and Actions](/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/policies-workflows/actions.md)
* [Triggered Workflows](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/triggeredworkflows.md)
* [Workflow Actions](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/workflowactions.md)
* [Events](/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/events.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/lifecycle-management/activitylog/integrationjobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
