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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Get monitoring and log data via rest API

MM_9628870
5-Regular Member

Get monitoring and log data via rest API

Hi,
Is there any REST API or java sdk provided by ThingWorx  to get monitoring and logging data ? 

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:MM_9628870)

Hopefully this helps

https://www.ptc.com/en/support/article/CS329281?&language=en&posno=2&q=thingworx%20rest%20api%20post&source=search

The ServiceDefinitions should show you the parameters available, those you would construct and submit as a JSON in the body.

View solution in original post

10 REPLIES 10
PaiChung
22-Sapphire I
(To:MM_9628870)

You can just call the available services associated with the logs.

MM_9628870
5-Regular Member
(To:PaiChung)

ok let me try and get back to you.  Thanks!

MM_9628870
5-Regular Member
(To:PaiChung)

Hey @PaiChung   Can you tell me which api to call since there is no GET api to get the service details

PaiChung
22-Sapphire I
(To:MM_9628870)

All of these will be POST types

See for example: <server>/Thingworx/Logs/ApplicationLog/Services/QueryLogEntries

MM_9628870
5-Regular Member
(To:PaiChung)

Can you give a link to the documentation for this API?

PaiChung
22-Sapphire I
(To:MM_9628870)

Basically works like any other Thingworx service.

You can also use this to see the parameters

<Server>/Thingworx/Logs/ApplicationLog/ServiceDefinitions/QueryLogEntries

or start from here and drill in <server>/Thingworx/Logs/ (this is a regular GET)

MM_9628870
5-Regular Member
(To:PaiChung)

what should be the request body for <Server>/Thingworx/Logs/ApplicationLog/ServiceDefinitions/QueryLogEntries since it is a POST api

PaiChung
22-Sapphire I
(To:MM_9628870)

Hopefully this helps

https://www.ptc.com/en/support/article/CS329281?&language=en&posno=2&q=thingworx%20rest%20api%20post&source=search

The ServiceDefinitions should show you the parameters available, those you would construct and submit as a JSON in the body.

MM_9628870
5-Regular Member
(To:PaiChung)

Thanks!!
Will try and get back to you

MM_9628870
5-Regular Member
(To:PaiChung)

Thanks @PaiChung !! It works!! marking your answer as a solution

Top Tags