MyRapidi
MyRapidi

Search our Wiki

REST API Messages

Read messages from the API using a specific thread ID.

Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.

JSON:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X GET
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/messages?threadid=2018092690450Thread

An example of out-put:

{
  "threadid":"20180926090450Thread",
  "message":"Reading layout from NAVODATA004.\nRemoving existing design in configuration.\nDeleting existing layout from cookies.\nAdding new design in configuration - records: 1000\nAdding new design in configuration - records: 2000\nAdding new design in configuration - records: 3000\nAdding new design in configuration - records: 4000\nAdding new design in configuration - records: 4343\nAdding new layout to cookies - records: 1000\nAdding new layout to cookies - records: 2000\nAdding new layout to cookies - records: 3000\nAdding new layout to cookies - records: 4000\nAdding new layout to cookies - records: 4343\nFinished reading layout from NAVODATA004.\",
  "done": true
}

This out-put indicates that the messsage has finished.

{
  "threadid":"20180926090450Thread",
  "message":"",
  "done": true
}

JSONAPI:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X GET
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/messages?threadid=20180926090450Thread

The out-put for this example would be:

{
  "data":{
    "type":"messages",
    "attributes":{ 
      "threadid":"20180926090450Thread",
      "message":"Reading layout from NAVODATA004.\nRemoving existing design in configuration.\nDeleting existing layout from cookies.\nAdding new design in configuration - records: 1000\nAdding new design in configuration - records: 2000\nAdding new design in configuration - records: 3000\nAdding new design in configuration - records: 4000\nAdding new design in configuration - records: 4343\nAdding new layout to cookies - records: 1000\nAdding new layout to cookies - records: 2000\nAdding new layout to cookies - records: 3000\nAdding new layout to cookies - records: 4000\nAdding new layout to cookies - records: 4343\nFinished reading layout from NAVODATA004.\",
      "done": true}"
    }
  }
}

This output indicates that the message has finished.

{
  "data":{
    "type":"messages",
    "attributes":{
      "threadid":"20180926090450Thread",
      "message":"", 
      "done": true
    }
  }
}