/v2/agents/sessions/policy/validateValidate an environment spec policy
Validates an environment spec's tool-permission policy against the capabilities of the agent selected by its template, without creating a session. Send the YAML environment spec and review the per-rule verdicts; ok is false when a strict rule is unsupported or unverified. Use this preflight to check whether CreateSession would accept the policy for the resolved agent and version.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
YAML environment spec for policy preflight; only agent and template selection and the permissions block are used. Supported YAML content types include application/x-yaml, application/yaml, text/yaml, and `text/x-yaml.
A 400 is returned for a malformed manifest or invalid spec.permissions; 401 indicates invalid authentication credentials; 404 indicates that a resource was not found; 429 indicates that the API rate limit was exceeded; and 500 indicates a server error. In the manifest, spec.runtime and spec.runtime.adapter are required, kind must be Agent, and any apiVersion must be agents.digitalocean.com/v1alpha1.