> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.labric.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.labric.co/_mcp/server.

# Get a job

GET https://platform.labric.co/api/v1/jobs/{job_id}

Get one job with the code of its current script.

Read the code before changing part of it with update_job, whose edits
must match the current script exactly.

Requires an API key with the `read` scope.

Reference: https://docs.labric.co/api-reference/labric-api/jobs/get

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `job_id` (string, required)

## Response

### 200

OK

- `id` (string, required) — Pass this as job_id to the job execution tools.
- `name` (string, required)
- `archived` (boolean, required)
- `publish_status` (enum, required) — draft while the job is still being worked on; in_review once its author considers it ready for an admin to publish; published once it is ready for others to rely on. New jobs start as draft.
  - Allowed values: `draft`, `in_review`, `published`
- `tags` (list of string, required) — User-defined categories for grouping and filtering jobs. Stored in lowercase.
- `network_access` (enum, required) — restricted lets the script reach the platform, the Python package index, and the allowed domains of the organization and the job. unrestricted lets it reach any host. An organization can forbid unrestricted jobs.
  - Allowed values: `restricted`, `unrestricted`
- `network_allowed_domains` (list of string, required) — Domains a restricted job reaches in addition to its organization's. Each is a hostname, such as api.example.com, which matches that host only, or *.example.com, which matches its subdomains. Domains apply to HTTP on port 80 and HTTPS on port 443. An organization can forbid per-job domains.
- `description` (string, optional, nullable)
- `trigger` (JobTriggerSchema, optional, nullable)
- `parameter_definitions` (list of ParameterDefinitionSchema, optional, nullable)
- `script_version` (integer, optional, nullable) — Revision number of the job's current script, starting at 1. Each code change stores a new script and adds one.
- `code` (string, optional, nullable) — Python source of the job's current script. update_job edits match against this text.

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (string, required)

### 401 Unauthorized Error

Unauthorized

- `detail` (string, required)

### 403 Forbidden Error

Forbidden

- `detail` (string, required)

### 404 Not Found Error

Not Found

- `detail` (string, required)

### 422 Unprocessable Entity Error

Unprocessable Content

- `detail` (list of map from string to any, required)

### 500 Internal Server Error

Internal Server Error

- `detail` (string, required)

## Types

### JobTriggerSchema

- `id` (string, required)
- `category` (string, required)
- `instrument_id` (string, optional, nullable)
- `instrument_name` (string, optional, nullable)
- `conditions` (map from string to any, optional, nullable)

### ParameterDefinitionSchema

- `widget_type` (enum, required)
  - Allowed values: `combobox`, `date`, `slider`, `text`, `region`
- `parameter_name` (string, required)
- `label` (string, optional, nullable)
- `model_source` (string, optional, nullable)
- `min` (double, optional, nullable)
- `max` (double, optional, nullable)
- `step` (double, optional, nullable)
- `file_id` (string, optional, nullable)
- `file_id_parameter` (string, optional, nullable)
- `required` (boolean, optional, default: true) — True requires a value on manual executions. A default satisfies the requirement.

## Examples

**Response**

```json
{
  "id": "string",
  "name": "string",
  "archived": true,
  "publish_status": "draft",
  "tags": [
    "string"
  ],
  "network_access": "restricted",
  "network_allowed_domains": [
    "string"
  ],
  "description": "string",
  "trigger": {
    "id": "string",
    "category": "string",
    "instrument_id": "string",
    "instrument_name": "string",
    "conditions": {}
  },
  "parameter_definitions": [
    {
      "widget_type": "combobox",
      "parameter_name": "string",
      "label": "string",
      "model_source": "string",
      "min": 1.1,
      "max": 1.1,
      "step": 1.1,
      "file_id": "string",
      "file_id_parameter": "string",
      "required": true
    }
  ],
  "script_version": 1,
  "code": "string"
}
```

**SDK Code**

```python
import requests

url = "https://platform.labric.co/api/v1/jobs/job_id"

headers = {"Authorization": "Bearer <api_key>"}

response = requests.get(url, headers=headers)

print(response.json())
```