/
Working with Anti-flooding policy using the API

Working with Anti-flooding policy using the API

Overview

Check the list of available endpoints and methods to work with anti-flooding policies using the Delivery methods API:

Endpoints and methods

Description

GETĀ /antiflooding see below

Lists a detailed description of the anti-flooding policies defined in the domain

GETĀ /antiflooding/{id} see below

Gets a detailed description of a specific anti-flooding policy.

POST /antiflooding see below

Creates a new anti-flooding policy in the domain

PUT /antiflooding/{id} see below

Update anti-flooding policy

DELETE /antiflooding/{id} see below

Deletes an anti-flooding policy in the domain

DELETE /antiflooding see below

Bulk delete of anti-flooding policies by IDs

PATCH /antiflooding/{id} see below

Update anti-flooding policy partially

Endpoints and methods

GET /antiflooding

Retrieves a list of anti-flooding policies in the domain.

Example

Find below a request example in cURL language. This request will retrieve all the anti-flooding policies in the domain that corresponds to the given token. Learn how to authorize your request in this article.

curl -H "standAloneToken:YOUR_TOKEN" -X GET "https://api-us.devo.com/delco/antiflooding"

Check the list of available responses:

Code

Description

Code

Description

200

Successful response. Available anti-flooding policies retrieved.

[ { "id": 533, "name": "default AF", "maxAlerts": 5, "period": "1h" }, { "id": 534, "name": "Testantiflooding", "maxAlerts": 5, "period": "5m" }, { "id":545, "name": "hello", "maxAlerts": 5, "period": "5m" }, { "id": 549, "name": "Another ANTIFLOODING POLICY NAME 2", "maxAlerts": 5, "period": "6m" } ]

400

Bad Request.

{ "code": 400, "msg": "string", "cid": "string", "context": { "additionalProp1": {}, "additionalProp2": {}, "additionalProp3": {} }, "messageKey": "string", "language": "string" }

401

Unauthorized

403

Insufficient permissions/policies.

500

Unexpected internal error

GET /antiflooding/{id}

Gets a detailed description of a specific anti-flooding policy given its ID.

Path parameters

Add the following path parameters as part of the endpoint:

Parameter

Type

Definition

Parameter

Type

Definition

id required

integer

ID of the anti-flooding policy you want to retrieve.

How can I get the ID of an anti-flooding policy

You can use the GET /antiflooding endpoint to get the IDs of the anti-flooding policies defined in your domain.

Example

Find below a request example in cURL language. This request will retrieve the anti-flooding policy with ID 533 in the domain that corresponds to the given token. Learn how to authorize your request in this article.

Check the list of available responses:

Code

Description

Code

Description

200

Successful response. Details of the sending policy retrieved.

400

Bad Request.

401

Unauthorized

403

Insufficient permissions/policies.

500

Unexpected internal error

POST /antiflooding

Creates a new anti-flooding policy in the domain and returns a detailed description of it

Request body

You must specify the updates you need to apply to the anti-flooding policy in the request body:

Parameter

Type

Definition

Parameter

Type

Definition

name required

string

Name of the new anti-flooding policy

maxAlerts required

integer

Maximum number of alerts that will be sent

periodrequired

string

Establish the periodicity used to keep track of the alert counter in order to limit the alert distribution.

Amount of time: Write the desired number

Time unit:

ā€œmā€ for minutes (minimum is 5m)

ā€œhā€ for hours

ā€œdā€ for days

Request example

PUT/antiflooding/{id}

Updates an existing anti-flooding policy in the domain and returns a detailed description of it

DELETE /antiflooding/{id}

Deletes an anti-flooding policy in the domain

DELETE /antiflooding/

Delete in bulk action a group of Anti-flooding Policies in the domain with a force option that, if disabled, won't delete them when they are associated to a Delivery Policy

PATCH /antiflooding/{id}

Partially updates an existing Anti-flooding Policy in the domain and returns a detailed description of it.