QuestionQ348

Using APIs

Drag the code snippets from the bottom to the blanks in the code to add a URL object for www.cisco.example.com to the Cisco Firepower Device Management system in an existing collection. The company requires the additions to be created through the API so it can build local repositories for other systems as they are installed and configured. The data must be transferred in a structured format. Not every option is used.

Drag & Drop
POST
url target
application/xml
application/json
PATCH
urlobject
curl -k -X 
-H 'Content-Type: '
-H 'Accept: application/json'
-H "Authorization: Bearer TOKEN"
-D '{"name": "cisco_web_site",
"url": "www.cisco.example",
"type": ""}'
https://192.168.1.1/api/fdm/v2/objects/networks
Explanation

Creating an object in the /objects/networks collection uses POST. The request body is JSON, requiring Content-Type: application/json; the FDM object discriminator for a URL object is urlobject.

Community Discussion

No comments yet. Be the first to start the discussion!