Skip to main content
POST
/
v1beta1
/
permissions
Create Permission
curl --request POST \
  --url https://api.example.com/v1beta1/permissions \
  --header 'Content-Type: application/json' \
  --data '
{
  "bodies": [
    {
      "name": "<string>",
      "namespace": "<string>",
      "key": "<string>",
      "title": "<string>",
      "metadata": {}
    }
  ]
}
'
{
  "permissions": [
    {
      "id": "<string>",
      "name": "<string>",
      "title": "<string>",
      "namespace": "<string>",
      "key": "<string>",
      "metadata": {},
      "created_at": "<string>",
      "updated_at": "<string>"
    }
  ]
}
Creates one or more permissions that can be used to grant access to resources in a Frontier instance.

Body

bodies
array
required
Array of permission definitions to create

Response

permissions
array
Array of created permission objects
curl -X POST 'https://frontier.example.com/v1beta1/permissions' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "bodies": [
      {
        "key": "compute.instance.get",
        "title": "Get Instance",
        "metadata": {
          "description": "Allows getting instance details"
        }
      }
    ]
  }'

Request Example

{
  "bodies": [
    {
      "name": "get",
      "namespace": "compute/instance",
      "title": "Get Instance",
      "metadata": {
        "description": "Allows getting instance details"
      }
    },
    {
      "key": "compute.instance.create",
      "title": "Create Instance",
      "metadata": {
        "description": "Allows creating new instances"
      }
    }
  ]
}

Response Example

{
  "permissions": [
    {
      "id": "9f256f86-20ad-434e-b009-6d6dadec6aa9",
      "name": "get",
      "title": "Get Instance",
      "namespace": "compute/instance",
      "key": "compute.instance.get",
      "metadata": {
        "description": "Allows getting instance details"
      },
      "created_at": "2023-06-07T05:39:56.961Z",
      "updated_at": "2023-06-07T05:39:56.961Z"
    }
  ]
}

Build docs developers (and LLMs) love