GET /jobs/<job-id>/events
Retrieve a list of events that occurred during a specific job.
Request format
When Forming orchestrator API requests to this endpoint, the URI path must include an integer job ID identifying a specific task or deployment. Job IDs are returned in responses from some Command endpoints and GET /jobs.
You can use the optional start
parameter to start the list
of events from a specific event ID number.
For example, this request queries events associated with the 352
job, starting with event number 1272
:
GET https://orchestrator.example.com:8143/orchestrator/v1/jobs/352/events?start=1272
Response format
A successful response is a JSON object that uses these keys to detail the events in the job:
Key | Definition |
---|---|
next-events
|
Contains the id subkey, which
has the URI supplied in the request as its value. |
id
|
An event's ID. |
items
|
An array of JSON objects where each object is an event. |
type
|
Each event has one event type, determined by the event's
status or circumstances that cause it to occur:
|
timestamp
|
The time when the event was created. |
details
|
A JSON object containing information about the event. |
message
|
A message about the event. |
Here is an example response body:
{ "next-events" : { "id" : "https://orchestrator.example.com:8143/orchestrator/v1/jobs/352/events?start=1272" }, "items" : [ { "id" : "1272", "type" : "node_running", "timestamp" : "2016-05-05T19:50:08Z", "details" : { "node" : "puppet-agent.example.com", "detail" : { "noop" : false } }, "message" : "Started puppet run on puppet-agent.example.com ..." }] }
Error responses
If there is an error, Orchestrator API error responses provide error
information in the kind
key:
Response code | Key | Description |
---|---|---|
400 | puppetlabs.orchestrator/validation-error
|
The job ID or the start parameter in the request are not
supplied as integers. |
404 | puppetlabs.orchestrator/unknown-job
|
No job exists that matches the specified job ID. |