Update API pages with v0.24.0

This commit is contained in:
netbirddev
2023-10-20 07:34:32 +00:00
parent 8046beee03
commit 5c66f387d2

View File

@@ -180,7 +180,8 @@ echo $response;
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
} }
] ]
``` ```
@@ -204,7 +205,8 @@ echo $response;
"primary": "boolean", "primary": "boolean",
"domains": [ "domains": [
"string" "string"
] ],
"search_domains_enabled": "boolean"
} }
] ]
``` ```
@@ -283,7 +285,14 @@ echo $response;
> >
Nameserver group domain list Nameserver group match domain list
</Property>
<Property name="search_domains_enabled" type="boolean" required={true}
>
Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
</Property> </Property>
</Properties> </Properties>
</Col> </Col>
@@ -312,7 +321,8 @@ curl -X POST https://api.netbird.io/api/dns/nameservers \
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}' }'
``` ```
@@ -335,7 +345,8 @@ let data = JSON.stringify({
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}); });
let config = { let config = {
method: 'post', method: 'post',
@@ -380,7 +391,8 @@ payload = json.dumps({
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}) })
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@@ -425,7 +437,8 @@ func main() {
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}`) }`)
client := &http.Client { client := &http.Client {
} }
@@ -488,7 +501,8 @@ request.body = JSON.dump({
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}) })
response = https.request(request) response = https.request(request)
puts response.read_body puts response.read_body
@@ -515,7 +529,8 @@ RequestBody body = RequestBody.create(mediaType, '{
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}'); }');
Request request = new Request.Builder() Request request = new Request.Builder()
.url("https://api.netbird.io/api/dns/nameservers") .url("https://api.netbird.io/api/dns/nameservers")
@@ -558,7 +573,8 @@ curl_setopt_array($curl, array(
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}', }',
CURLOPT_HTTPHEADER => array( CURLOPT_HTTPHEADER => array(
'Content-Type: application/json', 'Content-Type: application/json',
@@ -597,7 +613,8 @@ echo $response;
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
} }
``` ```
```json {{ title: 'Schema' }} ```json {{ title: 'Schema' }}
@@ -619,7 +636,8 @@ echo $response;
"primary": "boolean", "primary": "boolean",
"domains": [ "domains": [
"string" "string"
] ],
"search_domains_enabled": "boolean"
} }
``` ```
</CodeGroup> </CodeGroup>
@@ -819,7 +837,8 @@ echo $response;
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
} }
``` ```
```json {{ title: 'Schema' }} ```json {{ title: 'Schema' }}
@@ -841,7 +860,8 @@ echo $response;
"primary": "boolean", "primary": "boolean",
"domains": [ "domains": [
"string" "string"
] ],
"search_domains_enabled": "boolean"
} }
``` ```
</CodeGroup> </CodeGroup>
@@ -927,7 +947,14 @@ echo $response;
> >
Nameserver group domain list Nameserver group match domain list
</Property>
<Property name="search_domains_enabled" type="boolean" required={true}
>
Nameserver group search domain status for match domains. It should be true only if domains list is not empty.
</Property> </Property>
</Properties> </Properties>
</Col> </Col>
@@ -956,7 +983,8 @@ curl -X PUT https://api.netbird.io/api/dns/nameservers/{nsgroupId} \
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}' }'
``` ```
@@ -979,7 +1007,8 @@ let data = JSON.stringify({
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}); });
let config = { let config = {
method: 'put', method: 'put',
@@ -1024,7 +1053,8 @@ payload = json.dumps({
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}) })
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@@ -1069,7 +1099,8 @@ func main() {
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}`) }`)
client := &http.Client { client := &http.Client {
} }
@@ -1132,7 +1163,8 @@ request.body = JSON.dump({
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}) })
response = https.request(request) response = https.request(request)
puts response.read_body puts response.read_body
@@ -1159,7 +1191,8 @@ RequestBody body = RequestBody.create(mediaType, '{
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}'); }');
Request request = new Request.Builder() Request request = new Request.Builder()
.url("https://api.netbird.io/api/dns/nameservers/{nsgroupId}") .url("https://api.netbird.io/api/dns/nameservers/{nsgroupId}")
@@ -1202,7 +1235,8 @@ curl_setopt_array($curl, array(
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
}', }',
CURLOPT_HTTPHEADER => array( CURLOPT_HTTPHEADER => array(
'Content-Type: application/json', 'Content-Type: application/json',
@@ -1241,7 +1275,8 @@ echo $response;
"primary": true, "primary": true,
"domains": [ "domains": [
"example.com" "example.com"
] ],
"search_domains_enabled": true
} }
``` ```
```json {{ title: 'Schema' }} ```json {{ title: 'Schema' }}
@@ -1263,7 +1298,8 @@ echo $response;
"primary": "boolean", "primary": "boolean",
"domains": [ "domains": [
"string" "string"
] ],
"search_domains_enabled": "boolean"
} }
``` ```
</CodeGroup> </CodeGroup>