Roles

Create or update role

put/v1/permissions/roles/{roleId}

Request

  • Base URL
    https://permissions.sls.epilot.io
  • URL
    https://permissions.sls.epilot.io/v1/permissions/roles/{roleId}
  • Auth
    • HTTP bearer
    • or API key in header x-epilot-org-id

Path parameters

roleIdstring required

Format: <organization_id>:<slug>

Example:123:owner

Request body

OR
OR
OR
OR

Example request

{
  "grants": [
    {
      "action": "entity-read",
      "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
      "conditions": [
        {
          "attribute": "workflows.primary.task_name",
          "values": [
            "Qualification"
          ]
        }
      ],
      "dependencies": [
        {
          "action": "entity-read",
          "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
          "conditions": [
            {
              "attribute": "workflows.primary.task_name",
              "values": [
                "Qualification"
              ]
            }
          ]
        }
      ]
    }
  ],
  "id": "123:owner",
  "name": "Owner",
  "slug": "owner",
  "expires_at": "2028-07-21T17:32:28Z",
  "organization_id": "123",
  "parent_role": "123:owner"
}

Response

ok

OR
OR
OR
OR

Example response

{
  "id": "123:owner",
  "name": "Owner",
  "slug": "owner",
  "expires_at": "2028-07-21T17:32:28Z",
  "organization_id": "123",
  "grants": [
    {
      "action": "entity-read",
      "resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
      "conditions": [
        {
          "attribute": "workflows.primary.task_name",
          "values": [
            "Qualification"
          ]
        }
      ]
    }
  ],
  "parent_role": "123:owner"
}

Changes

    • info

      added the new optional request property //////

    • info

      added the optional property ///// to the response with the status

    • breaking

      added subschema #1 subschema #2 to the request body allOf list

    • warning

      removed subschema #1 subschema #2 from the request body allOf list

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added the optional property ///////////////// to the response with the status

    • info

      added to the //////////// response property anyOf list for the response status

    • info

      added to the //////////// response property anyOf list for the response status

    • info

      added to the //////////// response property anyOf list for the response status

    • info

      added to the //////////// response property anyOf list for the response status

    • info

      added to the //////////// response property anyOf list for the response status