Skip to main content
1-Visitor
July 28, 2017
Question

Internal Server Error 500 when retrieving audits via REST interface

  • July 28, 2017
  • 2 replies
  • 3388 views

I am attempting to use the REST v2 interface to retrieve audit information for assets.  However, whenever using audit/find or audit/findByIds (the only two interfaces I have tried) I always get an Internal Server Error 500.  Does the audit retrieval part of the REST interface work?  If so, can you provide a code example of its use?

Thanks.

2 replies

5-Regular Member
July 28, 2017

Hello, John.

So far I cannot find any articles or other documentation about this for ThingWorx. Let me ask internally and find out if this is possible.

Thanks,

-- Craig A.

20-Turquoise
July 28, 2017

Have you tried using your browser dev tools (f12 in chrome) to track the structure of your REST call? In the network activity, you can see the request call:

Also have you tried using API tools, like Postman?

1-Visitor
July 28, 2017

Here is the information from the transaction.  All other REST transactions are working fine, providing a proper JSON response.

Request:

Method: POST, RequestUri: 'https://cvrx.att.axeda.com/services/v2/rest/audit/find', Version: 1.1, Content: System.Net.Http.ObjectContent`1[[AxedaWebAPI.RestInterface+AuditCriteria, AxedaWebAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Headers:

{

  Accept: application/json

  Authorization: Basic ...

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

}

{"assetId":"9010 Programmer||LENOVO_20AN0069US_PC03BR7M","usernames":null,"categories":null,"fromDate":"2016-07-28 21:15:22Z","toDate":"2017-07-28 21:15:22Z","pageSize":"100","pageNumber":"1","sortAscending":null,"sortPropertyName":null}

Response:

System.Threading.Tasks.Task`1[System.Net.Http.HttpResponseMessage]

AxedaWebAPI.AxedaRestException: HttpResponse Error 500, (Internal Server Error)