Skip to content

Update job

Request

Scout sends this API request after completing a job. Supports only PROCESSING -> COMPLETED and PROCESSING -> FAILED transitions.

Security
ApiKey
Path
orgIdstringrequired

Organization ID.

Example:acme-inc
projectIdstringrequired

Project ID.

Example:my-project
jobIdstring, (ulid)required

Job ID.

Example:sjob_01h2t9ksv7vmsvbhh5ty40zctw
Headers
x-redocly-scout-versionstring

Scout version.

Example:1.0.0
Bodyapplication/json
statusstringrequired

Job status.

Enum:"COMPLETED""FAILED"
metadataobject(JobMetadata)

Additional information about job.

curl -i -X PATCH \
  https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/acme-inc/projects/my-project/scout/tasks/sjob_01h2t9ksv7vmsvbhh5ty40zctw \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-redocly-scout-version: 1.0.0' \
  -d '{
    "status": "COMPLETED",
    "metadata": {
      "errorMessage": "string",
      "errorStack": "string"
    }
  }'

Responses

OK.

Bodyapplication/json
idstring, (ulid)read-onlyrequired

ID of the job.

Example:"sjob_01h2t9ksv7vmsvbhh5ty40zctw"
statusstringread-onlyrequired

Job status.

Enum:"PENDING""PROCESSING""COMPLETED""FAILED"
typestringrequired

Type of job.

Enum:"PROCESS_GIT_REPO""UPDATE_STATUS"
organizationIdstringread-onlyrequired

Organization ID.

projectIdstringread-onlyrequired

Project ID.

providerIdstring

Git provider identifier (appId for GitHub).

providerTypestringrequired

Git provider type.

Enum:"GITHUB_CLOUD""GITHUB_SERVER""GITLAB_CLOUD""GITLAB_SELF_MANAGED""BITBUCKET_CLOUD""BITBUCKET_DATACENTER""AZURE"
namespaceIdstringrequired

Git repo namespace id (organization login for GitHub).

repositoryIdstringrequired

Git repo id.

branchstringrequired

Git branch name.

commitShastringrequired

Git commit SHA.

isMainBranchboolean

True if branch is main.

Default:false
prIdstring

Git pull request ID.

attemptsintegerread-onlyrequired

Number of attempts to process the job.

parentJobIdstring, (ulid)

ID of the parent job, if any.

Example:"sjob_01h2t9ksv7vmsvbhh5ty40zctw"
checksArray of objects(GitCommitCheck)

Commit status checks.

metadataobject(JobMetadata)

Additional information about job.

startedAtstring, (date-time)read-only

Job start date.

createdAtstring, (date-time)read-onlyrequired

Job creation date.

updatedAtstring, (date-time)read-onlyrequired

Job last update date.

Response
{ "id": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "status": "PENDING", "type": "PROCESS_GIT_REPO", "organizationId": "string", "projectId": "string", "providerId": "string", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "branch": "string", "commitSha": "string", "isMainBranch": false, "prId": "string", "attempts": 0, "parentJobId": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "checks": [ {} ], "metadata": { "scoutVersion": "1.0.0", "errorMessage": "string", "errorStack": "string" }, "startedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }