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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

Tracking User Activity for Windchill REST API Access

Ismail.Shaik
5-Regular Member

Tracking User Activity for Windchill REST API Access

Hi All,

We have developed an external portal that downloads document content from Windchill using the Windchill OData REST APIs on behalf of users who do not have Windchill accounts. To facilitate this, we have set up a service account that connects to Windchill to retrieve the necessary data. This setup is functioning well.

Now, we need to track the number of users accessing this portal and downloading content from Windchill for licensing compliance purposes. One approach is to have the portal track this information and share it with the Windchill team. However, as more portals and applications are being developed to access Windchill data for non-Windchill users, we need to design a solution within Windchill to effectively monitor and record usage.

I have not found any features within the Windchill REST API framework that would assist in achieving this tracking. I am reaching out to this group to see if anyone has encountered a similar need or has considered potential solutions. Any insights or recommendations would be greatly appreciated.

Thank you,

Ismail

7 REPLIES 7

What is the authentication type you are using for REST call ? I mean basic, oAuth 2.0, etc ?

Ismail.Shaik
5-Regular Member
(To:aman.somgade)

It is Basic Auth.

Hi @Ismail.Shaik 

You can use following rest api domain to retrieve a login and download event from an AuditRecord

PTC.Administration
[ Base URL: wchserver007:443/Windchill/servlet/odata/v2/Administration ]

HelesicPetr_0-1743754307495.png

 

The Audit record tracks a download events and login events ootb from Windchill 11.1 + so you can get the information about the number of logins from your service user account.

 

Security Audit Reporting

HelesicPetr_1-1743754802130.png

 

PetrH. 

Ismail.Shaik
5-Regular Member
(To:HelesicPetr)

Hi PetrH,

Thanks for your response. Though I have highlighted the content download use case in my message,  our portal is consuming several other REST APIs (including OOTB APIs) of Windchill. So, need to find a comprehensive way to track the usage so that we can see how many unique users are accessing the APIs per day. I think we can ask the portal to also send the user details along with the API call, but is there any customization hook in REST framework to have those extra information stored to a file/database table etc. before the actual API gets executed. 

 

Thanks,

Ismail

Hi @Ismail.Shaik 

If you use own custom rest api method then you can create own audit record that the api is used.

PetrH

Just my 2 cents, but:

 

I'd recommend getting Active Daily User licenses and making accounts for all these users. That way, they could actually authenticate and your licensing concerns are resolved. More importantly for your organization - you can manage permissions and make sure someone isn't getting access to a file they shouldn't. 

Hi,

 

Process the Apache access.log file and you can get which users are accessing the portal as well you can get know the service account usage as well.

Announcements
Top Tags