Skip to content

Commit 165b8b1

Browse files
committed
Updated API docs for import retrieval
1 parent 23221ae commit 165b8b1

File tree

3 files changed

+81
-2
lines changed

3 files changed

+81
-2
lines changed

docs/api-reference/download-import.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
title: "Download Import CSV"
33
openapi: "GET /import/{id}/download"
44
---
5+
6+
Retrieve an import as a CSV file.

docs/api-reference/get-import-rows.mdx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,31 @@ title: "Get Import Rows"
33
openapi: "GET /import/{id}/rows"
44
---
55

6-
Retrieve the rows of an import as JSON. This endpoint supports pagination by using a limit/offset. If the limit and offset are not provided, it will return the first 1000 rows of the import.
6+
Retrieve the rows of an import as JSON. This endpoint supports pagination by using a limit/offset. If the limit and offset are not provided, it will return the first 1,000 rows of the import.
77

88
To use the limit/offset, start by setting the offset to 0 and the limit to 100 to get the first 100 rows of data. To get the next 100 rows, set the offset to 100 while keeping the limit the same. Continue increasing the offset by 100 until no more rows are returned.
99

10-
Note: the max limit is 1000.
10+
<Info>The maximum `limit` is 1000.</Info>
11+
12+
### Example Response
13+
14+
```json
15+
[
16+
{
17+
"index": 0,
18+
"values": {
19+
"email": "[email protected]",
20+
"first_name": "Laura",
21+
"last_name": "Smith"
22+
}
23+
},
24+
{
25+
"index": 1,
26+
"values": {
27+
"email": "[email protected]",
28+
"first_name": "Craig",
29+
"last_name": "Johnson"
30+
}
31+
}
32+
]
33+
```

docs/api-reference/get-import.mdx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,57 @@
22
title: "Get Import"
33
openapi: "GET /import/{id}"
44
---
5+
6+
Retrieve the row data, column definitions, and other information about the import.
7+
8+
<Info>The number of rows included is limited to 10,000. If there are more than 10,000 rows, an `error` will be set and
9+
the data should be retrieved using the [/rows](/api-reference/get-import-rows) endpoint.</Info>
10+
11+
### Example Response
12+
13+
```json
14+
{
15+
"id": "da5554e3-6c87-41b2-9366-5449a2f15b53",
16+
"importer_id": "6de452a2-bd1f-4cb3-b29b-0f8a2e3d9353",
17+
"created_at": 1703791355,
18+
"num_columns": 3,
19+
"num_processed_values": 5,
20+
"num_rows": 2,
21+
"metadata": {},
22+
"columns": [
23+
{
24+
"data_type": "string",
25+
"key": "email",
26+
"name": "Email"
27+
},
28+
{
29+
"data_type": "string",
30+
"key": "first_name",
31+
"name": "First Name"
32+
},
33+
{
34+
"data_type": "string",
35+
"key": "last_name",
36+
"name": "Last Name"
37+
}
38+
],
39+
"rows": [
40+
{
41+
"index": 0,
42+
"values": {
43+
"email": "[email protected]",
44+
"first_name": "Laura",
45+
"last_name": "Smith"
46+
}
47+
},
48+
{
49+
"index": 1,
50+
"values": {
51+
"email": "[email protected]",
52+
"first_name": "Craig",
53+
"last_name": "Johnson"
54+
}
55+
}
56+
]
57+
}
58+
```

0 commit comments

Comments
 (0)