Skip to content
SoulFire LogoSoulFire

Set user plugin permission grant

PUT
/v1/users/{user_id}/plugin-permissions/{permission_id}

Creates or replaces one explicit plugin permission override.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

user_id*string
Formatuuid
permission_id*string

Request Body

application/json
  1. body
scope*soulfire.v1.PluginPermissionScope

The scope in which a plugin permission is evaluated.

Value in"PLUGIN_PERMISSION_SCOPE_UNSPECIFIED""PLUGIN_PERMISSION_SCOPE_GLOBAL""PLUGIN_PERMISSION_SCOPE_INSTANCE""PLUGIN_PERMISSION_SCOPE_BOT""PLUGIN_PERMISSION_SCOPE_TASK"
resourceId?|
Formatuuid
granted*boolean

Response Body

An explicit user-level override for a dynamically registered plugin permission.

application/json
  1. response

An explicit user-level override for a dynamically registered plugin permission. Records remain persisted when a plugin is absent so reinstalling a plugin cannot silently change the meaning of an existing grant.

userId*string
Formatuuid
permissionId*string
scope*soulfire.v1.PluginPermissionScope

The scope in which a plugin permission is evaluated.

Value in"PLUGIN_PERMISSION_SCOPE_UNSPECIFIED""PLUGIN_PERMISSION_SCOPE_GLOBAL""PLUGIN_PERMISSION_SCOPE_INSTANCE""PLUGIN_PERMISSION_SCOPE_BOT""PLUGIN_PERMISSION_SCOPE_TASK"
resourceId?|

Empty only for global permissions. Instance, bot, and task permissions use the corresponding resource UUID.

Formatuuid
granted*boolean

True grants and false explicitly denies the permission.

active*boolean

False when the owning plugin is not currently installed.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PUT 'http://127.0.0.1:38765/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/plugin-permissions/string' \
  -H 'Content-Type: application/json' \
  -d '{
  "scope": "PLUGIN_PERMISSION_SCOPE_UNSPECIFIED",
  "granted": true
}'
Example Response
{
  "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  "permissionId": "string",
  "scope": "PLUGIN_PERMISSION_SCOPE_UNSPECIFIED",
  "resourceId": "string",
  "granted": true,
  "active": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Was this page helpful?