Rules

Create a new authorization rule

Creates a new authorization rule that has a system-generated ID.

post/rules

Request

  • Base URL: http://example.com/authorization
  • URL: http://example.com/authorization/rules
  • Auth: none declared

Headers

Content-Typestring

Specifies the format of the incoming rule. Supported media types are:<br> <ul> <li>application/vnd.sas.authorization.rule+json;version=1</li> <li>application/vnd.sas.authorization.rule+json;version=2</li> <li>application/vnd.sas.authorization.rule+json;version=3</li> <li>application/vnd.sas.authorization.rule+json;version=4</li> <li>application/vnd.sas.authorization.rule+json;version=5</li> <li>application/vnd.sas.authorization.rule+json;version=6</li> <li>application/vnd.sas.authorization.rule+json;version=7</li> <li>application/vnd.sas.authorization.rule+json;version=8</li> <li>application/vnd.sas.authorization.rule+json;version=9</li> <li>application/vnd.sas.authorization.rule+json;version=10</li> </ul>

Acceptstring

Specifies the desired format of the returned rule. Supported media types are:<br> <ul> <li>application/vnd.sas.authorization.rule+json;version=1</li> <li>application/vnd.sas.authorization.rule+json;version=2</li> <li>application/vnd.sas.authorization.rule+json;version=3</li> <li>application/vnd.sas.authorization.rule+json;version=4</li> <li>application/vnd.sas.authorization.rule+json;version=5</li> <li>application/vnd.sas.authorization.rule+json;version=6</li> <li>application/vnd.sas.authorization.rule+json;version=7</li> <li>application/vnd.sas.authorization.rule+json;version=8</li> <li>application/vnd.sas.authorization.rule+json;version=9</li> <li>application/vnd.sas.authorization.rule+json;version=10</li> </ul>

Request body

conditionstring

A Spring Expression Language (SpEL) expression that limits the applicability of the rule. The rule applies only in authorization contexts in which the expression evaluates to 'true'.

containerUristring

A relative URI that represents the container aspect of a container object, such as a folder. Rules that target a container URI affect access that the container conveys to its child members.

expirationTimeStampstring date-time

The date and time at which the rule expires. Expired rules should be disregarded and deleted.

filterstring

Filter criteria for the rule's target object (or objects). This property is not currently in use.

contentTypestring

Media type of the object that is handled by an endpoint. If set, rules will only apply to endpoints that consume resources of this type. Most rules do not specify a content type.

acceptTypestring

Media type of the object returned by an endpoint. If set, rules will only apply to endpoints that produce resources of this type. Most rules do not specify an accept type.

acceptItemTypestring

Media type of object in a resource collection that is returned by an endpoint. If set, rules will only apply to endpoints that produce a resource collection containing resources of this type. Most rules do not specify an accept item type.

objectUristring required

A relative URI or ANT-path pattern that represents a resource or set of resources. Most rules target an object URI.

permissionsstring[] required

The specific actions that the rule affects (for example: read, update, delete, create, secure, add, or remove).

principalstring required

Specifies the ID of a user or group to which the rule applies. Use this property in conjunction with the principalType property.

principalType'user' | 'group' | 'authenticatedUsers' | 'everyone' | 'guest' required

The type of principal or construct to which the rule applies.

reasonstring

Information that a client can display to end users for diagnostic purposes. For example, a prohibit rule’s reason could be displayed to an end user as part of an 'access denied' message.

type'grant' | 'prohibit' required

Indicates whether the rule blocks (prohibit) or attempts to provide (grant) access to the specified principal.

versioninteger

The version of the rule representation. The current representation version is 8.

descriptionstring

Information that documents the rule for administrative purposes.

enabledboolean

Indicates whether the rule is enabled.

matchParamsboolean

Indicates whether the rule applies to only those requests whose query parameters exactly match the rule target.

Response

A new authorization rule was created.

conditionstring

A Spring Expression Language (SpEL) expression that limits the applicability of the rule. The rule applies only in authorization contexts in which the expression evaluates to 'true'.

containerUristring

A relative URI that represents the container aspect of a container object, such as a folder. Rules that target a container URI affect access that the container conveys to its child members.

expirationTimeStampstring date-time

The date and time at which the rule expires. Expired rules should be disregarded and deleted.

filterstring

Filter criteria for the rule's target object (or objects). This property is not currently in use.

contentTypestring

Media type of the object that is handled by an endpoint. If set, rules will only apply to endpoints that consume resources of this type. Most rules do not specify a content type.

acceptTypestring

Media type of the object returned by an endpoint. If set, rules will only apply to endpoints that produce resources of this type. Most rules do not specify an accept type.

acceptItemTypestring

Media type of object in a resource collection that is returned by an endpoint. If set, rules will only apply to endpoints that produce a resource collection containing resources of this type. Most rules do not specify an accept item type.

objectUristring required

A relative URI or ANT-path pattern that represents a resource or set of resources. Most rules target an object URI.

permissionsstring[] required

The specific actions that the rule affects (for example: read, update, delete, create, secure, add, or remove).

principalstring required

Specifies the ID of a user or group to which the rule applies. Use this property in conjunction with the principalType property.

principalType'user' | 'group' | 'authenticatedUsers' | 'everyone' | 'guest' required

The type of principal or construct to which the rule applies.

reasonstring

Information that a client can display to end users for diagnostic purposes. For example, a prohibit rule’s reason could be displayed to an end user as part of an 'access denied' message.

type'grant' | 'prohibit' required

Indicates whether the rule blocks (prohibit) or attempts to provide (grant) access to the specified principal.

versioninteger

The version of the rule representation. The current representation version is 8.

descriptionstring

Information that documents the rule for administrative purposes.

enabledboolean

Indicates whether the rule is enabled.

matchParamsboolean

Indicates whether the rule applies to only those requests whose query parameters exactly match the rule target.

ruleIdstring

The unique identifier for the rule.

createdBystring

The ID of the user who created the rule.

creationTimeStampstring date-time

The date and time at which the rule was created.

modifiedBystring

The ID of the last user to modify the rule.

modifiedTimeStampstring date-time

The date and time at which the rule was last modified.

Changes

No recorded changes to this operation across all 1 revision of this API.