Quickstart
Write a policy, check what it allows, test a request, and run a sandbox under it
Not available yet Policies are stored, checked and compiled, but sandboxes do not enforce them until Pod's per-sandbox firewall ships.
You need a Pod project, the admin role in it with a second factor set up (an authenticator app or a passkey), and an API key with the permissions:read and permissions:write scopes for the calls in steps 3 and 4.
Write the policy
In the Pod dashboard, open Permissions, then Policies, and choose New policy. Name it build and paste these rules:
Allow net github.com
Allow net api.github.com GET POST /repos/acme/app/*
Allow net registry.npmjs.org GET
Deny net everything elseSaving a policy is a change to what agents may reach, so the dashboard asks for your second factor first. API keys cannot save policies.
Read what it allows
Before it saves, the dashboard runs the check and shows, in plain words, what the policy newly allows, any rule that can never match, and any address the fixed baseline blocks anyway. It also shows whether the policy switches traffic reading on: these rules name sites and paths, so it does.
You can run the same check from code with checkPolicy. It saves nothing.
Test a request
Ask what the policy would decide for a request, without sending it, with testConnection:
curl -X POST "https://api.pod.mapier.ai/v1/connection-tests?project=$POD_PROJECT" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"policy": "'"$POLICY_ID"'", "request": {"action": "net", "thing": "api.github.com", "port": 443, "method": "DELETE", "path": "/repos/acme/app"}}'The answer names the verdict, the rule that decided and why. Here it is Deny: the policy allows only GET and POST on that path.
Run a sandbox under it
Name the policy in the body of createSandbox, beside its other fields. Pod binds it before the sandbox runs anything. To add rules for this one sandbox, send them in rules, in the simple form, one a line:
{
"policy": "pol_…",
"rules": "Allow net pypi.org GET"
}Rules above the project's ceiling are cut, and the sandbox's binding lists what was cut. Pod's front door binds the policy for you while it creates the sandbox, through bindSandbox; a call to it you send yourself is refused. To tighten a sandbox that already runs, use narrowSandbox.
Read the record
Every connection the sandbox makes, or is refused, is a row on the record, naming the rule that decided. Open the sandbox in Permissions, then Record, or call queryRecord.
Not available yet The record fills once enforcement ships; exports and delivery to your own bucket follow it.
Next
- Give the sandbox a service's key without putting it inside: Connected tools.
- Stop risky requests for a person to answer: Approvals.
- Start from Mapier's presets for coding and model APIs: Controls.