You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10147,6 +10147,20 @@ Data that you want to duplicate: settings only, with tasks, with annotations
10147
10147
must include a "text" field.
10148
10148
<br>
10149
10149
10150
+
## Async Import Behavior
10151
+
<hr style="opacity:0.3">
10152
+
10153
+
**For non-Community editions, this endpoint processes imports asynchronously.**
10154
+
10155
+
- The POST request **can fail** for invalid parameters, malformed request body, or other request-level validation errors.
10156
+
- However, **data validation errors** that occur during import processing are handled asynchronously and will not cause the POST request to fail.
10157
+
- Upon successful request validation, a response is returned: `{"import": <import_id>}`
10158
+
- Use the returned `import_id` to poll the GET `/api/projects/{project_id}/imports/{import_id}` endpoint to check the import status and see any data validation errors.
10159
+
- Data-level errors and import failures will only be visible in the GET request response.
10160
+
10161
+
For Community edition, imports are processed synchronously and return task counts immediately.
Copy file name to clipboardExpand all lines: src/label_studio_sdk/projects/client.py
+30-2Lines changed: 30 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1014,6 +1014,20 @@ def import_tasks(
1014
1014
must include a "text" field.
1015
1015
<br>
1016
1016
1017
+
## Async Import Behavior
1018
+
<hr style="opacity:0.3">
1019
+
1020
+
**For non-Community editions, this endpoint processes imports asynchronously.**
1021
+
1022
+
- The POST request **can fail** for invalid parameters, malformed request body, or other request-level validation errors.
1023
+
- However, **data validation errors** that occur during import processing are handled asynchronously and will not cause the POST request to fail.
1024
+
- Upon successful request validation, a response is returned: `{"import": <import_id>}`
1025
+
- Use the returned `import_id` to poll the GET `/api/projects/{project_id}/imports/{import_id}` endpoint to check the import status and see any data validation errors.
1026
+
- Data-level errors and import failures will only be visible in the GET request response.
1027
+
1028
+
For Community edition, imports are processed synchronously and return task counts immediately.
1029
+
<br>
1030
+
1017
1031
## POST requests
1018
1032
<hr style="opacity:0.3">
1019
1033
@@ -1079,7 +1093,7 @@ def import_tasks(
1079
1093
Returns
1080
1094
-------
1081
1095
ImportTasksProjectsResponse
1082
-
Tasks successfully imported
1096
+
Tasks successfully imported or import queued. **For non-Community editions**, the response will be `{"import": <import_id>}` which you can use to poll the import status. **For Community edition**, the response contains task counts and is processed synchronously.
1083
1097
1084
1098
Examples
1085
1099
--------
@@ -2291,6 +2305,20 @@ async def import_tasks(
2291
2305
must include a "text" field.
2292
2306
<br>
2293
2307
2308
+
## Async Import Behavior
2309
+
<hr style="opacity:0.3">
2310
+
2311
+
**For non-Community editions, this endpoint processes imports asynchronously.**
2312
+
2313
+
- The POST request **can fail** for invalid parameters, malformed request body, or other request-level validation errors.
2314
+
- However, **data validation errors** that occur during import processing are handled asynchronously and will not cause the POST request to fail.
2315
+
- Upon successful request validation, a response is returned: `{"import": <import_id>}`
2316
+
- Use the returned `import_id` to poll the GET `/api/projects/{project_id}/imports/{import_id}` endpoint to check the import status and see any data validation errors.
2317
+
- Data-level errors and import failures will only be visible in the GET request response.
2318
+
2319
+
For Community edition, imports are processed synchronously and return task counts immediately.
2320
+
<br>
2321
+
2294
2322
## POST requests
2295
2323
<hr style="opacity:0.3">
2296
2324
@@ -2356,7 +2384,7 @@ async def import_tasks(
2356
2384
Returns
2357
2385
-------
2358
2386
ImportTasksProjectsResponse
2359
-
Tasks successfully imported
2387
+
Tasks successfully imported or import queued. **For non-Community editions**, the response will be `{"import": <import_id>}` which you can use to poll the import status. **For Community edition**, the response contains task counts and is processed synchronously.
Response format varies by edition. Non-Community editions return `{"import": <import_id>}` for async processing. Community edition returns the detailed response below with task counts.
0 commit comments