Get a branch's checks
GET
/api/orgs/{org}/projects/{project}/ci
const url = 'https://api-dev.wrktr.com/api/orgs/example/projects/example/ci?branch=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api-dev.wrktr.com/api/orgs/example/projects/example/ci?branch=example' \ --header 'Authorization: Bearer <token>'The CI run for the head, or the latest run if the head hasn’t been checked yet.
Authorizations
Section titled “Authorizations”- bearer
- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
project
required
string
Query Parameters
Section titled “Query Parameters”branch
required
string
Responses
Section titled “Responses”BranchCi
Media typeapplication/json
object
branch
required
string
headSha
required
string
configured
required
boolean
run
required
Any of:
object
id
required
string
branch
required
string
head
required
string
status
required
string
checks
required
Array<object>
object
name
required
string
status
required
string
required
required
boolean
tail
required
string
hasLog
required
boolean
cached
required
boolean
null
Example
{ "run": { "status": "queued", "checks": [ { "status": "queued", "exitCode": "Infinity", "durationMs": "Infinity", "retry": { "attempt": "Infinity", "attempts": "Infinity" } } ], "createdAt": "Infinity", "startedAt": "Infinity", "finishedAt": "Infinity", "heartbeatAt": "Infinity" }}Unauthorized
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "Unauthorized"}ProjectNotFound | BranchNotFound