Query Status of Adding Table Data
Query Status of Adding Table Data
Use this API to query the processing status of tasks for adding table data.
Request Method
GET
Endpoint
https://api-${endpoint}.gptbots.ai/v1/database/query/import-results
Authentication
Refer to the authentication method description in API Overview for details.
Request
Request Example
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/database/query/import-results?ids=id1&ids=id2' \
-H 'Authorization: Bearer ${API Key}'
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/database/query/import-results?ids=id1&ids=id2' \
-H 'Authorization: Bearer ${API Key}'
Este bloque de código en una ventana flotante
Request Headers
Field | Type | Description |
---|---|---|
Authorization | Bearer ${API Key} | Use Authorization: Bearer ${API Key} for authentication. Get API key from API Key page. |
Query Parameters
Field | Type | Required | Description |
---|---|---|---|
ids | list | Yes | Collection of task IDs for adding data. |
Response
Response Example
{
"code": 0,
"message": "OK",
"progress": 0,
"data": [
{
"id": "673e9cda9f7bc178002dbd9c",
"progress": 1,
"status": "FAIL",
"success_count": 0,
"fail_count": 2,
"fail_detail": [
{"row_number_start":1,"row_number_end":10,"fail_reason":"fail reason"},
{"row_number_start":31,"row_number_end":40,"fail_reason":"fail reason"}
]
}
]
}
{
"code": 0,
"message": "OK",
"progress": 0,
"data": [
{
"id": "673e9cda9f7bc178002dbd9c",
"progress": 1,
"status": "FAIL",
"success_count": 0,
"fail_count": 2,
"fail_detail": [
{"row_number_start":1,"row_number_end":10,"fail_reason":"fail reason"},
{"row_number_start":31,"row_number_end":40,"fail_reason":"fail reason"}
]
}
]
}
Este bloque de código en una ventana flotante
The system processes data in chunks of 10 rows by default. The error reason shown represents the first failure encountered within that chunk.
Successful Response
Field | Type | Description |
---|---|---|
code | int | Response code indicating the type of message. |
message | string | Response message description. |
progress | int | Progress value of the task. |
data | list | Result data set. |
id | string | Task ID for the query. |
success_count | int | Number of successfully processed rows. |
fail_count | int | Number of failed rows. |
fail_detail | list | Details of failed objects and failure reasons. The system processes data in chunks of 10 rows by default. The error reason shown represents the first failure encountered within that chunk. |
Failed Response
Field | Type | Description |
---|---|---|
code | int | Error code. |
message | string | Error details. |
Error Codes
Code | Message |
---|---|
50000 | Internal system error |