Obtain an authorization decision

post/decisions

Determines whether a specified principal is authorized to perform a specified action in a specified context. The response is either true (the action is authorized) or false (the action is not authorized).

Request Samples

1

Response Samples

1true

Request Body

The requested action and contextual details.

An authorization context where the permission field is required

NameTypeRequiredDescription
request
Authorization Context Request
false

A description of the HTTP request that is associated with an authorization request.

principals
array [Principal]
false

The set of principals representing the actor performing the action.

permission
string
true

A type of access.

Allowed values:
addcreatedeletereadremovesecureupdate
parameters
object
false

A map of keys to objects that represent the parameters and return object of a method being invoked. This can be null or empty.

matchParams
boolean
false

Whether the authorization service should strictly match query parameters in this context against a rule.

Default:
false
eachNamed
object
false

Map of parameter names to a new name that should be used in rule condition evaluation for collections. For example, if a parameter being used for evaluation is a collection named 'items', then eachNamed can map 'items' to 'item' so that item in the collection can be evaluated independently against a rule that references the '#item' variable.

version
integer<int32>
false

The authorization context's media type version. The version described here is version 1.

Responses

StatusMeaningDescription
200OK

Always returned if the request is successful and the request's Accept header is application/vnd.sas.authorization.direct.decision+json. However, if the Accept header is application/json or application/vnd.sas.authorization.direct.decision+json, 200 is returned only if the request is successful and the decision is true.

HeadersSchema
201Created

Always returned if the request is successful and the request's Accept header is text/plain

HeadersSchema
400Bad Request

The request was invalid. Returned if the authorization context is invalid.

403Forbidden

Returned if the request's Accept header is application/vnd.sas.authorization.decision+json or application/json and the request was completed successfully but the authorization decision is false.

Schema