Legitimate
List all legitimate
Request
Definition
GET /api/v1/legitimate_rules
Headers
-
AuthorizationrequiredAn authentication token with privileges to view the resource.
Bearer {token}
Query string parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
paginate | boolean | Yes | If the result must be paginated. |
page | integer | Yes if paginate is true | Page index. |
page_size | integer | Yes if paginate is true | Number of items displayed per page. |
pattern | string | No | Filters the results related to the specified pattern. |
rq_host | string | No | Filters the results related to the specified Host. |
rq_host_list | array<string> | No | Filters the results related to the list of Hosts entered. |
rq_host_search | string | No | Filters results where the Host matches all or part of the entered string. |
target | string | No | Filters the results related to the destination entered. |
timestamp_start | integer | No | Filters results created after the entered date. |
timestamp_end | integer | No | Filters results created before the entered date. |
username | string | No | Filters results where the username of the creator of the legitimate matches the string entered. |
username_list | array<string> | No | Filters results where the username of the creator of the legitimate matches one of the items in the list. |
Response
Status codes
| Status code | Message |
|---|---|
| 200 | "List of legitimates" |
| 400 | "Error with pagination fields" |
| 403 | "Forbidden" |
Body
- Attributes
- Example
-
data.legitimates.additional_infoobjectSome addtional informations about the legitimate.
-
data.legitimates.attack_categorystringAttack category.
-
data.legitimates.attack_codestringCode identifying the type of attack.
-
data.legitimates.attack_namestringAttack type.
-
data.legitimates.idstringLegitimate ID.
-
data.legitimates.pathstringURI path that makes up the legitimate.
-
data.legitimates.patternstringPattern associated with the legitimate.
-
data.legitimates.rq_hoststringHost header associated with the legitimate.
-
data.legitimates.targetstringTarget field of the legitimate.
-
data.legitimates.timestampintegerDate and time when the legitimate was created in UNIX format (microseconds).
-
data.legitimates.usernamestringUsername of who created the legitimate.
{
"data": {
"legitimates": [
{
"additional_info": null,
"attack_category": null,
"attack_code": null,
"attack_name": null,
"id": "5xxONxxxSRBZm3xxxxxPBFexxNE+7AxxyNxxxZrc=",
"path": null,
"pattern": "rm -rf",
"payload": null,
"rq_host": "xxxxxxxx.xxxxxx.it",
"target": "parameter_value",
"timestamp": 1705497122973776,
"username": "username"
}
]
},
"message": "List of legitimates",
"pagination": null,
"status": "ok"
}
List a specific legitimate
Request
Definition
GET /api/v1/legitimate/{legitimate_id}
Headers
-
AuthorizationrequiredAuthentication token with privileges to view the resource.
Bearer {token}