---
title: "Get an invocation with its jobs and tasks"
method: GET
path: "/v1/vercel-ci/invocations/{invocationId}/tree"
tags: ["vercel-ci"]
---

# Get an invocation with its jobs and tasks

`GET /v1/vercel-ci/invocations/{invocationId}/tree`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v1/vercel-ci/invocations/{invocationId}/tree`
- Auth: HTTP bearer

Returns an invocation attempt together with every job definition, its latest job run, and the task definitions and active task runs of that job run. Defaults to the latest attempt when `attempt` is omitted. With `follow=1` the response is a newline-delimited JSON stream: a `{"type":"tree", ...}` event with the full tree is sent immediately and again whenever it changes, and a final `{"type":"end","reason":...}` event is sent when the attempt finishes (`completed`) or the stream reaches its maximum duration (`timeout`), after which clients should reconnect.

## Path parameters

- `invocationId` string, required

## Query parameters

- `attempt` string: Invocation attempt to return. Defaults to the latest attempt.
- `follow` 0 | 1: When 1, stream the tree as newline-delimited JSON until the attempt finishes.
- `teamId` string
- `slug` string

## Response `200`

Successfully fetched the invocation tree.

- object
  - `invocation` object, required
    - `invocationId` string, required
    - `attempt` number, required
    - `teamId` string, required
    - `source` union, required
      - object
        - `type` string, required
      - object
        - `type` string, required
        - `deploymentId` string, required
        - `projectId` string, required
        - `deploymentTargetSlug` string, required
    - `createdAt` number, required
    - `repositoryKey` string, required
    - `ref` string, required
    - `commitSha` string, required
    - `skipped` object
      - `reason` string, required
    - `bootstrappingStarted` object
      - `startedAt` number, required
    - `bootstrappingFailed` object
      - `reason` string, required
    - `sandboxSnapshotted` object
      - `sandboxSnapshotId` string, required
      - `workingDirectory` string, required
      - `snapshottedAt` number
    - `sandboxNamed` object
      - `sandboxName` string, required
      - `workingDirectory` string, required
      - `readyAt` number
    - `jobDefinitionsCreated` object
      - `names` string[], required
      - `source` union
        - string
        - string
        - string
      - `scheduledAt` number
    - `completed` object
      - `completedAt` number, required
      - `conclusion` union
        - string
        - string
        - string
    - `setupConclusion` object: The terminal setup result. Omitted while invocation setup is still running.
      - `result` union, required
        - string
        - string
        - string
    - `runConclusion` object: The aggregate outcome of every job in the invocation. Omitted while jobs are still running. Any failed job → "failed"; any (non-cascade) skipped job → "skipped"; else "succeeded". Present on completed invocations written after the field shipped; absent on older rows.
      - `result` union, required
        - string
        - string
        - string
    - `status` union, required
      - string
      - string
      - string
      - string
      - string
      - string
      - string
      - string
      - string
      - string
      - string
      - string
  - `repositories` object, required
  - `jobs` object[], required
    - `definition` object, required
      - `invocationId` string, required
      - `invocationAttempt` number, required
      - `jobDefinitionId` string, required
      - `kind` union, required
        - string
        - string
      - `name` string, required
      - `command` string, required
      - `createdAt` number, required
    - `run` object
      - `invocationId` string, required
      - `invocationAttempt` number, required
      - `jobDefinitionId` string, required
      - `attempt` number, required
      - `createdAt` number, required
      - `started` object
        - `startedAt` number, required
      - `completed` object
        - `completedAt` number, required
        - `conclusion` union, required
          - object
            - `result` string, required
          - object
            - `result` string, required
            - `reason` string, required
          - object
            - `result` string, required
            - `reason` string, required
    - `tasks` object[], required
      - `definition` object, required
        - `invocationId` string, required
        - `invocationAttempt` number, required
        - `jobDefinitionId` string, required
        - `jobRunAttempt` number, required
        - `taskDefinitionId` string, required
        - `name` string, required
        - `packageDirectory` string
        - `operation` union, required
          - object
            - `kind` string, required
            - `command` string, required
          - object
            - `kind` string, required
            - `projectId` string, required
            - `target` union, required
              - …
        - `dependencyTaskDefinitionIds` string[], required
        - `createdAt` number, required
      - `run` object
        - `invocationId` string, required
        - `invocationAttempt` number, required
        - `jobDefinitionId` string, required
        - `jobRunAttempt` number, required
        - `taskDefinitionId` string, required
        - `attempt` number, required
        - `createdAt` number, required
        - `started` object
          - `startedAt` number, required
        - `completed` object
          - `completedAt` number, required
          - `conclusion` union, required
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
        - `deploymentBinding` object
          - `deploymentId` string, required
          - `deploymentCreatedAt` number, required
          - `eventAt` number, required
          - `readyState` string

## Other responses

- `400`: One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`
- `429`
- `500`

## Changes

- **2026-10-06** `d8abdc297e36`: 2 info
  - added the optional property `jobs/items/tasks/items/definition/packageDirectory` to the response with the `200` status
  - added the optional property `jobs/items/tasks/items/run/deploymentBinding` to the response with the `200` status
- **2026-09-25** `7881412aa042`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/api/changes/v1/vercel-ci/invocations/:invocationId/tree/get.md)

---

[API](https://skmtc.dev/vercel/apis/api.md) - [All operations](https://skmtc.dev/vercel/apis/api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/api/revisions/4a06e85c2848?raw)
