Retrieve service objects
The get_service_objects request retrieves all the service objects of a device or a group of devices, along with the protocol and ports contained in each object.
The input will be the active session ID and the name of a device or a device group. The output will be a list of all the service objects of all the devices of the selected group, along with the content of each object.
Resource Name: /fa/server/network_services/read
Request Method: GET
Request URL Parameters:
Element |
Type |
Description |
---|---|---|
sessionMandatory |
String |
Session ID returned in login request. |
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 200000000. |
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 -H "Accept:application/json" -k https://192.168.3.76/fa/server/network_services/read?session=b24d684a54595483db7def6a84129dc2&entity=Alessia&size=2&page=3
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
}