Skip to content

Commit 1caedff

Browse files
feat: public apis and draft docs
1 parent 46fd0d3 commit 1caedff

File tree

17 files changed

+915
-35
lines changed

17 files changed

+915
-35
lines changed

docs/api-reference/endpoint/create.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api-reference/endpoint/delete.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api-reference/endpoint/get.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api-reference/extract/get.mdx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: 'List Extractions'
3+
api: 'GET /api/v1/sources/{source_id}/extract'
4+
description: 'Get a list of all single-source extractions for your organization'
5+
---
6+
7+
This endpoint returns a list of all single-source extractions (sheets) associated with your organization.
8+
9+
### Authentication
10+
11+
<ParamField header="x-api-key" type="string" required>
12+
Your API key for authentication
13+
</ParamField>
14+
15+
### Response
16+
17+
<ResponseField name="200" type="array">
18+
Success. Returns an array of extraction objects.
19+
20+
<Expandable title="Properties">
21+
<ResponseField name="id" type="string">
22+
The unique identifier of the extraction
23+
</ResponseField>
24+
<ResponseField name="name" type="string">
25+
The name of the extraction
26+
</ResponseField>
27+
<ResponseField name="extractInProgress" type="boolean">
28+
Whether the extraction is currently in progress
29+
</ResponseField>
30+
</Expandable>
31+
32+
</ResponseField>
33+
34+
<ResponseField name="401" type="object">
35+
Unauthorized. Invalid or missing API key.
36+
37+
<Expandable title="Properties">
38+
<ResponseField name="error" type="string">
39+
Error message indicating authentication failure
40+
</ResponseField>
41+
</Expandable>
42+
</ResponseField>
43+
44+
<ResponseField name="500" type="object">
45+
Internal server error.
46+
47+
<Expandable title="Properties">
48+
<ResponseField name="error" type="string">
49+
Error message describing the internal server error
50+
</ResponseField>
51+
</Expandable>
52+
</ResponseField>
53+
54+
### Example Request
55+
bash
56+
curl --request GET \
57+
--url https://cloud.rowfill.com/api/v1/sources/{source_id}/extract \
58+
--header 'x-api-key: <your-api-key>'
59+
60+
### Example Response
61+
json
62+
[
63+
{
64+
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
65+
"name": "Q4 Financial Report",
66+
"extractInProgress": false
67+
},
68+
{
69+
"id": "04a0aacc-4c44-4d42-8486-3d5f5a5c4801",
70+
"name": "Annual Sales Data",
71+
"extractInProgress": true
72+
}
73+
]

docs/api-reference/extract/post.mdx

Whitespace-only changes.
Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,85 @@
11
---
2-
title: 'Rowfill'
3-
description: 'Example section for showcasing API endpoints'
2+
title: 'Rowfill API Reference'
3+
description: 'Complete API reference documentation for Rowfill'
44
---
55

6+
## Introduction
7+
8+
Welcome to the Rowfill API documentation. Our REST API enables you to programmatically interact with Rowfill's data extraction and querying capabilities.
9+
10+
## Authentication
11+
12+
All API endpoints require authentication using Bearer tokens. Include your API token in the Authorization header:
13+
14+
```bash
15+
Authorization: Bearer <your_api_token>
16+
```
17+
18+
## Base URL
19+
20+
```
21+
https://cloud.rowfill.com/api/v1
22+
```
23+
24+
## Core Endpoints
25+
26+
### Sources
27+
28+
Sources represent your data connections and files that can be processed by Rowfill.
29+
30+
<Card title="Sources API" icon="database">
31+
- Create and manage data sources
32+
- Extract data from sources
33+
- Monitor extraction status
34+
</Card>
35+
36+
### Queries
37+
38+
Query endpoints allow you to retrieve and analyze data from your sources.
39+
40+
<Card title="Query API" icon="magnifying-glass">
41+
- Execute queries across your data
42+
- Filter and transform results
43+
- Optimize query performance
44+
</Card>
45+
46+
## Rate Limits
47+
48+
The API has rate limits to ensure fair usage:
49+
- 100 requests per minute per API token
50+
- 1000 requests per hour per API token
51+
652
<Note>
7-
If you're not looking to build API reference documentation, you can delete
8-
this section by removing the api-reference folder.
53+
Contact support to request increased rate limits for your account.
954
</Note>
1055

11-
## Welcome
56+
## Response Format
1257

13-
There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification.
58+
All responses are returned in JSON format and include a standard structure:
1459

