Proteside Docs
Referência de endpointsPolíticas

Criar uma política

POST
/policies

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 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

Parâmetros de cabeçalho

Idempotency-Key?string

Reproduz a resposta original por 24 h

Tamanho1 <= length <= 255

Corpo da requisição

application/json
  1. body
name*string
Tamanho2 <= length <= 120
description?string
Tamanholength <= 1000
store_id?string

Omit for an organization-level policy

Formatouuid
mode?string
Padrão"recommend"
Valor em"recommend""auto"
priority?integer
Intervalo1 <= value <= 10000
Padrão100
match?
conditions?
action*string
Valor em"authorize""needs_review""block"
justification_template?string
Tamanholength <= 1000
expires_days?|
Intervalo1 <= value <= 3650
active?boolean
Padrãotrue

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 POST "https://example.com/policies" \  -H "Content-Type: application/json" \  -d '{    "name": "Analytics approved by marketing",    "match": {      "origin": "known_vendor",      "category": [        "analytics"      ]    },    "conditions": {      "no_sensitive_field_access": true,      "not_in_threat_list": true    },    "action": "authorize",    "mode": "recommend",    "priority": 60,    "justification_template": "{vendor} analytics ({domain}) — no access to payment fields in the last 30 days.",    "expires_days": 90  }'
{  "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"}