Skip to main content

 

 

Cisco Defense Orchestrator

Create a REST API Macro

Create a REST API Macro from a New Command

  1. Before you create a REST API macro, test the command in CDO's REST API Interface to make sure the command syntax is correct and it returns reliable results.

Note: You can only create macros for a device once it has been onboarded to CDO. 

  1. Select an FTD device you want to manage using the REST API, and in Device Actions on the right, click API Tool.
  2. Click the REST API macro favorites star cli_star.png to see what macros already exist.
  3. Click the plus button cli_create_plus.png.
  4. Give the macro a unique name. Provide a description and notes for the REST API macro if you wish.
  5. Select a Request Method and enter the endpoint URL in the Request Endpoint field. See Cisco Firepower Threat Defense REST API Guide for detailed information. 
  6. Replace the parts of the command that you would want to modify, when you run the command, with a parameter name surrounded by curly braces.

Example_REST_API_Create_Macro.jpg

  1. Click OK. The macro you create is available for use on all the devices of that type, not just the one you initially specified.

To run the command see, Run a REST API Macro.

Create a REST API Macro from History or from an Existing REST API Macro

In this procedure, you are going to create a user-defined REST API macro from a command you have already executed, another user-defined macro, or from a system-defined macro. 

  1. Select an FTD device you want to manage using the REST API, and in Device Actions on the right, click API Tool.

Note: If you want to create a user-defined macro from REST API history, select the device on which you ran the command. REST API macros are shared across devices on the same account but not REST API history.

  1. Find the command you want to make an API macro from and select it. Use one of these methods:
  • Click the clock clock.png to view the commands you have run on that device. Double-click to select the one you want to turn into a macro and the command appears in the command pane.
  • Click the API macro favorites star cli_star.png to see what macros already exist. Select the user-defined or system-defined API macro you want to change. The command appears in the command pane.
  1. With the command in the command pane, click the API macro gold star cli_macro_gold_star.png. The command is now the basis for a new API macro.
  2. Give the macro a unique name. Provide a description and notes for the API macro if you wish.
  3. Review the command in the Command field and make the changes you want. 
  4. Replace the parts of the command that you would want to modify, when you run the command, with a parameter name surrounded by curly braces.
  5. Click Create. The macro you create is available for use on all the devices of that type, not just the one you initially specified.

To run the command see, Run a REST API Macro.

Related Topics

About FTD REST API Macros

 

  • Was this article helpful?