Referência de endpointsPolíticas
Alterar uma política
PATCH
Alterar match, conditions, action, justification_template ou expires_days incrementa version.
bearerAuthheader
AutorizaçãoBearer <token>Token de API criado em Configurações → API. Os escopos ficam vinculados ao token; cada operação lista o escopo exigido em x-scope.
id*stringFormato
uuidorg_id?stringSomente parceiros (orgs:manage): atua sobre esta organização filha. Também pode ser enviado como org_id em corpos JSON.
Formato
uuidapplication/json- body
name?stringdescription?string|nullmode?stringValor em
"recommend""auto"priority?integermatch?conditions?action?stringValor em
"authorize""needs_review""block"justification_template?string|nullexpires_days?integer|nullactive?booleanPolítica
application/json- response
id?stringFormato
uuidorg_id?stringFormato
uuidstore_id?|Formato
uuidname?stringdescription?string|nullversion?integeractive?booleanmode?stringValor em
"recommend""auto"priority?integerLower = evaluated first; first match decides
match?conditions?action?stringValor em
"authorize""needs_review""block"justification_template?|Supports {domain} {vendor} {path}
expires_days?integer|nullis_default?booleancreated_at?stringFormato
date-timeupdated_at?stringFormato
date-timecurl -X PATCH "https://example.com/policies/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "mode": "auto", "active": true }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b", "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0", "name": "string", "description": "string", "version": 0, "active": true, "mode": "recommend", "priority": 0, "match": { "origin": "first_party", "domain": [ "string" ], "path_glob": [ "string" ], "category": [ "string" ], "vendor_id": [ "string" ] }, "conditions": { "same_origin": true, "prevalence_min": 0, "no_sensitive_field_access": true, "not_in_threat_list": true, "in_threat_list": true, "store_provider": true, "max_size_kb": 0, "has_integrity_attr": true }, "action": "authorize", "justification_template": "string", "expires_days": 0, "is_default": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}