Manage relay rules using the API
Juan Tomás Alonso Nieto (Deactivated)
Borja Moro Moreno (Unlicensed)
Overview
Check the list of available endpoints and methods to manage the rules assigned to your relays:
Endpoints and methods | Description |
---|
Endpoints and methods | Description |
---|---|
GET | Get the list of rules defined for a specific relay. |
post | Add new rules to a relay. |
PUT | Edit a rule of a relay. |
DELETE | Delete a rule of a relay. |
Endpoints and methods
GET /relays/{name}/rules
Get the list of rules defined for a specific relay.
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
|
| Enter the name of the relay that contains the rules you want to retrieve. |
Find below a request example:
https://api-us.devo.com/maduro/relays/myRelay/rules
Code | Description | Message |
---|
Code | Description | Message |
---|---|---|
200 | Successful response. Relay rules information retrieved. | [
{
"order": 1,
"name": "firewall rule",
"description": "a rule for firewalls",
"creationDate": "2014-05-24T20:38:00Z",
"updateDate": "2022-05-28T21:00:00Z",
"source": {
"port": 13004,
"ip": "127.0.0.1",
"tag": "my.firewall.tag",
"hostname": "local.cisco-10",
"message": "login failed",
"data": "login failed",
"hasSyslogTag": true,
"tcpThreads": 1,
"tcpReceiveBuffer": 256,
"udpThreads": 1,
"udpReceiveBuffer": 256,
"maxPacketSize": 4096,
"level": null,
"facility": null
},
"target": {
"tag": "my.firewall.tag",
"tagIsPrefix": false,
"message": "login failed",
"stopProcessing": false,
"drop": false
}
}
] |
400 | Bad request. The specific error will be shown in the message. | {
"error": {
"code": 12,
"message": "Invalid signature validation"
}
} |
403 | Forbidden request. | |
404 | Relay not found. | |
405 | Method not allowed. |
POST /relays/{name}/rules
Add new rules to a relay.
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
|
| Enter the name of the relay to which you want to add rules. |
Query string parameters
Query string parameters are optionally added after the path parameters, preceded by a question mark (?
) and separated by an ampersand (&
)
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
|
| If set to The default value is |
Request body
The request JSON body must include an object with the following key-value pairs:
One JSON object per rule
You must add a JSON object per each rule you need to define.
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
|
| Enter the name of the new rule. |
|
| Add an optional description for the relay rule. The default value is |
|
| The
|
|
| The
|
Find below a request example:
Code | Description | Message |
---|
Code | Description | Message |
---|---|---|
201 | Successful response. New rule(s) created. | - |
400 | Bad request. The specific error will be shown in the message. | |
403 | Forbidden request. | |
405 | Method not allowed. |
PUT /relays/{name}/rules
Edit a rule of a relay.
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
|
| Enter the name of the relay that contains the rules you want to edit. |
Request body
The request JSON body must include an object with the following key-value pairs:
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
|
| Enter the name of the rule you want to edit. |
|
| Add an optional description for the relay rule. The default value is |
|
| The
|
|
| The
|
Find below a request example:
DELETE /relays/{name}/rules
Delete a rule of a relay.