Custom Rules (Collection)


Get all Custom Rules

GET https://apis.wso2.com/api/am/admin/v0.16/throttling/policies/custom

Retrieves all Custom Rules. **NOTE:** * Only super tenant users are allowed for this operation.

OAuth 2.0 Scope

Not required

Examples

Parameters

Type Name Description Schema Default
Header

Accept

optional

Media types acceptable for the response. Default is application/json.

String

application/json

Header

If-None-Match

optional

Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource (Will be supported in future).

String

Header

If-Modified-Since

optional

Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future).

String

Responses

HTTP Code Description Schema

200

OK. Policies returned

CustomRuleList

304

Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future).

406

Not Acceptable. The requested media type is not supported.

Error

Add a Custom Rule

POST https://apis.wso2.com/api/am/admin/v0.16/throttling/policies/custom

Adds a new Custom Rule. **NOTE:** * Only super tenant users are allowed for this operation.

OAuth 2.0 Scope

Not required

Examples

Parameters

Type Name Description Schema Default
Body

body

required

Custom Rule object that should to be added

CustomRule (CustomRule)

Header

Content-Type

required

Media type of the entity in the body. Default is application/json.

String

application/json

Responses

HTTP Code Description Schema

201

Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity.

CustomRule

400

Bad Request. Invalid request or validation error

Error

415

Unsupported media type. The entity of the request was in a not supported format.