3 Replies Latest reply on Oct 10, 2014 6:46 PM by jorgewong

    PI Web API - Update PI AF Attribute Value with Put Call

    jorgewong

      Hello,

       

      I'm trying to update a PI AF attribute that is not tied to any referential data and I'm getting the error below:

       

      {StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:{  Date: Fri, 10 Oct 2014 15:47:24 GMT  Server: Microsoft-HTTPAPI/2.0  Content-Length: 306  Content-Type: application/json; charset=utf-8}}

       

      My request is just a basic call to the URL: http://piwebapiserver.com/piwebapi/attributes/<WEB_ID_ATTRIBUTE>/value

       

      And the request body is just basic like this:

       

      { Value = "1" }

       

      Any hints would be appreciated.  I feel like its some sort of authentication issue but I'm not sure.  I have the Web API running as the default user and anonymous currently as the authentication method in the configuration.  Here is the api configuration settings:

       

       

       
      {
        "AuthenticationMethods": [
          "Anonymous"
        ],
        "CorsHeaders": "*",
        "CorsMethods": "*",
        "CorsOrigins": "*",
        "CorsSupportsCredentials": false,
        "DisableWrites": false,
        "SearchBoosts": [
          1.0,
          0.8,
          0.5,
          0.5,
          0.5,
          0.5
        ],
        "SearchPointAttributes": [
          "pointsource",
          "instrumenttag",
          "location1",
          "exdesc"
        ],
        "SearchScanInterval": 180
      }