AnsweredAssumed Answered

Bad Request when creating point

Question asked by Bradrttech@20 on Aug 11, 2016
Latest reply on Aug 11, 2016 by Marcos Vainer Loeff

Hi there,

We upgraded the PI Web API this morning to the latest release.  We now can't create tags via the API using our tool.  We can connect to the API, and push data to existing tags, but can't create tags. Below is a few examples of the post requests we are making to the API along with the errors received:  (note: we have replaced the authorization string with +'s.  We are using a username and password of the Administrator on the box who is a member of the PI Web API Administrators). 

We have Basic authentication mode in AF settings for the

We have "GET,OPTIONS, POST, PUT, DELETE, PATCH" for the CorsMethods

Any help would be appreciated.

 

With WebId tag in data

 

—REQ--

POST /piwebapi/dataservers/s0sEqxqX_ER0W_i7ujK7QtLAUlRURUNILVBJ/points HTTP/1.1

Host: 192.168.2.14

Authorization: Basic +++++++++++++++++++++++++++++++++++++++++++++

Content-Type: application/json

 

{"WebId":"","Name":"foo","PointClass":"classic","PointType":"Float32”}

 

—RESP--

HTTP/1.1 400 Bad Request

Connection: close

Content-Type: application/json; charset=utf-8

Date: Thu, 11 Aug 2016 12:42:16 GMT

Server: Microsoft-HTTPAPI/2.0

 

{"Errors":["Properties [WebId] are not allowed.”]}

 

Without WebId tag in data

 

—REQ—

POST /piwebapi/dataservers/s0sEqxqX_ER0W_i7ujK7QtLAUlRURUNILVBJ/points HTTP/1.1

Host: 192.168.2.14

Authorization: Basic +++++++++++++++++++++++++++++++++++++++++++++

Content-Type: application/json

 

{"Name":"foo","PointClass":"classic","PointType":"Float32”}

 

—RESP—

HTTP/1.1 400 Bad Request

Connection: close

Content-Type: application/json; charset=utf-8

Date: Thu, 11 Aug 2016 12:43:34 GMT

Server: Microsoft-HTTPAPI/2.0

 

{"Errors":["'future' is an invalid PI Point attribute name.”]}

 

Without WebId, with future attribute to false in data

 

—REQ--

POST /piwebapi/dataservers/s0sEqxqX_ER0W_i7ujK7QtLAUlRURUNILVBJ/points HTTP/1.1

Host: 192.168.2.14

Authorization: Basic +++++++++++++++++++++++++++++++++++++++++++++

Content-Type: application/json

 

{"Name":"foo","PointClass":"classic","PointType":"Float32","Future":false}

 

—RESP—

HTTP/1.1 400 Bad Request

Connection: close

Content-Type: application/json; charset=utf-8

Date: Thu, 11 Aug 2016 12:44:32 GMT

Server: Microsoft-HTTPAPI/2.0

 

{"Errors":["'future' is an invalid PI Point attribute name.”]}

 

Without WebId, with future attribute to true in data

 

—REQ--

POST /piwebapi/dataservers/s0sEqxqX_ER0W_i7ujK7QtLAUlRURUNILVBJ/points HTTP/1.1

Host: 192.168.2.14

Authorization: Basic +++++++++++++++++++++++++++++++++++++++++++++

Content-Type: application/json

 

{"Name":"foo","PointClass":"classic","PointType":"Float32","Future":true}

 

—RESP—

HTTP/1.1 400 Bad Request

Connection: close

Content-Type: application/json; charset=utf-8

Date: Thu, 11 Aug 2016 12:46:03 GMT

Server: Microsoft-HTTPAPI/2.0

 

{"Errors":["'future' is an invalid PI Point attribute name.”]}

Outcomes