Add to Favourites Add to Favourites    Print this Article Print this Article

I would like to run command "x" from DA using the API

We get many emails about how to run certain commands that are run with a browser, to be run through the API.

For most cases, the API command does already exists.  Search the Versions System is the best place to start with regards to that.

However, not all cases have specific CMD_API documentation.

Since the CMD_API_X commands are almost always exactly the same as the CMD_X commands (mins the command name and output) the simplest way to figure out what variables you need to pass would be to run DA in debug mode and use the "| grep string" option.  The "| grep string" option will filter the large amounts of debug output and only show you what variables are being passed.

Once DA is running in debug mode with the "| grep string" option, you can then go into your browser, login to DA and submit the function of DA that you'd like to use in your API.   After you post the command you're looking for, you'll notice output in your console that has variables.  These are the variables that you'll need for the CMD_API_X version of the CMD_X command you just ran.

Take these variables, add them into your API script, and see if it works.

Was this answer helpful?

Also Read