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]
iem POST inputfile.xml operator/bigfix
iem POST query
Input: relevance=now
- 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"