Get Service Objects by Entity

Returns a list of all the service objects of a specified entity (firewall/group/matrix). Includes the content of each object.

Resource name: /api/v1/network_services

Request Method: GET

Request query parameters

Parameter Type Description
entity

mandatory

string The display name of the firewall, group, or matrix. To get the display name, use GET /devices method from the Devices Setup. (Required)
entityType string One of the following: FIREWALL, GROUP, or MATRIX. Default is FIREWALL.
page integer The page number for the page of results to return in the response. Default is 0 (the first page).
size integer The number of results to include on each page in the response. Default is 10.

Request example

Copy
 {
        "entity": "Firewall1",
        "entityType": "FIREWALL",
        "page": 0,
        "size": 10
    }

cUrl Example:

Copy
curl -X GET "https://<localhost>/api/v1/network_services?entity=Firewall1&entityType=FIREWALL&page=0&size=10" 
                -H "Authorization: Bearer your_token"

Status codes

Code Description
200 OK
400 Invalid session provided
401 Unauthorized
403 Forbidden
404 Not Found
423 Locked
429 Too Many Requests
500 Internal Server Error
503 Service Unavailable

Response parameters

Parameter Type Description
id integer Unique identifier of the service object.
name string Name of the service object.
serviceDefinitions array of strings Service definitions associated with the object.

Response example success 200:

Copy
{

  "totalPages": 53,

  "totalElements": 527,

  "currPageNumber": 0,

  "currPageElements": 10,

  "entitiesReponses": [

    {

      "name": "m_10_20_12_13",

      "devices": [

        "R80.10-GW-1"

      ],

      "values": [

        {

          "id": 78748,

          "name": "lpdw0rm",

          "serviceDefinitions": [

            "tcp/515/*"

          ]

        }

      ]

    }

  ]

}
 

Response example failure 400:

Copy
{
    "error": "Invalid session provided"
}