Replace the platform flags
PATCH /v1/platform/flags
| Property | Value |
|---|---|
| Operation | update_platform_flags |
| Group | Platform |
| Scope | platform:write |
| Route class | control |
| Idempotency | No Idempotency-Key |
| Audit | Audited platform.flags.update (mutation) |
| Released in | 1.9.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the platform:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X PATCH "$VOCAL_API/v1/platform/flags" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H 'If-Match: "1"' \
-H "Content-Type: application/json" \
-d '{
"entries": []
}'const response = await fetch(`${process.env.VOCAL_API}/v1/platform/flags`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'If-Match': '"1"',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"entries": []
}),
});
console.log(response.status, await response.text());import os
import requests
response = requests.patch(
f"{os.environ['VOCAL_API']}/v1/platform/flags",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"If-Match": '"1"',
},
json={
"entries": [],
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
if-match | header | string | yes | The revision the change was made against, quoted as the ETag returns it, or * to overwrite. |
Request body
Content type application/json, required: PlatformFlagsUpdateRequest.
| Field | Type | Required | Description |
|---|---|---|---|
entries | array of FlagEntryInput | yes |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | PlatformFlags | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
412 | application/json | ErrorEnvelope | revision_mismatch |
422 | application/json | ErrorEnvelope | validation_failed |
428 | application/json | ErrorEnvelope | precondition_required |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is PlatformFlags.