Attach a direct permission to an application

Grant a single permission directly to an application without replacing its complete direct-permission set, and synchronize the change to the identity provider. The permission is always scoped to your business. Attaching a permission the application already holds has no effect.

Required permissions: permission:update.

Authentication

AuthorizationBearer

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

Path parameters

resourceenumRequired
The resource type of the permission to attach.
actionenumRequired
The action of the permission to attach.
application_idstringRequired
The ID of the application.

Headers

X-Penny-As-Businessstring or nullOptional

Act on behalf of another business that has granted you access. Requires the business:act_as permission.

Response

The updated application.
application_idstring
Penny's unique identifier for this application.
versioninteger
A number that increases each time this application's details change. Use it to confirm you are looking at the latest information.
version_timedatetime
The date and time this application's details were last changed.
namestring

A human-readable name for this application.

descriptionstring

A human-readable description of what this application does.

statusenum

This application’s current lifecycle status: ‘active’, ‘deactivated’ (cannot authenticate), ‘suspended’ (restricted, typically pending review), or ‘deleted’.

Allowed values:
activeboolean
Whether this application is currently active.
deletedboolean
Whether this application has been removed.
business_idstring
The business this application belongs to.
roleslist of objects or nullOptional
The roles assigned to this application, if any.
typeenumOptionalDefaults to machine
The type of an application.
Allowed values:
permissionslist of objects or nullOptional
Permissions granted directly to this application, in addition to any granted through its roles.
client_idstring or nullOptional
The OAuth2 client ID this application uses to authenticate with Penny. Absent while the application is being provisioned or after it has been deprovisioned.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error