15-
<Card
16-
title="Plant Store Endpoints"
17-
icon="leaf"
18-
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
19-
>
20-
View the OpenAPI specification file
21-
</Card>
60+
```json
61+
{
62+
"success": true,
63+
"data": {
64+
// Response data
65+
},
66+
"error": null
67+
}
68+
```
2269

23-
## Authentication
70+
## Error Handling
2471

25-
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
72+
Errors follow a consistent format:
2673

2774
```json
28-
"security": [
29-
{
30-
"bearerAuth": []
75+
{
76+
"success": false,
77+
"data": null,
78+
"error": {
79+
"code": "error_code",
80+
"message": "Human readable error message"
3181
}
32-
]
82+
}
3383
```
84+
85+
For detailed endpoint documentation, explore the sections below.

docs/api-reference/query/get.mdx

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: 'Query Sources'
3+
api: 'GET /api/v1/query'
4+
description: 'Query your indexed sources to get AI-generated answers based on your data'
5+
---
6+
7+
## Query Parameters
8+
9+
<ParamField query="query" type="string" required>
10+
The question or query you want to ask about your indexed sources
11+
</ParamField>
12+
13+
<ParamField query="source_id" type="string">
14+
Optional ID to query a specific source. If not provided, all sources in your organization will be searched.
15+
</ParamField>
16+
17+
## Headers
18+
19+
<ParamField header="Authorization" type="string" required>
20+
Bearer token containing your API key
21+
</ParamField>
22+
23+
## Response
24+
25+
<ResponseField name="answer" type="string">
26+
AI-generated answer based on your query and the matched source content
27+
</ResponseField>
28+
29+
<ResponseField name="reference_text" type="string">
30+
The relevant text excerpt from the source that was used to generate the answer
31+
</ResponseField>
32+
33+
<ResponseField name="reference_image" type="string">
34+
URL to the reference image if one was associated with the matched source
35+
</ResponseField>
36+
37+
## Example Request
38+
39+
bash
40+
curl --request GET \
41+
--url 'https://cloud.rowfill.com/api/v1/query?query=What is the capital of France?&source_id=src_123' \
42+
--header 'Authorization: Bearer <your-api-key>'
43+
44+
json
45+
{
46+
"answer": "According to the source, Paris is the capital of France.",
47+
"reference_text": "Paris is the capital and largest city of France, located in the northern part of the country.",
48+
"reference_image": "https://example.com/presigned-url-to-image.jpg"
49+
}
50+
51+
52+
## Error Responses
53+
54+
<ResponseField name="401: Unauthorized" type="object">
55+
<Expandable title="Toggle object">
56+
<ResponseField name="error" type="string">
57+
Returns when the API key is missing or invalid
58+
</ResponseField>
59+
</Expandable>
60+
</ResponseField>
61+
62+
<ResponseField name="400: Bad Request" type="object">
63+
<Expandable title="Toggle object">
64+
<ResponseField name="error" type="string">
65+
Returns when the query parameters are invalid
66+
</ResponseField>
67+
<ResponseField name="details" type="array">
68+
Validation error details
69+
</ResponseField>
70+
</Expandable>
71+
</ResponseField>
72+
73+
<ResponseField name="404: Not Found" type="object">
74+
<Expandable title="Toggle object">
75+
<ResponseField name="error" type="string">
76+
Returns when no matching documents are found for the query
77+
</ResponseField>
78+
</Expandable>
79+
</ResponseField>
80+
81+
<ResponseField name="500: Internal Server Error" type="object">
82+
<Expandable title="Toggle object">
83+
<ResponseField name="error" type="string">
84+
Returns when an unexpected error occurs
85+
</ResponseField>
86+
</Expandable>
87+
</ResponseField>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: 'Create Source'
3+
api: 'POST /api/v1/sources'
4+
description: 'Upload a new document source to be indexed'
5+
---
6+
7+
## Request
8+
9+
### Headers
10+
11+
<ParamField header="Authorization" type="string" required>
12+
Bearer token containing your API key
13+
</ParamField>
14+
15+
### Body
16+
17+
<ParamField body="file" type="file" required>
18+
The file to be uploaded and indexed
19+
</ParamField>
20+
21+
## Response
22+
23+
<ResponseField name="id" type="string">
24+
The unique identifier of the created source
25+
</ResponseField>
26+
27+
<RequestExample>
28+
29+
bash cURL
30+
curl -X POST https://cloud.rowfill.com/api/v1/sources \
31+
-H "Authorization: Bearer {api_key}" \
32+
-F "file=@/path/to/your/file.pdf"
33+
34+
json
35+
{
36+
"id": "clg2xyzabc123"
37+
}

0 commit comments

Comments
 (0)