Synchronous direct calls

The example below synchronously runs a map on a web server that’s installed on the local host. The map has one input card and one output card. The command overrides the input card with the text string test data and requests the output data and audit log to be returned in the response:

> curl -X PUT -d "test data" "http://localhost:8080/tx-rest/v1/itx/maps/direct/OneInOneOut?input=1&output=1&return=audit"
PUT Runs a map synchronously.
-d "test data" Specifies the data to override a single card. To override multiple input cards, send the data for each card as multi-part form data, with the card number as the part name. For example:
"1=Card1 data" "2=Card2 data"
http://localhost:8080/tx-rest/v1/itx/maps/direct/ The hostname and port of the web server where the tx-rest.war file is deployed, and the base URL for invoking maps directly.
OneInOneOut The path to the compiled map file, relative to the map.dirs= path specified in the in the install_dir/tx-rest.properties file. The map file type (.mmc) is not required.
input=1&output=1

The map input and output cards to override with data. The format of the parameters depends on whether a single card is overridden or multiple cards are overridden.

Transfer data to or from a single card or a single audit or trace file as binary data. To override a single card, specify the card number as input=cardnum or output=cardnum.

Transfer data to or from multiple cards or transfer multiple returns (such as a single output card with a trace file) as multi-part form data.

  • To override multiple input cards, send the data for each card as multi-part form data, with the card number as the part name. For example:
     "1=Card1 data" "2=Card2 data"
  • To overwrite multiple output cards, specify:
     output=cardnum,cardnum
return=[audit][trace][status][auditonerror][traceonerror][statusonerror] Specifies what to return from the map. Separate multiple values with commas, for example:
return=audit,trace

If you specify auditonerror, traceonerror, or statusonerror, the map returns audit, trace, or status only if the map does not complete successfully.