Commands

The REST API supports commands for certain actions like creating a work order from an asset or from a request. Commands always use a POST verb. They return 200 OK if they succeeded and will return a CommandResponse which may include the Url of the returned object as well as any messages that may be relevant for the user.

Commands can be discovered using Action Links. They also typically follow a url pattern, so if you already know exactly what you will be doing and the only variance will be which record you want to run the command on, you may be able to mostly hardcode the url.

This is the command for creating a work order from a request from the request action links:

commands

The url format is:

The moduleId for requests is 50, the above screen cap shows the url for creating a work order from a request with an AutoNumber = 23250.

No body is required for this request. The response will be a CommandResponse:

commands 2

This is a succesful response which provides the data url to the newly created work order.

commands 3

Here are some of the tools that you may be interested in:

See Also

Special Functions

Getting Record Counts: $count

Getting pick lists: {PropertyName}/ and {PropertyName}/$count

Caching support on lookups

Special lookups

Getting a new empty object: $new

Getting metadata: $fields

Discoverability

Document attachments, uploads, downloads

Working with Existing Filters: $filters and $myfilters

Errors

Tools

Clearing Cached Data: $cache

Warnings and Conflicts

Getting live updates based on property changes made by an end user

Secure Fields

ObjectCanBeEditied,ObjectCanBeDeleted

SQL Injection Considerations