> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.9/api-integrations/connectors-management-apis/events.md).

# Events

## List events for a job

> Returns the events associated with a job. If the job has no events, the response contains an empty list.\
> \
> Requires the \*\*'Execute structure profiling'\*\* permission. The check is global: the caller must hold the permission in at least one domain. Administrators and service accounts are always allowed.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.11.0"},"paths":{"/api/jobs/{job_external_id}/events":{"get":{"description":"Returns the events associated with a job. If the job has no events, the response contains an empty list.\n\nRequires the **'Execute structure profiling'** permission. The check is global: the caller must hold the permission in at least one domain. Administrators and service accounts are always allowed.\n","operationId":"TdCxWeb.EventController.index","parameters":[{"description":"Job external ID","in":"path","name":"job_external_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIndexResponse"}}},"description":"Events"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List events for a job","tags":["Events"]}}},"components":{"schemas":{"EventIndexResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of events for the job","items":{"$ref":"#/components/schemas/Event"},"type":"array"}},"required":["data"],"title":"EventIndexResponse","type":"object"},"Event":{"additionalProperties":false,"properties":{"id":{"description":"Event internal ID","type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"job_id":{"description":"Job internal ID","nullable":true,"type":"integer"},"message":{"description":"Event message","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional event metadata","nullable":true,"type":"object"},"type":{"description":"Event type","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["id","type","message"],"title":"Event","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Create an event for a job

> Creates an event for a job.\
> \
> Requires administrative privileges (\*\*administrator or service account\*\*).\
> \
> \*\*Request body:\*\*\
> \- \`event\` (required) – Object containing:\
> &#x20; \- \`type\` (required, string) – Event type.\
> &#x20; \- \`message\` (required, string) – Event message.\
> &#x20; \- \`metadata\` (optional, object) – Additional event metadata.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.11.0"},"paths":{"/api/jobs/{job_external_id}/events":{"post":{"description":"Creates an event for a job.\n\nRequires administrative privileges (**administrator or service account**).\n\n**Request body:**\n- `event` (required) – Object containing:\n  - `type` (required, string) – Event type.\n  - `message` (required, string) – Event message.\n  - `metadata` (optional, object) – Additional event metadata.\n","operationId":"TdCxWeb.EventController.create","parameters":[{"description":"Job external ID","in":"path","name":"job_external_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCreateRequest"}}},"description":"Event","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventShowResponse"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create an event for a job","tags":["Events"]}}},"components":{"schemas":{"EventCreateRequest":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"properties":{"message":{"description":"Event message","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional event metadata","nullable":true,"type":"object"},"type":{"description":"Event type","type":"string"}},"required":["type","message"],"type":"object"}},"required":["event"],"title":"EventCreateRequest","type":"object"},"EventShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Event"}},"required":["data"],"title":"EventShowResponse","type":"object"},"Event":{"additionalProperties":false,"properties":{"id":{"description":"Event internal ID","type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"job_id":{"description":"Job internal ID","nullable":true,"type":"integer"},"message":{"description":"Event message","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional event metadata","nullable":true,"type":"object"},"type":{"description":"Event type","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["id","type","message"],"title":"Event","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```
