Hosts
List all hosts
Request
Definition
GET /api/v1/hosts
Headers
-
Authorization
requiredAuthentication 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. |
host_name_search | string | No | Filters Hosts whose names match all or part of the string entered. |
host_name_list | array<string> | No | Filters Hosts whose names match any of the names in the list. |
server_address | string | No | Filters Hosts whose server IP address matches the string entered. |
unrelated | boolean | No | Filters Hosts that are not associated with a Domain Group. |
Response
Status codes
Status code | Message |
---|---|
200 | "List of hosts" |
400 | "Error with pagination fields" |
403 | "Forbidden" |
Body
- Attributes
- Example
-
data.hosts.id
stringHost ID.
-
data.hosts.first_seen
integerDate of the first appearance of the Host.
-
data.hosts.last_seen
integerDate of the last appearance of the Host.
-
data.hosts.name
stringHost name.
-
data.hosts.servers
array<string>Servers to which the Host belongs.
-
data.hosts.traffic_sources
array<string>Traffic sources configured for the Host.
{
"data": {
"hosts": [
{
"first_seen": "2022-02-04T13:06:45.105811Z",
"id": "kb+UUJ95RqfrxxxxxphO3Uxxxo2Nq4pbxxxxxxgnZrc=",
"last_seen": "2022-02-04T13:06:45.105811Z",
"name": "www.service-test.it",
"servers": [],
"traffic_sources": []
}
]
},
"message": "List of hosts",
"pagination": {
"first": 1,
"last": 1,
"page": 0,
"total_count": 1,
"total_pages": 1
},
"status": "ok"
}
Delete specific host
Request
Definition
DELETE /api/v1/hosts/{id}
Headers
-
Authorization
requiredAuthentication token with privileges to view the resource.
Bearer {token}
Response
Status codes
Status code | Message |
---|---|
200 | "Hosts succesfully deleted" |
400 | "Error deleting hosts" |
403 | "Forbidden" |
Body
{
"message": "Hosts succesfully deleted",
"status": "ok"
}
Delete multiple hosts
Request
Definition
DELETE /api/v1/hosts
Headers
-
Authorization
requiredAuthentication token with privileges to view the resource.
Bearer {token}
-
Content-Type
requiredapplication/json
Request body
{
"host_ids": [
"kb+UUJ95RqfrIPfmjphO3UEZGo2Nq4pbAp0yNWgnZrc="
]
}
Response
Status codes
Status code | Message |
---|---|
200 | "Hosts succesfully deleted" |
400 | "Error deleting hosts" |
403 | "Forbidden" |
Body
{
"message": "Hosts succesfully deleted",
"status": "ok"
}