Remove API Changes

This commit is contained in:
Brandon Hopkins
2026-01-05 23:51:31 -08:00
parent 049d28e0a3
commit 7c337e8fee
3 changed files with 1 additions and 1525 deletions

View File

@@ -2,411 +2,6 @@ export const title = 'Accounts'
## Get Instance Status {{ tag: 'GET' , label: '/api/instance' }}
<Row>
<Col>
Check if the instance requires initial setup. This endpoint is only available when embedded IdP is enabled and no accounts exist. It is **unauthenticated** and only works before setup is complete.
</Col>
<Col sticky>
<CodeGroup title="Request" tag="GET" label="/api/instance">
```bash {{ title: 'cURL' }}
curl -X GET https://api.netbird.io/api/instance \
-H 'Accept: application/json'
```
```js
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: '/api/instance',
headers: {
'Accept': 'application/json'
}
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
```
```python
import requests
import json
url = "https://api.netbird.io/api/instance"
headers = {
'Accept': 'application/json'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.netbird.io/api/instance"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
{
req.Header.Add("Accept", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
```
```ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.netbird.io/api/instance")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
response = https.request(request)
puts response.read_body
```
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api.netbird.io/api/instance")
.method("GET")
.addHeader("Accept", "application/json")
.build();
Response response = client.newCall(request).execute();
```
```php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.netbird.io/api/instance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Accept: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Example' }}
{
"setup_required": true
}
```
```json {{ title: 'Schema' }}
{
"setup_required": "boolean"
}
```
</CodeGroup>
</Col>
</Row>
---
## Complete Instance Setup {{ tag: 'POST' , label: '/api/instance/setup' }}
<Row>
<Col>
Create the initial owner account. This endpoint is only available when embedded IdP is enabled and no accounts exist. It is **unauthenticated** and only works before setup is complete.
### Request-Body Parameters
<Properties><Property name="email" type="string" required={true}>
Email address for the owner account
</Property>
<Property name="password" type="string" required={true}>
Password for the owner account (minimum 8 characters)
</Property>
<Property name="name" type="string" required={false}>
Display name for the owner account
</Property>
</Properties>
<Note>
After setup is complete, accessing this endpoint returns a 412 error and redirects to login.
</Note>
</Col>
<Col sticky>
<CodeGroup title="Request" tag="POST" label="/api/instance/setup">
```bash {{ title: 'cURL' }}
curl -X POST https://api.netbird.io/api/instance/setup \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
}'
```
```js
const axios = require('axios');
let data = JSON.stringify({
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: '/api/instance/setup',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
```
```python
import requests
import json
url = "https://api.netbird.io/api/instance/setup"
payload = json.dumps({
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.netbird.io/api/instance/setup"
method := "POST"
payload := strings.NewReader(`{
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
{
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
```
```ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.netbird.io/api/instance/setup")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request.body = JSON.dump({
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
})
response = https.request(request)
puts response.read_body
```
```java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, '{
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
}');
Request request = new Request.Builder()
.url("https://api.netbird.io/api/instance/setup")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.build();
Response response = client.newCall(request).execute();
```
```php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.netbird.io/api/instance/setup',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"email": "admin@example.com",
"password": "securepassword123",
"name": "Admin User"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```
</CodeGroup>
<CodeGroup title="Response">
```json {{ title: 'Example' }}
{
"user_id": "user-abc123",
"account_id": "account-xyz789"
}
```
```json {{ title: 'Schema' }}
{
"user_id": "string",
"account_id": "string"
}
```
</CodeGroup>
</Col>
</Row>
---
## List all Accounts {{ tag: 'GET' , label: '/api/accounts' }}
<Row>

File diff suppressed because it is too large Load Diff

View File

@@ -264,7 +264,7 @@ echo $response;
<Row>
<Col>
Creates a new service user or sends an invite to a regular user. When embedded IdP is enabled (`account.settings.extra.embedded_idp_enabled: true`), this endpoint creates a local user with a generated password that is returned in the response.
Creates a new service user or sends an invite to a regular user
### Request-Body Parameters
@@ -295,9 +295,6 @@ echo $response;
</Property>
</Properties>
<Note>
**Embedded IdP Behavior:** When embedded IdP is enabled, the response includes a `password` field containing the generated password. This password is only returned once at creation time and cannot be retrieved later. Store it securely or share it with the user immediately. Users authenticated through external identity provider connectors will have an `idp_id` field linking them to the provider.
</Note>
</Col>
@@ -535,8 +532,6 @@ echo $response;
"is_service_user": false,
"is_blocked": false,
"issued": "api",
"password": "generated-password-here",
"idp_id": "idp-def456",
"permissions": {
"is_restricted": {
"type": "boolean",
@@ -574,8 +569,6 @@ echo $response;
"is_service_user": "boolean",
"is_blocked": "boolean",
"issued": "string",
"password": "string",
"idp_id": "string",
"permissions": {
"is_restricted": "boolean",
"modules": {