Get a stored policy with its rules
Get a stored policy with its rules
GET/v1/policies/{policy_id}
A key with the permissions:read scope.
Request
curl "https://api.pod.mapier.ai/v1/policies/example?project=example" \
-H "Authorization: Bearer $POD_API_KEY"Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
policy_id | path | string | Yes | |
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden. |
Answer
200. The policy.
{
"id": "example",
"name": "example",
"layer": "organisation",
"version": 1,
"mode": "enforce",
"log_only_until": null,
"rule_count": 0,
"sandboxes": 0,
"updated_at": "2026-11-23T12:00:00.000Z",
"updated_by": "example",
"preset": null,
"rules": "example",
"narrows": ["example"],
"reading": {
"on": false,
"because": ["example"]
},
"ask_cap_s": null
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | A named policy may not be called organisation, project or default, the layers the service makes itself, or self, which a rule's policy:self reads as the policy's own domain. |
layer | "organisation" | "project" | "named" | "project_default" | Yes | The layers a person edits as stored policies. The organization's and the project's are the ceiling. |
version | integer | Yes | Only goes up. At least 1. |
mode | "enforce" | "log_only" | Yes | |
log_only_until | string | null | Yes | When log-only mode ends; null when enforcing. |
rule_count | integer | Yes | At least 0. |
sandboxes | integer | Yes | Sandboxes running under the policy, as servers report it. At least 0. |
updated_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
updated_by | string | Yes | Who made a change. An identity account id for a person, or a key id (key_…) for an API key. |
preset | PinnedPreset | null | Yes | The preset the policy pins; null for none. |
rules | string | Yes | Rules in the simple form, one a line: a verdict, an action and a thing (Allow net api.github.com GET /repos/*). At most 1,000 rules a policy. |
narrows | string[] | Yes | The policies above this one, which the checker proved it no wider than. |
reading | object | Yes | Whether Pod reads the traffic of sandboxes under the policy, and the rules that make it. |
ask_cap_s | integer | null | Yes | The longest an answer to an Ask lasts under this policy; null for 24 hours. At least 1. |
Errors
The refusals this call is known for: unauthorized, forbidden, not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.