---
title: "Update job"
method: PATCH
path: "/orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}"
tags: ["Tasks"]
---

# Update job

`PATCH /orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}`

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

## Path parameters

- `orgId` string, required
- `projectId` string, required
- `jobId` string, ulid, required

## Headers

- `x-redocly-scout-version` string

## Request body

- PatchJob
  - `status` 'COMPLETED' | 'FAILED', required — Job status.
  - `metadata` JobMetadata — Additional information about job.
    - `scoutVersion` string — Scout version.
    - `errorMessage` string — Error message, if any.
    - `errorStack` string — Error stack trace, if any.

## Response `200`

OK.

- Job
  - `id` string, ulid, required — ID of the job.
  - `status` 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED', required — Job status.
  - `type` 'PROCESS_GIT_REPO' | 'UPDATE_STATUS', required — Type of job.
  - `organizationId` string, required — Organization ID.
  - `projectId` string, required — Project ID.
  - `providerId` string — Git provider identifier (appId for GitHub).
  - `providerType` 'GITHUB_CLOUD' | 'GITHUB_SERVER' | 'GITLAB_CLOUD' | 'GITLAB_SELF_MANAGED' | 'BITBUCKET_CLOUD' | 'BITBUCKET_DATACENTER' | 'AZURE', required — Git provider type.
  - `namespaceId` string, required — Git repo namespace id (organization login for GitHub).
  - `repositoryId` string, required — Git repo id.
  - `branch` string, required — Git branch name.
  - `commitSha` string, required — Git commit SHA.
  - `isMainBranch` boolean — True if branch is main.
  - `prId` string — Git pull request ID.
  - `attempts` integer, required — Number of attempts to process the job.
  - `parentJobId` string, ulid — ID of the parent job, if any.
  - `checks` GitCommitCheck[] — Commit status checks.
    - `name` string, required — Check name.
    - `status` 'IN_PROGRESS' | 'SUCCESS' | 'FAILED', required — Git commit status.
    - `description` string — Git commit status description.
    - `targetUrl` string — Git commit status target URL.
  - `metadata` JobMetadata — Additional information about job.
    - `scoutVersion` string — Scout version.
    - `errorMessage` string — Error message, if any.
    - `errorStack` string — Error stack trace, if any.
  - `startedAt` string, date-time — Job start date.
  - `createdAt` string, date-time, required — Job creation date.
  - `updatedAt` string, date-time, required — Job last update date.

## Other responses

- `400` — Bad Request.
- `404` — Resource not found.

---

[API](https://skmtc.net/redocly/apis/redocly-scout.md) · [All operations](https://skmtc.net/redocly/apis/redocly-scout/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/redocly/redocly-scout/versions/193cacd75700/schema)
