Aller au contenu

Les politiques en vigueur dans une zone

GET/api/public/v1/zones/{zone_id}/policies

The AIPs attached on the layer stack, each once: effective_mode is the strictest of its attachments on the path, attachment_mode this zone's own (null when it only inherits it) and attached_here whether this zone holds it; layer is this zone when it does, else the zone whose attachment sets the mode. mode filters on effective_mode; layer=authored keeps the AIPs attached here. dimensions[] is COMPUTED as the union of the policy's atoms' dimensions.

Fenêtre de terminal
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/zones/<zone_id>/policies' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rôle dans l’organisationCe point de terminaison
ownerAutorisé
adminAutorisé
editorAutorisé
viewerAutorisé

Une clé porte le rôle que son propriétaire détient dans l’organisation. Voir Authentification.

Portée de clé d’API : policies:read

ParamètreTypeDescription
zone_idstring (uuid)Obligatoire.
ParamètreTypeDescription
dimensionstring or null
modestring or null
layerstring or null
qstring or null
pageinteger
page_sizeinteger
ChampTypeDescription
dataarray of objectObligatoire.
data[].anomalies_7dinteger
data[].attached_herebooleanWhether the viewed zone holds its own attachment.
data[].attachment_modestring — one of disabled, monitor, enforce or nullThe viewed zone's own attachment mode; null when it only inherits the AIP.
data[].coverageobjectObligatoire. D-66 — installs counted from stamped negotiation, never from mode + recent poll.
data[].coverage.compatibility_unavailable_installsintegerObligatoire.
data[].coverage.enforced_installsintegerObligatoire.
data[].dimensionsarray of stringObligatoire.
data[].display_titlestringThe AIP's name: its title, else its generated_title, else its statement.
data[].effective_layerobject or nullThe zone whose attachment sets effective_mode when it is not layer; null otherwise.
data[].effective_modestring — one of disabled, monitor, enforce or nullThe mode the AIP runs in at the viewed zone: the strictest attachment on its path.
data[].idstringObligatoire.
data[].intentsobjectObligatoire. How many of the policy's atoms are actually enforceable.
data[].intents.enforceableintegerObligatoire.
data[].intents.monitor_onlyintegerObligatoire.
data[].intents.totalintegerObligatoire.
data[].layerobjectObligatoire. The layer a policy row is labelled with: the zone being viewed when it holds the AIP, else the zone whose attachment sets its mode there. `inherited` is true when the viewed zone holds no attachment of it.
data[].layer.inheritedbooleanObligatoire.
data[].layer.labelstringObligatoire.
data[].layer.unit_idstringObligatoire.
data[].layer.zone_idstringObligatoire.
data[].modestringObligatoire. Deprecated: attachment_mode when the viewed zone holds it, else effective_mode.
data[].presetobject or null
data[].public_idstringObligatoire.
data[].statementstringObligatoire.
data[].statusstringObligatoire.
data[].versionintegerObligatoire.
pageintegerObligatoire.
page_sizeintegerObligatoire.
totalintegerObligatoire.
{
"data": [
{
"anomalies_7d": 0,
"attached_here": false,
"attachment_mode": "disabled",
"coverage": {
"compatibility_unavailable_installs": 3,
"enforced_installs": 3
},
"dimensions": [
"string"
],
"display_title": "",
"effective_layer": {
"inherited": false,
"label": "string",
"unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10"
},
"effective_mode": "disabled",
"id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"intents": {
"enforceable": 3,
"monitor_only": 3,
"total": 3
},
"layer": {
"inherited": false,
"label": "string",
"unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10"
},
"mode": "string",
"preset": {
"application_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"preset_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"preset_name": "release-bot",
"preset_policy_key": "string",
"preset_version": 3
},
"public_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"statement": "string",
"status": "string",
"version": 3
}
],
"page": 1,
"page_size": 3,
"total": 3
}