latestOpenAPI 3.1.02026-08-236994571.1 MB

79928a3d37d3

Policies

Create Policy Attachment

Create a new policy attachment.

Example Request:

curl -X POST "http://localhost:4000/policies/attachments" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "policy_name": "global-baseline",
        "scope": "*"
    }'

Example with team-specific attachment:

curl -X POST "http://localhost:4000/policies/attachments" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "policy_name": "healthcare-compliance",
        "teams": ["healthcare-team", "medical-research"]
    }'

Example Response:

{
    "attachment_id": "123e4567-e89b-12d3-a456-426614174000",
    "policy_name": "global-baseline",
    "scope": "*",
    "teams": [],
    "keys": [],
    "models": [],
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
}
post/policies/attachments

Request body

policy_namestring required

Name of the policy to attach.

scopestring nullable

Use '*' for global scope (applies to all requests).

teamsstring[] nullable

Team aliases or patterns this attachment applies to.

keysstring[] nullable

Key aliases or patterns this attachment applies to.

modelsstring[] nullable

Model names or patterns this attachment applies to.

tagsstring[] nullable

Tag patterns this attachment applies to. Supports wildcards (e.g., health-*).

Response

Successful Response

attachment_idstring required

Unique ID of the attachment.

policy_namestring required

Name of the attached policy.

scopestring nullable

Scope of the attachment.

teamsstring[]

Team patterns.

keysstring[]

Key patterns.

modelsstring[]

Model patterns.

tagsstring[]

Tag patterns.

created_atstring date-time nullable

When the attachment was created.

updated_atstring date-time nullable

When the attachment was last updated.

created_bystring nullable

Who created the attachment.

updated_bystring nullable

Who last updated the attachment.