Running Requests from the IEM CLI

This is the basic syntax for constructing requests using the IEM CLI:

iem <METHOD> <RESOURCE> [-q] [--param <value>]

where:

METHOD
Is one of the HTTP methods supported by that specific REST API resource. Depending on the method, the form of the request can be any of the following:

iem <GET|DELETE> <RESOURCE> [-q] [--outFile FILE] [--param value]
iem <POST|PUT> [inputFile] <RESOURCE> [-q] [--outFile FILE] [--param value]
iem login [-q] [--server=SERVER[:PORT]] [--windowsAuthentication] [--masthead=PATH_TO_TRUSTED_MASTHEAD]
iem login [-q] [--server=SERVER[:PORT]] [--user=USER] [--password=PASS] [--masthead=PATH_TO_TRUSTED_MASTHEAD]

where inputFile and the file referenced by --outFile are XML files containing resources descriptions as described in the schema files. POST and PUT requests require a body in their HTTP Requests. You can specify the body either as an input file on the command line, such as:

iem POST inputfile.xml operator/bigfix

or, you can enter it manually when prompted, for example:

iem POST query

Input: relevance=now

Because the IEM CLI does not do any pre-parsing or sanity checking on the requests issued, you must ensure that the input uses the format specified in the RESTAPI resource description.
RESOURCE
Is one of the REST API Resources.
-q
Means quiet mode. Set it to disable the input prompts.
--param
Is used to specify optional parameters that might be requested by the specific RESOURCE and METHOD. For example, if you want to use the RESTAPI resource /api/query, which requires the parameter relevance=, you can write:
iem GET query --relevance "names of bes computers"