Proteside Docs
Referência de endpointsPolíticas

Alterar uma política

PATCH
/policies/{id}

Alterar match, conditions, action, justification_template ou expires_days incrementa version.

Autorização

bearerAuth
headerAutorizaçã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.

Parâmetros de caminho

id*string
Formatouuid

Parâmetros de consulta

org_id?string

Somente parceiros (orgs:manage): atua sobre esta organização filha. Também pode ser enviado como org_id em corpos JSON.

Formatouuid

Corpo da requisição

application/json
  1. body
name?string
description?string|null
mode?string
Valor em"recommend""auto"
priority?integer
match?
conditions?
action?string
Valor em"authorize""needs_review""block"
justification_template?string|null
expires_days?integer|null
active?boolean

Corpo da resposta

Política

application/json
  1. response
id?string
Formatouuid
org_id?string
Formatouuid
store_id?|
Formatouuid
name?string
description?string|null
version?integer
active?boolean
mode?string
Valor em"recommend""auto"
priority?integer

Lower = evaluated first; first match decides

match?
conditions?
action?string
Valor em"authorize""needs_review""block"
justification_template?|

Supports {domain} {vendor} {path}

expires_days?integer|null
is_default?boolean
created_at?string
Formatodate-time
updated_at?string
Formatodate-time
curl -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"}