AnsweredAssumed Answered

PI WebAPI: Response 400 Bad Request

Question asked by KevinGoodspeed on Oct 30, 2017
Latest reply on Oct 30, 2017 by rxu

Hello there!

Our requirement is to write "Calc Failed" in the "Value" attribute in the PI system.

We are attempting to post data to PI end point https://*****/piwebapi/streamsets/recorded

We sending a JSON body like below

[{

    .......

    "Items": [{

        "Timestamp": "2017-10-11 01:00:00.000-0500",
        "Value": "Calc Failed",      
        "UnitsAbbreviation": "",
        "Good": false,
        "Questionable": true

    }]

}]

The response we getting is 400 Bad Request.

We also tried the value as a JSON object like

"Value": {

    "Name": "Calc Failed",

    "Value": "Calc Failed",    => 400 Bad Request

    "IsSystem": true

}

 

 

"Value": {

    "Name": "Calc Failed",

    "Value": 249,    => Works but we do not want to update the analog value

    "IsSystem": true

}

 

 

Please let us know what would be the correct format to post the data to resolve this issue.

Outcomes