Skip to content

Commit

Permalink
Update API docs (#84)
Browse files Browse the repository at this point in the history
* Update API docs

* Update API pages with v0.23.0

---------

Co-authored-by: netbirddev <[email protected]>
  • Loading branch information
mlsmaycon and netbirddev authored Sep 6, 2023
1 parent d2d0f83 commit 0d50068
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 23 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ $ npm run dev

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.


## Contributing to the docs

You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a _fork_. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
Expand Down
80 changes: 58 additions & 22 deletions src/pages/ipa/resources/setup-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ echo $response;
"devs"
],
"updated_at": "2023-05-05T09:00:35.477782Z",
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}
]
```
Expand All @@ -198,7 +199,8 @@ echo $response;
"string"
],
"updated_at": "string",
"usage_limit": "integer"
"usage_limit": "integer",
"ephemeral": "boolean"
}
]
```
Expand Down Expand Up @@ -267,6 +269,13 @@ echo $response;
>
A number of times this key can be used. The value of 0 indicates the unlimited usage.
</Property>
<Property name="ephemeral" type="boolean" required={false}
>
Indicate that the peer will be ephemeral or not
</Property>
</Properties>
</Col>
Expand All @@ -286,7 +295,8 @@ curl -X POST https://api.netbird.io/api/setup-keys \
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}'
```
Expand All @@ -300,7 +310,8 @@ let data = JSON.stringify({
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
});
let config = {
method: 'post',
Expand Down Expand Up @@ -336,7 +347,8 @@ payload = json.dumps({
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
})
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -372,7 +384,8 @@ func main() {
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}`)
client := &http.Client {
}
Expand Down Expand Up @@ -426,7 +439,8 @@ request.body = JSON.dump({
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
})
response = https.request(request)
puts response.read_body
Expand All @@ -444,7 +458,8 @@ RequestBody body = RequestBody.create(mediaType, '{
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys")
Expand Down Expand Up @@ -478,7 +493,8 @@ curl_setopt_array($curl, array(
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
Expand Down Expand Up @@ -514,7 +530,8 @@ echo $response;
"devs"
],
"updated_at": "2023-05-05T09:00:35.477782Z",
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}
```
```json {{ title: 'Schema' }}
Expand All @@ -533,7 +550,8 @@ echo $response;
"string"
],
"updated_at": "string",
"usage_limit": "integer"
"usage_limit": "integer",
"ephemeral": "boolean"
}
```
</CodeGroup>
Expand Down Expand Up @@ -730,7 +748,8 @@ echo $response;
"devs"
],
"updated_at": "2023-05-05T09:00:35.477782Z",
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}
```
```json {{ title: 'Schema' }}
Expand All @@ -749,7 +768,8 @@ echo $response;
"string"
],
"updated_at": "string",
"usage_limit": "integer"
"usage_limit": "integer",
"ephemeral": "boolean"
}
```
</CodeGroup>
Expand Down Expand Up @@ -825,6 +845,13 @@ echo $response;
>
A number of times this key can be used. The value of 0 indicates the unlimited usage.
</Property>
<Property name="ephemeral" type="boolean" required={false}
>
Indicate that the peer will be ephemeral or not
</Property>
</Properties>
</Col>
Expand All @@ -844,7 +871,8 @@ curl -X PUT https://api.netbird.io/api/setup-keys/{keyId} \
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}'
```
Expand All @@ -858,7 +886,8 @@ let data = JSON.stringify({
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
});
let config = {
method: 'put',
Expand Down Expand Up @@ -894,7 +923,8 @@ payload = json.dumps({
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
})
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -930,7 +960,8 @@ func main() {
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}`)
client := &http.Client {
}
Expand Down Expand Up @@ -984,7 +1015,8 @@ request.body = JSON.dump({
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
})
response = https.request(request)
puts response.read_body
Expand All @@ -1002,7 +1034,8 @@ RequestBody body = RequestBody.create(mediaType, '{
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/setup-keys/{keyId}")
Expand Down Expand Up @@ -1036,7 +1069,8 @@ curl_setopt_array($curl, array(
"auto_groups": [
"devs"
],
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
Expand Down Expand Up @@ -1072,7 +1106,8 @@ echo $response;
"devs"
],
"updated_at": "2023-05-05T09:00:35.477782Z",
"usage_limit": 0
"usage_limit": 0,
"ephemeral": true
}
```
```json {{ title: 'Schema' }}
Expand All @@ -1091,7 +1126,8 @@ echo $response;
"string"
],
"updated_at": "string",
"usage_limit": "integer"
"usage_limit": "integer",
"ephemeral": "boolean"
}
```
</CodeGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/pages/ipa/resources/users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ echo $response;
"name": "Tom Schulz",
"role": "admin",
"status": "active",
"last_login": "2023-05-05T09:00:35.477782Z",
"auto_groups": [
"devs"
],
Expand All @@ -193,6 +194,7 @@ echo $response;
"name": "string",
"role": "string",
"status": "string",
"last_login": "string",
"auto_groups": [
"string"
],
Expand Down Expand Up @@ -487,6 +489,7 @@ echo $response;
"name": "Tom Schulz",
"role": "admin",
"status": "active",
"last_login": "2023-05-05T09:00:35.477782Z",
"auto_groups": [
"devs"
],
Expand All @@ -502,6 +505,7 @@ echo $response;
"name": "string",
"role": "string",
"status": "string",
"last_login": "string",
"auto_groups": [
"string"
],
Expand Down Expand Up @@ -775,6 +779,7 @@ echo $response;
"name": "Tom Schulz",
"role": "admin",
"status": "active",
"last_login": "2023-05-05T09:00:35.477782Z",
"auto_groups": [
"devs"
],
Expand All @@ -790,6 +795,7 @@ echo $response;
"name": "string",
"role": "string",
"status": "string",
"last_login": "string",
"auto_groups": [
"string"
],
Expand Down

0 comments on commit 0d50068

Please sign in to comment.