Trying a Method and Interpreting the Results
You can use the API Explorer to test the various methods. This topic explains the general process, with an explanation of the response the system returns. See the topics on each method type for specific method-related techniques.
The Try It Out! button for each method/resource interacts directly with the system. GET retrieves actual data, POST/PUT creates or modifies real resources, and DELETE removes real objects. You are making real configuration changes in the system, although the changes are not immediately deployed. To make the changes active, use the POST /operational/deploy resource to start a deployment job.
You can find the Try It Out! button after the Response Message section when you open a method/resource. For some method/resources, you must enter an object ID to test it. In this case, you typically need to first do a GET on the parent resource. For more information, see Finding the Object ID (objId) and Parent ID.
For POST/PUT, you also need to fill in the required values in the JSON model.
After you click Try It Out!, the API Explorer adds the results to the page after the button. The response includes the following sections:
- Curl
-
The curl command used to make the call. For example, clicking Try It Out! on the GET /object/networks resource returns something like the following. The "v" element in the path changes with each new version of the API.
curl -X GET --header 'Accept: application/json' 'https://ftd.example.com/api/fdm/latest/object/networks'
Note
This does not include the Authorization: Bearer header, which would be required in an API call from your client.
- Request URL
-
The URL to issue from your client to make the request. For example, for GET /object/networks:
https://ftd.example.com/api/fdm/latest/object/networks
- Response Body
-
The object that the system returns to your client. If a resource can include multiple objects (such as /object/network), you get a list of items on a GET request. POST/PUT/DELETE responses will be about a single object.
The specific content returned is based on the resource model. For example, GET /object/networks returns a list of objects, with each object looking something like the following (the initial indication of an items list is also shown). Note that the links/self value indicates the URL you would use to refer to this object; the object ID is included in the URL.
{ "items": [ { "version": "900f8558-7d19-11e7-bf7b-3dcaf0c58345", "name": "AIM_SERVERS-205.188.1.132", "description": null, "subType": "HOST", "value": "205.188.1.132", "isSystemDefined": true, "id": "900fac69-7d19-11e7-bf7b-d9417b20e59e", "type": "networkobject", "links": { "self": "https://ftd.example.com/api/fdm/latest/ object/networks/900fac69-7d19-11e7-bf7b-d9417b20e59e" } },
GET requests also include a paging section, which is explained in GET: Obtaining Data from the System.
- Response Code
-
The numeric HTTP status code returned for the HTTP call. These are the standard HTTP status codes, which you can find in RFCs or Wikipedia (such as https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). For example, 200 (OK) indicates a successful GET/PUT/POST call, and 204 a successful DELETE call.
- Response Headers
-
These are the packet headers in the HTTP response. For example, GET /object/networks might have headers such as the following:
{ "date": "Thu, 10 Aug 2017 19:19:16 GMT", "content-encoding": "gzip", "x-content-type-options": "nosniff", "transfer-encoding": "chunked", "connection": "Keep-Alive", "vary": "Accept-Encoding", "x-xss-protection": "1; mode=block", "pragma": "no-cache", "server": "Apache", "x-frame-options": "SAMEORIGIN", "strict-transport-security": "max-age=31536000 ; includeSubDomains", "content-type": "application/json;charset=UTF-8", "cache-control": "no-cache, no-store, max-age=0, must-revalidate", "accept-ranges": "bytes", "keep-alive": "timeout=5, max=99", "expires": "0" }