Replace the IP allow-list
curl --request PUT \
--url https://app.trustivan.com/api/v1/settings/ip-allowlist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entries": [
{
"cidr": "203.0.113.0/24",
"label": "<string>"
}
]
}
'import requests
url = "https://app.trustivan.com/api/v1/settings/ip-allowlist"
payload = { "entries": [
{
"cidr": "203.0.113.0/24",
"label": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({entries: [{cidr: '203.0.113.0/24', label: '<string>'}]})
};
fetch('https://app.trustivan.com/api/v1/settings/ip-allowlist', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/settings/ip-allowlist"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"cidr\": \"203.0.113.0/24\",\n \"label\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"your_ip": "<string>",
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cidr": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Replace the IP allow-list
Owner-only (identity:manage). Addresses or CIDR networks, IPv4 or
IPv6, at most 100. A list that does not admit the caller’s own address
is refused with 409, so nobody locks the organization out. 0.0.0.0/0
is refused: an empty list says the same.
PUT
/
settings
/
ip-allowlist
Replace the IP allow-list
curl --request PUT \
--url https://app.trustivan.com/api/v1/settings/ip-allowlist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entries": [
{
"cidr": "203.0.113.0/24",
"label": "<string>"
}
]
}
'import requests
url = "https://app.trustivan.com/api/v1/settings/ip-allowlist"
payload = { "entries": [
{
"cidr": "203.0.113.0/24",
"label": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({entries: [{cidr: '203.0.113.0/24', label: '<string>'}]})
};
fetch('https://app.trustivan.com/api/v1/settings/ip-allowlist', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/settings/ip-allowlist"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"cidr\": \"203.0.113.0/24\",\n \"label\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"your_ip": "<string>",
"entries": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cidr": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}