# Read/write tag values from/to a REST API server

**URL:** <https://community.postman.com/t/read-write-tag-values-from-to-a-rest-api-server/46035>\
**Category:** Help Hub\
**Tags:** api, json-response, script-tag, get-request\
**Created:** [April 5, 2023, 1:05pm UTC](https://community.postman.com/t/read-write-tag-values-from-to-a-rest-api-server/46035 "2023-04-05T13:05:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![satellite-operator-1](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@satellite-operator-1](https://community.postman.com/u/satellite-operator-1)\
**Post date:** [April 5, 2023, 1:05pm UTC](https://community.postman.com/t/read-write-tag-values-from-to-a-rest-api-server/46035/1 "2023-04-05T13:05:03Z")

</div>

Hi Folks,

I’m a total newbie to Postman, so please forgive my mistakes and inevitable formatting inadequacies. I have searched the website, but I don’t think anyone else has had to ask such a basic question as this.

I’m using Postman to test responses to/from a REST API server provided by a product called Kepware. I can find no mention of Kepware anywhere on this site, but that may not matter. What I’m asking concerns the JSON call/response values.

The Kepware server is configured so that the REST API agent is pointing to a tag with the name “Channel1.Device1.Order”, which is of type string.

The REST API agent URL is “[http://127.0.0.1:39320/iotgateway](http://127.0.0.1:39320/iotgateway)”.

I tried making a POST request to the REST API server (URL link [http://127.0.0.1:39320/iotgateway/write](http://127.0.0.1:39320/iotgateway/write) ) using this JSON body script:

[{ “id”: “Channel1.Device1.Order”, “v”: “000000717087” }]

The intention was to write the value “000000717087” into the tag; and the actual script content came from an example in the Kepware manual.

Postman returned this JSON response, along with a status 200:

{ “writeResults”: [{ “id”: “Channel1.Device1.Order”, “s”: true, “r”: “” }] }

According to the manual, this response indicates that the tag value was successfully updated.

Now I want to read the same tag, but I have no example script. So I tried this:

GET [http://127.0.0.1:39320/iotgateway/read?id=“Channel1.Device1.Order”](http://127.0.0.1:39320/iotgateway/read?id=%22Channel1.Device1.Order%22)

Postman response (with status 200):

{ “readResults”: }

No errors, but no value either. Is my GET request incorrectly formatted? Or do you think the tag wasn’t successfully updated in the first place?

Cheers

John M.
