Retrieving a resource

You can use a GET request on the specific API Client element's URI to retrieve the content of the element.

Example: After having retrieved the API's URI for hosts, the following request:

GET 7.1/elements/host 

returns the following:

{
    "result":
    [
        {
            "href": "http://localhost:8082/7.1/elements/host/86",
            "name": "Your-Freedom Servers",
            "type": "host"
                },
        {
            "href": "http://localhost:8082/7.1/elements/host/39",
            "name": "DHCP Broadcast Destination",
            "type": "host"
        },
        …
    ]
}

The HTTP request lists all defined hosts with their API's URIs. If a specific host is needed, search for the host by name to get a similar result but only including the particular host.

For example, the following request:

GET 7.1/elements/host/39
returns a 200 HTTP response status code and the specified XML/JSON description.
Tip: The Accept HTTP request header determines the output format (XML or JSON).