cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Internal Server Error 500 when retrieving audits via REST interface

ptc-4668818
12-Amethyst

Internal Server Error 500 when retrieving audits via REST interface

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.

3 REPLIES 3

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.

posipova
20-Turquoise
(To:ptc-4668818)

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?

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)

Announcements


Top Tags