---
title: "Poll an asynchronous 3D job"
description: "State of a job created by `POST /res_api/3d/building_model/area` (or another Contoor 3D async endpoint). `downloadUrl` is filled once `state` is `done`."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.aireon.ch/llms.txt
> Use this file to discover all available pages before exploring further.

Path: RES API (public) › Building3D

`GET /res_api/3d/jobs/{jobId}`

State of a job created by `POST /res_api/3d/building_model/area` (or another Contoor 3D async endpoint). `downloadUrl` is filled once `state` is `done`.

## Authentication

Requires one of the following:

- `ResApiToken`, apiKey, in header, header `token`
- `ResApiTokenQuery`, apiKey, in query

## Path parameters

- `jobId` (`getContoor3dJob.path.jobId`; string, required)
  - format `uuid`

## Query parameters

- `token` (`getContoor3dJob.query.token`; string, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://res.aireon.ch/res_api/3d/jobs/<jobId>' \
  --header 'token: <token>'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/3d/jobs/<jobId>';
const options = {method: 'GET', headers: {token: '<token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://res.aireon.ch/res_api/3d/jobs/<jobId>"

headers = {"token": "<token>"}

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

print(response.text)
```

## Responses

### 200

Job state.

#### Example

```json
{
  "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
  "state": "queued",
  "createdAt": 0,
  "updatedAt": 0,
  "payload": {},
  "downloadUrl": "string"
}
```

- `jobId` (`getContoor3dJob.response.200.jobId`; string, required)
  - format `uuid`
- `state` (`getContoor3dJob.response.200.state`; string, required)
  - one of `"queued"`, `"running"`, `"done"`, `"failed"`
- `createdAt` (`getContoor3dJob.response.200.createdAt`; number, optional): Unix seconds.
- `updatedAt` (`getContoor3dJob.response.200.updatedAt`; number, optional)
- `payload` (`getContoor3dJob.response.200.payload`; object, optional): Upstream job payload; on `done` it carries `downloadLink` (building models) or `download_url` (point clouds); on `failed` an `error`.
- `downloadUrl` (`getContoor3dJob.response.200.downloadUrl`; string | null, optional): Convenience copy of the download link once the job is done.

### 400

Invalid request.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getContoor3dJob.response.400.error`; string, required): Human-readable error description.
- `message` (`getContoor3dJob.response.400.message`; string, optional): Optional underlying error message.

### 401

Authentication missing or invalid.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getContoor3dJob.response.401.error`; string, required): Human-readable error description.
- `message` (`getContoor3dJob.response.401.message`; string, optional): Optional underlying error message.

### 403

Authenticated but not permitted.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getContoor3dJob.response.403.error`; string, required): Human-readable error description.
- `message` (`getContoor3dJob.response.403.message`; string, optional): Optional underlying error message.

### 404

Resource not found.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getContoor3dJob.response.404.error`; string, required): Human-readable error description.
- `message` (`getContoor3dJob.response.404.message`; string, optional): Optional underlying error message.

### 502

The 3D service is unreachable or answered with an error (its status and body are relayed in `upstream_status` / `upstream`).

#### Example

```json
{
  "error": "string",
  "upstream_status": 0,
  "upstream": null,
  "detail": "string"
}
```

- `error` (`getContoor3dJob.response.502.error`; string, optional)
- `upstream_status` (`getContoor3dJob.response.502.upstream_status`; integer, optional)
- `upstream` (`getContoor3dJob.response.502.upstream`; unknown, optional)
- `detail` (`getContoor3dJob.response.502.detail`; string, optional)

### 504

The 3D service did not answer within the proxy timeout.

#### Example

```json
{
  "error": "string",
  "detail": "string"
}
```

- `error` (`getContoor3dJob.response.504.error`; string, optional)
- `detail` (`getContoor3dJob.response.504.detail`; string, optional)


Source: https://docs.aireon.ch/res/get-contoor3d-job/index.md
