Say what a sandbox's table would decide for a request
The connection test: decides a request against a sandbox's table and its live grants, or against a policy's table, without sending anything.
The connection test: decides a request against a sandbox's table and its live grants, or against a policy's table, without sending anything. Name exactly one of sandbox and policy (invalid otherwise). Changes nothing and records nothing. A sandbox's live grants are the newest grant list the publisher signed for it, used once the sandbox's server has applied it, as the server decides. A list that cannot be read, is not applied yet, or answers another table is not used (deny when unsure), and grants says so.
A key with the permissions:read scope.
Request
curl -X POST "https://api.pod.mapier.ai/v1/connection-tests?project=example" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"request":{"action":"read","thing":"example"}}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
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. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
sandbox | string | No | Decide with this sandbox's table and its live grants. |
policy | string | No | Decide with this policy's table, with no grants. |
request | TestRequest | Yes |
Answer
200. What the table would decide, and why.
{
"verdict": "allow",
"rule": null,
"reason": "example",
"read": false,
"log_only": false,
"baseline": false,
"cut_off": false,
"grant": null,
"grants": null,
"policy": null,
"policy_version": null
}| Field | Type | Always | What it is |
|---|---|---|---|
verdict | "allow" | "ask" | "deny" | Yes | |
rule | string | null | Yes | The rule that decided, in the simple form; null when the baseline, a cut-off or the verdict for everything else decided. |
reason | string | Yes | Why, in plain words. |
read | boolean | Yes | Whether the request would be read. |
log_only | boolean | Yes | Whether log-only mode would let a net Deny or Ask through and record it. |
baseline | boolean | Yes | Whether the fixed baseline decided. It always blocks internal addresses, private networks and outbound mail. |
cut_off | boolean | Yes | Whether a cut-off decided. |
grant | string | null | Yes | The Ask whose answer decided, when a live grant of the sandbox's grant list did; null otherwise. An "allow once" grant is reported as allowing, and reason notes that the sandbox's server may already have used it: the server keeps which once grants it used. |
grants | DecisionGrantList | Yes | Which grant list of the sandbox the answer was decided with; null for a policy's table, which has no grants. Only a list the sandbox's server has applied, bound to the table deciding here, is used; otherwise the request is decided with no grants (deny when unsure). |
policy | string | null | Yes | |
policy_version | integer | null | Yes |
Errors
The refusals this call is known for: invalid, 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.