Skip to main content
Skyhigh Security

Requesting resources

A request sent to the REST interface regarding system files, log files, lists, and some other items is considered to
be a request for resources.

The response to a request for resources can be one of the following:

  • Entry — An entry delivers information in xml format about an individual resource, such as its ID, name, or the URL that can be used to access it
  • Feed — A feed delivers information in xml format about a collection of resources.
    • A feed can, for example, be a list of appliances that are available as nodes in a Central Management configuration, or a list of all lists that exist on an appliance, or a list of all lists of a particular type.
  • Binary data — Binary data is delivered in a file that you requested for downloading.

A response can also be empty. This is the case when the requested data is not available.

Reducing xml data overhead

You can reduce the xml data overhead that you receive with a response, by including an appropriate Accept header in a request for resources. For this purpose, the header value must be application/mwg+xml.

Instead of an entry in the normal Atom format, you will then receive only the xml data from the content part of that format.

Instead of a feed in Atom format, you will only receive a list of IDs for the resources you asked for.

Similarly, you can reduce xml data overhead when working with the resources, for example, when modifying them. For this, you need to set the Content-Type header to application/mwg+xml.

Paging a feed

When requesting a feed, you can use paging, which means you can ask for a feed that is divided into pages.

Paging information is specified by query parameters that are added to the URL in a request. The following two parameters can be used:

  • pageSize — Maximum number of elements on a page
  • page — Page number

 A request for a feed that uses paging could look as follows:

curl -i -b cookies.txt "$REST/list?pageSize=10&page=4"

 If a feed is, for example, a list of 35 lists, the pageSize parameter in the above request divides it up into four pages, three of which contain ten lists, while the last one contains only five. The last page is also the one that is delivered.

Navigating within a feed

To allow navigation within a feed, the xml file that you receive contains appropriate links.

Using these links, you can go to the current, next, previous, first, and last page, respectively.

  • Was this article helpful?