REST API - Post Errors 415, 400

I was able to get data from an Azure database and put it into a Perspective Table in Ignition but I'm having trouble formatting the Post into the database. When I successfully do it through Postman, there's quite a few headers that it adds and I'm not sure which ones are required by if any.

With the code below, I get a 415 – Unsupported Media Type error.

'' [415]>

TagList = {
"system": "System X",
"sector": "175X",
"unit": "1X",
"point": "Temp",
"value": 87.6,
"timestamp": "2023-07-21T00:00:00.053Z"

client =

url = self.parent.parent.getChild("FlexContainer_datapoints_URL").getChild("TextField").props.text

Response =, TagList, username="admin", password="!%^$!")

I thought the TagList object would be converted to JSON but if I try to add the Content-Type Header I do then get the 400 – Bad Request error.

'' [400]>

SentHeaders = {'Content-Type': 'application/json'}

Response =, TagList, headers = SentHeaders, username="adc_admin", password="!%^$!")

The working Post in Postman shows a lot more request headers and so on but I'm not sure what else the Ignition post function requires to work. Token, Cookie?

747 ms
Request Headers
Content-Type: application/json
Authorization: Basic wwQ0gzMExAJCE=
User-Agent: PostmanRuntime/7.32.3
Accept: */*
Postman-Token: 4147c0625
Host: [](
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 153
Cookie: ARRAffinity=625456a57; ARRAffinitySameSite=625456a5791

Request Body
"system": "System X",
"sector": "175X",
"unit": "1X",
"point": "Temp",
"value": 87.6,
"timestamp": "2023-07-21T00:00:00.053Z"

Response Headers
Content-Length: 0
Date: Sat, 22 Jul 2023 15:20:33 GMT
Server: Microsoft-IIS/10.0
Request-Context: appId=cid-
X-Powered-By: [ASP.NET](

The Ignition side doesn't require anything. It's a question of what the server requires...

Try using a named parameter when you pass TagList. I'm worried you're passing it as params rather than data right now. e.g.

Response =, data=TagList, username="admin", password="!%^$!")

Yeah but it's the Ignition side that's passing stuff along and looking at all those headers, I have no clue about what is automatically sent or how much that differs from my working Postman example and what may need to be added.

I had used the "data=" at one point following an example but it must have had other issues at that time. But that did the trick. Thanks.