# Client API: Container Apps: Import

> The 5 Client API operations for import.

Source: https://www.coritan.com/docs/api/reference/client/container-apps/servers-import/

Part of [Container Apps](/docs/api/reference/client/container-apps/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/client/servers/{uuid}/import/current`](#op-get-api-v1-client-servers-uuid-import-current) | Active import, or a recently finished one, so a refresh can resume the UI |
| POST | [`/api/v1/client/servers/{uuid}/import/start`](#op-post-api-v1-client-servers-uuid-import-start) | Queue a remote tree copy onto this server |
| GET | [`/api/v1/client/servers/{uuid}/import/status/{import_id}`](#op-get-api-v1-client-servers-uuid-import-status-import-id) | Poll an import the caller started |
| POST | [`/api/v1/client/servers/{uuid}/import/test-connection`](#op-post-api-v1-client-servers-uuid-import-test-connection) | Probe a remote SFTP/FTP host and count files without writing anything |
| DELETE | [`/api/v1/client/servers/{uuid}/import/{import_id}`](#op-delete-api-v1-client-servers-uuid-import-import-id) | Stop a pending or in-progress import |

### Active import, or a recently finished one, so a refresh can resume the UI {#op-get-api-v1-client-servers-uuid-import-current}

`GET /api/v1/client/servers/{uuid}/import/current`

Active import, or a recently finished one, so a refresh can resume the UI.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Queue a remote tree copy onto this server {#op-post-api-v1-client-servers-uuid-import-start}

`POST /api/v1/client/servers/{uuid}/import/start`

Queue a remote tree copy onto this server.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `type` | string | yes |
| `remote_host` | string | yes |
| `remote_port` | integer or null | no |
| `username` | string | yes |
| `password` | string | yes |
| `base_path` | string | no |
| `truncate` | boolean | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Poll an import the caller started {#op-get-api-v1-client-servers-uuid-import-status-import-id}

`GET /api/v1/client/servers/{uuid}/import/status/{import_id}`

Poll an import the caller started. Replica first; a miss re-asks the primary.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `import_id` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Probe a remote SFTP/FTP host and count files without writing anything {#op-post-api-v1-client-servers-uuid-import-test-connection}

`POST /api/v1/client/servers/{uuid}/import/test-connection`

Probe a remote SFTP/FTP host and count files without writing anything.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `type` | string | yes |
| `remote_host` | string | yes |
| `remote_port` | integer or null | no |
| `username` | string | yes |
| `password` | string | yes |
| `base_path` | string | no |
| `truncate` | boolean | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Stop a pending or in-progress import {#op-delete-api-v1-client-servers-uuid-import-import-id}

`DELETE /api/v1/client/servers/{uuid}/import/{import_id}`

Stop a pending or in-progress import.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `uuid` | path | string | yes |
| `import_id` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
