Retrieve service objects
Retrieves all the service objects of a device or a group of devices, along with the protocol and ports contained in each object.
The output response lists all the service objects of all the devices of the selected group, along with the content of each object.
Resource Name:
/api/v1/network_services
Request Method: GET
Request URL Parameters:
Element |
Type |
Description |
---|---|---|
entityMandatory |
String |
The display name of the device, group, or matrix. |
entityTypeOptional |
String |
One of the following:
|
sizeOptional |
Integer |
Number of results per page. The default value is 10. |
pageOptional |
Integer |
Page number to return. The default value is 1 (the first page). Note: This element requires a definition for size. Defining this element without size will cause the return to be empty. |
Element |
Type |
Description |
---|---|---|
totalPages |
Integer |
The total number of pages. By default, all of the results are on one page. |
totalElements |
Integer |
The total number of network objects for the entity. |
currPageNumber |
Integer |
The page number returned. By default, the first page (1). |
currPageElements |
Integer |
The number of network objects whose information has been returned. |
entitiesResponses |
List of entitiesResponse objects. |
A list of network object information. See entitiesResponse Type (see EntitiesResponse type). |
status |
String |
One of the following:
|
messageOnly is returned when the request fails. |
String |
An error message. |
Request example
curl -X GET "https://<localhost>/afa/api/v1/network_services?entity=Alessia&entityType=FIREWALL&page=0&size=10" -H "accept: */*"
Response example
{
"totalPages": 1428,
"totalElements": 2856,
"currPageNumber": 3,
"currPageElements": 2,
"entitiesReponses": [ {
"name": "Alessia",
"devices": ["Alessia"],
"values": [
{
"id": 506605,
"name": "Pinterest",
"serviceDefinitions": ["tcp/443/*"]
},
{
"id": 506644,
"name": "IRTP",
"serviceDefinitions": ["28/*/*"]
}
]
}],
"status": true
}