Runs
GETapi/runs?serviceId=:serviceId
List all Runs for a Service
This endpoint allows you to retrieve a list of all runs that are associated with a given service ID.
Response Body
[
{
"id": "d8583d1c-ce63-4e0c-bd55-2088409bc7e3",
"createdAt": "2023-03-20T17:17:13.760Z",
"updatedAt": "2023-03-20T17:17:13.760Z",
"startedAt": "2023-03-20T17:17:13.760Z",
"endedAt": "2023-03-20T17:18:13.760Z",
"duration": 6000,
"commitHash": "ca4dfd3209de8d",
"commitMessage": "feat: add notification feature",
"committer": "Joe",
"status": "SUCCESS",
"triggerType": "MAIN",
"serviceId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e2"
}
]
GETapi/runs/:runId
List a Run
This endpoint allows you to retrieve a single run using its id.
Response Body
{
"id": "d8583d1c-ce63-4e0c-bd55-2088409bc7e3",
"createdAt": "2023-03-20T17:17:13.760Z",
"updatedAt": "2023-03-20T17:17:13.760Z",
"startedAt": "2023-03-20T17:17:13.760Z",
"endedAt": "2023-03-20T17:18:13.760Z",
"duration": 6000,
"commitHash": "ca4dfd3209de8d",
"commitMessage": "feat: add notification feature",
"committer": "Joe",
"status": "SUCCESS",
"triggerType": "MAIN",
"serviceId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e2"
}
POSTapi/runs?serviceId=:serviceId
Create a Run
This endpoint allows you to add a new run that will be associated with a service. Placeholder stages will also be created and associated with the new run. These placeholder stages are for use by the state machine.
Response Body
{
"id": "c6e690ba-d887-4976-bf5b-2ebd3a253bee",
"createdAt": "2023-03-28T13:08:15.471Z",
"updatedAt": "2023-03-28T13:08:15.471Z",
"startedAt": "2023-03-28T13:08:15.471Z",
"endedAt": null,
"duration": null,
"commitHash": "aade51f20cae9b",
"commitMessage": "chore: refactor",
"committer": "Jim",
"status": "IDLE",
"triggerType": "MAIN",
"serviceId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e2"
}
PATCHapi/runs/:runId
Update a Run
This endpoint allows you to update a run. Add the properties to be updated in the request body.
Request Headers
Content-Type: application/json
Request Body
{
"committer": "Sarah"
}
Response Body
{}
DELETEapi/runs/:runId
Delete a Run
This endpoint allows you to delete a run using its id.
Response Body
{
"id": "d8583d1c-ce63-4e0c-bd55-2088409bc7e3",
"createdAt": "2023-03-20T17:17:13.760Z",
"updatedAt": "2023-03-20T17:17:13.760Z",
"startedAt": "2023-03-20T17:17:13.760Z",
"endedAt": "2023-03-20T17:17:14.760Z",
"duration": 60,
"commitHash": "ca4dfd3209de8d",
"commitMessage": "feat: add notification feature",
"committer": "Joe",
"status": "SUCCESS",
"triggerType": "MAIN",
"serviceId": "d8583d1c-ce63-4e0c-bd55-2088409bc7e2"
}