---
title: "REST API Messages"
description: "REST API Messages"
keywords: "REST API Messages"
url: "https://www.myrapidi.com/wiki/rest_api_messages"
locale: "en"
published: "2018-09-26T09:48:52Z"
modified: "2023-04-06T14:16:30Z"
---

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
    }
  }
}
```
