Share feedback
Answers are generated based on the documentation.

Hosted API

AI Governance API

API 1 · 8 operations · 19 named schemas

Overview

HTTP+JSON API for managing Docker governance policies and rules.

Resource model. An organization owns one or more policies. Each policy contains a list of rules grouped into a single domain: either network or filesystem. A policy's domain is derived from its rule actions; mixing domains within a single policy is not permitted.

Lifecycle. Create a policy with CreatePolicy, then add rules with CreateRule. Rules can be updated in place with UpdateRule or removed with DeleteRule. Deleting all rules does not delete the policy itself.

Rule evaluation. All rules in a policy are tested against every request. deny always wins: if any rule matches with decision: deny, the request is denied regardless of any allow rules.

Enforcement. Organization policies take precedence over local sandbox policies and cannot be overridden by individual users.

Propagation. Policy changes take up to five minutes to reach developer machines after being written.

See the AI Governance documentation for product documentation.

Connecting to the AI Governance API

bearerAuth

Short-lived JWT obtained by exchanging Docker Hub credentials at POST https://hub.docker.com/v2/auth/token. Pass the JWT in the Authorization: Bearer <token> header. Tokens expire after a short period; request a fresh one when you receive a 401.

The password field of the token request accepts any of the following credential types:

TypeFormatNotes
PasswordPlain textYour Docker Hub account password.
Personal Access Token (PAT)dckr_pat_*Recommended over passwords. Create one under Account Settings → Security.
Organization Access Token (OAT)dckr_oat_*Scoped to an organization. Create one under Organization Settings → Access Tokens.

PAT and OAT strings can't be used directly as a bearer token. They must be exchanged at the token endpoint first.

See Docker Hub authentication for full details.

https://hub.docker.com/v2

Policies

Policy lifecycle management

Rules

Rule management within an allowlist policy

Operations

Schemas