Bulk unassign keys from a guardrail
curl --request POST \
--url https://nemonist.com/api/v1/guardrails/{id}/assignments/keys/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
}
'import requests
url = "https://nemonist.com/api/v1/guardrails/{id}/assignments/keys/remove"
payload = { "key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key_hashes: ['c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93']
})
};
fetch('https://nemonist.com/api/v1/guardrails/{id}/assignments/keys/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"unassigned_count": 3
}{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 403,
"message": "Only management keys can perform this operation"
}
}{
"error": {
"code": 404,
"message": "Resource not found"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Guardrails
Bulk unassign keys from a guardrail
Unassign multiple API keys from a specific guardrail. Management key required.
POST
/
guardrails
/
{id}
/
assignments
/
keys
/
remove
Bulk unassign keys from a guardrail
curl --request POST \
--url https://nemonist.com/api/v1/guardrails/{id}/assignments/keys/remove \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key_hashes": [
"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
]
}
'import requests
url = "https://nemonist.com/api/v1/guardrails/{id}/assignments/keys/remove"
payload = { "key_hashes": ["c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key_hashes: ['c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93']
})
};
fetch('https://nemonist.com/api/v1/guardrails/{id}/assignments/keys/remove', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"unassigned_count": 3
}{
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}{
"error": {
"code": 401,
"message": "Missing Authentication header"
}
}{
"error": {
"code": 403,
"message": "Only management keys can perform this operation"
}
}{
"error": {
"code": 404,
"message": "Resource not found"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}{
"error": {
"code": 500,
"message": "Internal Server Error"
}
}Authorizations
Headers
Body
application/json