Skip to content

Creates a routine policy.

POST
/v1/m/governance/routine-policies
curl --request POST \
--url https://example.com/v1/m/governance/routine-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "allowed_cron_patterns": [ "example" ], "blocked_environments": [ "example" ], "enabled": true, "max_active_routines": 1, "max_cadence_seconds": 0, "name": "example", "require_approval": true, "scope_kind": "example", "scope_ref": "example" }'

Creates a routine policy.

X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

Media type application/json
object
allowed_cron_patterns
Any of:

Null/omission means any; an authored empty array deliberately denies all cron patterns.

Array
blocked_environments
Any of:

Null/omission means none; an authored empty array is distinct and preserved.

Array
enabled
Any of:

Defaults to true when absent or null.

boolean
max_active_routines
Any of:
integer format: int64
max_cadence_seconds
Any of:
Any of:
integer format: int64
0
name
required

Trimmed, credential-free policy name capped at 4096 bytes.

string
/.*\S.*/
require_approval
Any of:
boolean
scope_kind
required

Case-insensitive after trimming: tenant, workspace, or user.

string
scope_ref
Any of:

Must be empty for tenant and non-blank for workspace/user; credential-free and capped at 4096 bytes.

string

OK

Media type application/json
object
Example generated
{}

Bad request

Media type application/json
object
Example generated
{}

Unauthenticated

Media type application/json
object
Example generated
{}

Forbidden

Media type application/json
object
Example generated
{}

Not found

Media type application/json
object
Example generated
{}

Conflict / setup required

Media type application/json
object
Example generated
{}

Rate limited

Media type application/json
object
Example generated
{}