Skip to main content
POST
/
v2
/
app-resource-roles
Create App Resource Role
curl --request POST \
  --url https://public.api.serval.com/v2/app-resource-roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resourceId": "<string>",
  "name": "<string>",
  "provisioningMethod": {
    "builtinWorkflow": {}
  },
  "description": "<string>",
  "requestsEnabled": true,
  "accessPolicyId": "<string>",
  "externalId": "<string>",
  "externalData": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "resourceId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "requestsEnabled": true,
    "accessPolicyId": "<string>",
    "provisioningMethod": {
      "builtinWorkflow": {}
    },
    "externalId": "<string>",
    "externalData": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
resourceId
string
required

The ID of the resource.

name
string
required

The name of the role.

provisioningMethod
Builtin Workflow · object
required

Provisioning configuration. Exactly one method should be set.

description
string

A description of the role.

requestsEnabled
boolean

Whether requests are enabled for the role.

accessPolicyId
string | null

The default access policy for the role (optional).

externalId
string | null

The external ID of the role in the external system (optional).

externalData
string | null

Data from the external system as a JSON string (optional).

Response

Success

data
data · object

The created role.