feat: update docs

This commit is contained in:
Henry
2024-12-28 23:20:24 +00:00
parent fa0b7cf539
commit 8189d4cf39
27 changed files with 76 additions and 1497 deletions

View File

@@ -1,33 +1,33 @@
---
title: 'Introduction'
description: 'Example section for showcasing API endpoints'
title: "Introduction"
description: "Learn how to integrate with Kan's REST API."
---
<Note>
If you're not looking to build API reference documentation, you can delete
this section by removing the api-reference folder.
</Note>
## Base URL
## Welcome
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.
<Card
title="Plant Store Endpoints"
icon="leaf"
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
>
View the OpenAPI specification file
</Card>
```
https://kanbn.com/api/v1
```
## Authentication
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
Most endpoints require authentication using Bearer tokens. You can get this from the `sb-kanbn-auth-token.0` cookie in your browser. Include this token in the Authorization header of each request.
```json
"security": [
{
"bearerAuth": []
}
]
```
Authorization: Bearer 123456789
```
## Response codes
Kan uses standard HTTP codes to indicate the success or failure of your requests.
In general, `2xx` HTTP codes correspond to success, `4xx` codes are for user-related failures, and `5xx` codes are for infrastructure issues.
| Status | Description |
| ------ | ------------------------------- |
| `200` | Success |
| `400` | Invalid parameters |
| `401` | Missing token |
| `403` | Invalid token |
| `404` | Resource not found |
| `500` | Error with Kan's infrastructure |