add first version of tailwind docs

This commit is contained in:
Pascal Fischer
2023-05-03 19:00:56 +02:00
parent 9d42e075f7
commit 86b1890396
189 changed files with 26622 additions and 0 deletions

444
src/pages/setup-keys.mdx Normal file
View File

@@ -0,0 +1,444 @@
---
## List all Setup Keys {{ tag: 'GET' , label: '/api/setup-keys' }}
<Row>
<Col>
Returns a list of all Setup Keys
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/setup-keys">
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/setup-keys \
-H "Authorization: Bearer {token}" \
-H 'Accept: application/json' \
```
```js
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.contacts.update('WAz8eIbvDR60rouK', {
display_name: 'UncleFrank',
})
```
```python
from protocol_api import ApiClient
client = ApiClient(token)
client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank")
```
```php
$client = new \Protocol\ApiClient($token);
$client->contacts->update('WAz8eIbvDR60rouK', [
'display_name' => 'UncleFrank',
]);
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200' }}
[
{
"id": "string",
"key": "string",
"name": "string",
"expires": "string",
"type": "string",
"valid": "boolean",
"revoked": "boolean",
"used_times": "integer",
"last_used": "string",
"state": "string",
"auto_groups": [
"string"
],
"updated_at": "string",
"usage_limit": "integer"
}
]
```
</CodeGroup>
</Col>
</Row>
---
## Create a Setup Key {{ tag: 'POST' , label: '/api/setup-keys' }}
<Row>
<Col>
Creates a Setup Key
#### Request-Body Parameters
<Properties>
<Property name="name" type="string" required={true}
>
Setup Key name
</Property>
<Property name="type" type="string" required={true}
>
Setup key type, one-off for single time usage and reusable
</Property>
<Property name="expires_in" type="integer" required={true}
>
Expiration time in seconds
</Property>
<Property name="revoked" type="boolean" required={true}
>
Setup key revocation status
</Property>
<Property name="auto_groups" type="string[]" required={true}
>
Setup key groups to auto-assign to peers registered with this key
</Property>
<Property name="usage_limit" type="integer" required={true}
>
A number of times this key can be used. The value of 0 indicates the unlimited usage.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/setup-keys">
```bash {{ title: 'cURL' }}
curl -X POST https://api.netbird.io/api/setup-keys \
-H "Authorization: Bearer {token}" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"auto_groups": [
"string"
],
"usage_limit": "integer"
}'
```
```js
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.contacts.update('WAz8eIbvDR60rouK', {
display_name: 'UncleFrank',
})
```
```python
from protocol_api import ApiClient
client = ApiClient(token)
client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank")
```
```php
$client = new \Protocol\ApiClient($token);
$client->contacts->update('WAz8eIbvDR60rouK', [
'display_name' => 'UncleFrank',
]);
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200' }}
{
"id": "string",
"key": "string",
"name": "string",
"expires": "string",
"type": "string",
"valid": "boolean",
"revoked": "boolean",
"used_times": "integer",
"last_used": "string",
"state": "string",
"auto_groups": [
"string"
],
"updated_at": "string",
"usage_limit": "integer"
}
```
</CodeGroup>
</Col>
</Row>
---
## Retrieve a Setup Key {{ tag: 'GET' , label: '/api/setup-keys/{keyId}' }}
<Row>
<Col>
Get information about a Setup Key
#### Path Parameters
<Properties>
<Property name="keyId" type="string" required={true}>
The unique identifier of a setup key
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/setup-keys/{keyId}">
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/setup-keys/{keyId} \
-H "Authorization: Bearer {token}" \
-H 'Accept: application/json' \
```
```js
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.contacts.update('WAz8eIbvDR60rouK', {
display_name: 'UncleFrank',
})
```
```python
from protocol_api import ApiClient
client = ApiClient(token)
client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank")
```
```php
$client = new \Protocol\ApiClient($token);
$client->contacts->update('WAz8eIbvDR60rouK', [
'display_name' => 'UncleFrank',
]);
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200' }}
{
"id": "string",
"key": "string",
"name": "string",
"expires": "string",
"type": "string",
"valid": "boolean",
"revoked": "boolean",
"used_times": "integer",
"last_used": "string",
"state": "string",
"auto_groups": [
"string"
],
"updated_at": "string",
"usage_limit": "integer"
}
```
</CodeGroup>
</Col>
</Row>
---
## Update a Setup Key {{ tag: 'PUT' , label: '/api/setup-keys/{keyId}' }}
<Row>
<Col>
Update information about a Setup Key
#### Path Parameters
<Properties>
<Property name="keyId" type="string" required={true}>
The unique identifier of a setup key
</Property>
</Properties>
#### Request-Body Parameters
<Properties>
<Property name="name" type="string" required={true}
>
Setup Key name
</Property>
<Property name="type" type="string" required={true}
>
Setup key type, one-off for single time usage and reusable
</Property>
<Property name="expires_in" type="integer" required={true}
>
Expiration time in seconds
</Property>
<Property name="revoked" type="boolean" required={true}
>
Setup key revocation status
</Property>
<Property name="auto_groups" type="string[]" required={true}
>
Setup key groups to auto-assign to peers registered with this key
</Property>
<Property name="usage_limit" type="integer" required={true}
>
A number of times this key can be used. The value of 0 indicates the unlimited usage.
</Property>
</Properties>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="PUT" label="/api/setup-keys/{keyId}">
```bash {{ title: 'cURL' }}
curl -X PUT https://api.netbird.io/api/setup-keys/{keyId} \
-H "Authorization: Bearer {token}" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"type": "string",
"expires_in": "integer",
"revoked": "boolean",
"auto_groups": [
"string"
],
"usage_limit": "integer"
}'
```
```js
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.contacts.update('WAz8eIbvDR60rouK', {
display_name: 'UncleFrank',
})
```
```python
from protocol_api import ApiClient
client = ApiClient(token)
client.contacts.update("WAz8eIbvDR60rouK", display_name="UncleFrank")
```
```php
$client = new \Protocol\ApiClient($token);
$client->contacts->update('WAz8eIbvDR60rouK', [
'display_name' => 'UncleFrank',
]);
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: '200' }}
{
"id": "string",
"key": "string",
"name": "string",
"expires": "string",
"type": "string",
"valid": "boolean",
"revoked": "boolean",
"used_times": "integer",
"last_used": "string",
"state": "string",
"auto_groups": [
"string"
],
"updated_at": "string",
"usage_limit": "integer"
}
```
</CodeGroup>
</Col>
</Row>
---