Skip to content

API for External Consumers

Raghavendra Balgi edited this page Apr 24, 2020 · 4 revisions

The current Isosim API's don't follow any particular standard (and are pretty ugly :)). I'l hopefully clean them up and make them standards based like OpenAPI

Parse Trace API

This API helps to parse a trace given a spec name, a message name and a raw trace in hex format

root@LAPTOP-BIU3G27H:/mnt/c/Users/rkbal# cat parse_req.json
{
        "spec_name": "TestSpec",
        "msg_name": "Default Message",
        "data": "31313030fc000000000003100000002000000000313233F4F5F6123678abcdef313233343536373800120102030405060708090a0b0c000568656c6c6ff0f0f60009f1a3b2c13032f1f2"
}


root@LAPTOP-BIU3G27H:/mnt/c/Users/rkbal# curl -v -XPOST --data @parse_req.json http://localhost:8080/iso/v0/parse/external
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /iso/v0/parse/external HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Length: 217
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 217 out of 217 bytes
< HTTP/1.1 200 OK
< Date: Thu, 12 Mar 2020 06:11:46 GMT
< Content-Length: 910
< Content-Type: text/plain; charset=utf-8
<
[{"Id":5,"Name":"Fixed2_ASCII","Value":"123"},{"Id":8,"Name":"Fixed5_BINARY","Value":"abcdef"},{"Id":20,"Name":"VarField56_BCD_ASCII","Value":"hello"},{"Id":24,"Name":"VarField60_EBCDIC_BINARY","Value":"0009f1a3b2c1"},{"Id":9,"Name":"FxdField6_WithSubFields","Value":"12345678"},{"Id":7,"Name":"Fixed4_BCD","Value":"123678"},{"Id":3,"Name":"Message Type","Value":"1100"},{"Id":6,"Name":"Fixed3_EBCDIC","Value":"456"},{"Id":10,"Name":"SF6_1","Value":"1234"},{"Id":4,"Name":"Bitmap","Value":"11111100000000000000000000000000000000000000000000000011000100000000000000000000000000000010000000000000000000000000000000000000"},{"Id":14,"Name":"SF6_3","Value":"78"},{"Id":19,"Name":"VarField55_BCD_BINARY","Value":"0102030405060708090a0b0c"},{"Id":25,"Name":"VarField91_ASCII_EBCDIC","Value":"12"},{"Id":12,"Name":"SF6_1_2","Value":"34"},{"Id":11,"Name":"SF6_1_1","Value":"12"},{"Id":13,"Name":"SF6_2","Value":"56"}]
* Connection #0 to host localhost left intact
root@LAPTOP-BIU3G27H:/mnt/c/Users/rkbal#