Examples of REST API commands#

Many REST and command-line client commands have examples in their help topics. A few more examples using various programming languages and scenarios are provided here. The commands are similar for the server.

Complete scenarios#

For complete examples of using several REST commands together, see the following pages:

Authentication#

To run commands, you must first authenticate to the server. See Authenticating for REST commands.

Running REST commands in process steps#

Plug-ins contain many steps that do the same tasks as REST API commands, but if you want to run a REST command as part of a process, one way to do so is to use the Send HTTP Call step in the Web Utilities plugin. To use the REST API with this step, add the step to a process and specify the following information:

Running REST commands in the command-line interface#

The Linux™ program curl is one of many programs that can run REST commands from the command line. For an example, see Running REST commands.

Running REST commands in Java™#

For an example of running REST commands in Java, see Authenticating for REST commands.

Running REST commands in Python#

For an example of running REST commands in Python, see Authenticating for REST commands.

Running REST commands in a Groovy script#

For an example of running REST commands in a Groovy script, see the following page: https://github.com/IBM-UrbanCode/groovy-sample-scripts-UCD

Parent topic: REST API reference