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

# Get project import status

GET http://localhost:8000/api/projects/{id}/imports/{import_pk}/

Poll the status of an asynchronous project import operation.

**Usage:**

1. When you POST to `/api/projects/{project_id}/import`, you'll receive a response like `{"import": <import_id>}`
2. Use that `import_id` with this GET endpoint to check the import status
3. Poll this endpoint to see if the import has completed, is still processing, or has failed
4. **Import errors and failures will only be visible in this GET response**, not in the original POST request

This endpoint returns detailed information about the import including task counts, status, and any error messages.
While an import is running, `task_count` / annotation / prediction counts update as batches commit.
Counts are cumulative so far; there is no expected total, so percent-complete / ETA is not available from this API.

Reference: https://api.labelstud.io/api-reference/api-reference/tasks/create-many-status

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl [https://label-studio-host/api/projects](https://label-studio-host/api/projects) -H "Authorization: Token \[your-token]"

## Request

### Path parameters

- `id` (integer, required) — A unique integer value identifying this project.
- `import_pk` (integer, required) — A unique integer value identifying this project import.

## Response

### 200

- `created_at` (datetime, required, nullable) — Creation time
- `id` (integer, required)
- `annotation_count` (integer, optional)
- `commit_to_project` (boolean, optional)
- `could_be_tasks_list` (boolean, optional)
- `data_columns` (any, optional)
- `duration` (integer, optional)
- `error` (string, optional, nullable)
- `file_upload_ids` (any, optional)
- `finished_at` (datetime, optional, nullable) — Complete or fail time
- `found_formats` (any, optional)
- `preannotated_from_fields` (any, optional, nullable)
- `prediction_count` (integer, optional)
- `project` (integer, optional, nullable)
- `return_task_ids` (boolean, optional)
- `status` (enum, optional) — * `created` - Created * `in_progress` - In progress * `failed` - Failed * `completed` - Completed
  - Allowed values: `created`, `in_progress`, `failed`, `completed`
- `task_count` (integer, optional)
- `task_ids` (any, optional)
- `updated_at` (datetime, optional, nullable) — Last time import progress or terminal status was updated
- `url` (string, optional, nullable)

## Examples

**Response**

```json
{
  "created_at": "2024-01-15T09:30:00Z",
  "id": 1,
  "annotation_count": 1,
  "commit_to_project": true,
  "could_be_tasks_list": true,
  "duration": 1,
  "error": "string",
  "finished_at": "2024-01-15T09:30:00Z",
  "preannotated_from_fields": null,
  "prediction_count": 1,
  "project": 1,
  "return_task_ids": true,
  "status": "created",
  "task_count": 1,
  "updated_at": "2024-01-15T09:30:00Z",
  "url": "string"
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8000/api/projects/1/imports/1/"

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

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

print(response.json())
```

```javascript
const url = 'http://localhost:8000/api/projects/1/imports/1/';
const options = {method: 'GET', headers: {Authorization: 'Token  <api_key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8000/api/projects/1/imports/1/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Token  <api_key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8000/api/projects/1/imports/1/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token  <api_key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8000/api/projects/1/imports/1/")
  .header("Authorization", "Token  <api_key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8000/api/projects/1/imports/1/', [
  'headers' => [
    'Authorization' => 'Token  <api_key>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8000/api/projects/1/imports/1/");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token  <api_key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Token  <api_key>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8000/api/projects/1/imports/1/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```