mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-03 02:19:26 -05:00
lots of api docs
This commit is contained in:
42
docsite/docs/api/api-secrets.mdx
Normal file
42
docsite/docs/api/api-secrets.mdx
Normal file
@@ -0,0 +1,42 @@
|
||||
import Divider from '@site/src/components/Divider';
|
||||
|
||||
# api secrets
|
||||
|
||||
these routes are used to manage api secrets.
|
||||
|
||||
| name | route |
|
||||
| ---- | ------ |
|
||||
| [create api secret](/api/api-secrets#create-api-secret) | `POST /api/secret/create` |
|
||||
| [delete api secret](/api/api-secrets#delete-api-secret) | `DELETE /api/secret/delete/<secret-name>` |
|
||||
|
||||
```mdx-code-block
|
||||
<Divider />
|
||||
```
|
||||
|
||||
## create api secret
|
||||
`POST /api/secret/create`
|
||||
|
||||
### request body
|
||||
```json
|
||||
{
|
||||
name: string, // name the secret. must be unique among the users secrets
|
||||
expires?: rfc3339_timestamp, // optional expiry time. if none, the secret will not expire.
|
||||
}
|
||||
```
|
||||
|
||||
### response body
|
||||
```json
|
||||
string // the body will be the secret hash used to log in.
|
||||
```
|
||||
|
||||
```mdx-code-block
|
||||
<Divider />
|
||||
```
|
||||
|
||||
## delete api secret
|
||||
`DELETE /api/secret/delete/<secret-name>`
|
||||
|
||||
### response
|
||||
```json
|
||||
HTTP 200 OK
|
||||
```
|
||||
Reference in New Issue
Block a user