- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-07-2018 02:52 AM
Hi,
Is it possible to execute operational commands via XML API for selected virtual system. E.g ?
https://<IP_address>/api/?type=op&cmd=<SOME_COMMAND_HERE>&key=<API_KEY>
Can I specify somehow in context of which VSYS this should be executed ? Is there any property which can be used ?
Regards,
Piotr
09-14-2018 06:04 AM
Hello @miduchp,
You can use operational commands in API the same way of the CLI:
- if you cannot use a command in the CLI, you cannot used in the API
For example with the CLI you can execute: show object static ip <ip/netmask> vsys <value>
So with the API you can use this request: /api/?type=op&cmd=<show><object><static><vsys>fwaws</vsys><ip>10.120.1.1</ip></static></object></sho...
You can navigate all XML URL using this link: https://<Firewall IP>/api
Kind Regards.
10-03-2018 06:53 AM
Append "&vsys={vsys_name}" to your request to target a specific vsys
This should work for any op command in a multi-vsys system
in your example:
https://<IP_address>/api/?type=op&cmd=<SOME_COMMAND_HERE>&key=<API_KEY>&vsys=vsys1
06-29-2023 07:07 AM
this is what im trying to accomplish but i keep getting errors. object_string will dynamically be learned in another part of my script.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!