apicheats.dev Cheat sheet Raw .md
POST

Try POST /repos/{owner}/{repo}/actions/policies — GitHub API

GitHub playground

Create a repository Actions policy

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

4 body fields
  • name · required · string — The name of the policy.
  • enforcement · required · string — The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).
  • conditions · optional · object — Conditions for a repository Actions policy. The object may be empty to preserve or use the default workflow targeting, or contain only `workflow_path`.
  • rules · optional · object[] — An array of rules within the policy.