Skip to main content

Create Policy for Project

Create a policy for a project

Path Parameters
    project_id string required
Request Body required
    role_id string required

    unique id of the role to which policy is assigned

    title string

    The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
    Example: Policy title

    principal string required

    principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format namespace:uuid. The namespace can be app/user, app/group or app/serviceuser (coming up!) and uuid is the unique id of the principal.
    Example: app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825

Responses

A successful response.


Schema

    object

POST /v1beta1/policies/projects/:project_id

Authorization

name: Basic type: httpdescription: use Client ID as username and Client Secret as passwordin: headerscheme: basic

Request

Base URL
http://127.0.0.1:7400
Security Scheme
Username
Password
project_id — path required
Body required
{
"role_id": "string",
"title": "string",
"principal": "string"
}
curl / cURL
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/policies/projects/:project_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"role_id": "string",
"title": "string",
"principal": "string"
}'