mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-19 08:56:35 +00:00
add quickstart for api
This commit is contained in:
@@ -26,7 +26,7 @@ export const title = 'Tokens'
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X GET https://api.netbird.io/api/users/{userId}/tokens \
|
||||
-H 'Accept: application/json' \
|
||||
-H "Authorization: Token <TOKEN>"
|
||||
-H 'Authorization: Token <TOKEN>'
|
||||
```
|
||||
|
||||
```js
|
||||
@@ -251,7 +251,7 @@ echo $response;
|
||||
curl -X POST https://api.netbird.io/api/users/{userId}/tokens \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "Authorization: Token <TOKEN>" \
|
||||
-H 'Authorization: Token <TOKEN>' \
|
||||
--data-raw '{
|
||||
"name": "My first token",
|
||||
"expires_in": 30
|
||||
@@ -492,7 +492,7 @@ echo $response;
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X GET https://api.netbird.io/api/users/{userId}/tokens/{tokenId} \
|
||||
-H 'Accept: application/json' \
|
||||
-H "Authorization: Token <TOKEN>"
|
||||
-H 'Authorization: Token <TOKEN>'
|
||||
```
|
||||
|
||||
```js
|
||||
@@ -693,7 +693,7 @@ echo $response;
|
||||
<CodeGroup title="Request" tag="DELETE" label="/api/users/{userId}/tokens/{tokenId}">
|
||||
```bash {{ title: 'cURL' }}
|
||||
curl -X DELETE https://api.netbird.io/api/users/{userId}/tokens/{tokenId} \
|
||||
-H "Authorization: Token <TOKEN>"
|
||||
-H 'Authorization: Token <TOKEN>'
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user