# Parts received, for resume

URL: https://neattrim.com/docs/api/get-upload

GET /v1/uploads/{id}: Parts received, for resume.

Endpoint: `GET /v1/uploads/{id}`

Who can call it: An API key, or an OAuth token for an app.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

## Examples

Set NEATTRIM_API_KEY to your key, then copy an example. A tool that draws from your allowance reads an uploaded file: upload a sample file as in the quickstart and set VIDEO_FILE_ID (or AUDIO_FILE_ID, IMAGE_FILE_ID, SUBTITLES_FILE_ID) to its file_id. Any other id in an example, such as JOB_ID, is read from a variable of the same name.

### curl

```bash
curl -X GET "https://api.neattrim.com/v1/uploads/$UPLOAD_ID" \
  -H "Authorization: Bearer $NEATTRIM_API_KEY"
```

### TypeScript

```ts
// @neattrim/sdk is not on npm yet: it arrives with the first client release. Use the curl example today.
import { api, Neattrim, unwrap } from "@neattrim/sdk";

const client = new Neattrim({ apiKey: process.env.NEATTRIM_API_KEY });
const result = unwrap(
  await api.getUpload({
    client: client.client,
    path: { id: process.env.UPLOAD_ID ?? "" },
  }),
);
console.log(result);
```

### Python

```python
# neattrim is not on PyPI yet: it arrives with the first client release. Use the curl example today.
import os

from neattrim import Neattrim
from neattrim_generated.api.uploads import get_upload

with Neattrim(api_key=os.environ["NEATTRIM_API_KEY"], base_url="https://api.neattrim.com") as client:
    result = get_upload.sync(os.environ["UPLOAD_ID"], client=client.client)
    print(result)
```

## Response 200

Upload

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `upload_id` | string | yes |  |
| `file_id` | string | yes |  |
| `mode` | any | yes |  (one of "proxy", "presigned") |
| `part_size` | integer | no | Fixed when the upload is created; only concurrency adapts |
| `part_count` | integer | no |  |
| `parts_done` | array of integer | no |  |
| `put_url` | string or null | no |  |
| `upload_page_url` | string or null | no |  |
| `expires_at` | string | yes |  |

## Errors

- `401`: UNAUTHENTICATED or INACTIVE
- `404`: NOT_FOUND (also for other accounts' ids)
- `429`: RATE_LIMITED
