v4

latestOpenAPI 3.1.02026-08-02261331761.5 KB
Policy Git Repositories

Create Policy Repo

Creates a new policy repository configuration under a given project. The given repository is created with status 'pending', it will be changed and used as the 'active' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote.

post/v2/projects/{proj_id}/repos

Path parameters

proj_idstring required

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

Request body

keystring required

A URL-friendly name of the policy repo (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the policy repo.

urlstring required

The SSH URL of the git repository (e.g. git@github.com:username/repository.git)

main_branch_namestring
activate_when_validatedboolean

if you want to change your policy repository to this repo right after it is validated

Response

Successful Response

idstring uuid required

Unique id of the policy repo

status'invalid' | 'pending' | 'valid' required

An enumeration.

keystring required

A URL-friendly name of the policy repo (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the policy repo.

urlstring required

The SSH URL of the git repository (e.g. git@github.com:username/repository.git)

main_branch_namestring
activate_when_validatedboolean

if you want to change your policy repository to this repo right after it is validated