Update Stamp via WRS REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Update Stamp via WRS REST API
Version: Windchill 12.1
Use Case: I need to retrieve documents that were set to released in the past 24 hours.
Description:
I am looking to find documents that were set to released in the past 24 hours. I am doing this via InfoEngine by querying for objects with an UpdateStamp greater than a date/time stamp for yesterday.
In InfoEngine updateStamp and modifyStamp are returned and represent two different use cases. I need updateStamp. Below is the values I am seeing come back from InfoEngine
<thePersistInfo.updateStamp>2024-05-24 13:01:13 EDT</thePersistInfo.updateStamp>
<thePersistInfo.modifyStamp>2024-05-16 09:49:15 EDT</thePersistInfo.modifyStamp>
The DynamicDocument Rest API returns LastModified, which seems to align with modifyStamp from InfoEngine, but I am not seeing a value come back from the REST API's for UpdateStamp.
{
...
"LastModified": "2024-10-25T12:56:32-04:00",
...
}
I am able to get the documents that were modified after a given date timestamp with the following query.
LastModified gt 2024-10-24T15:39:10-04:00
Is there a way to query against the updateStamp field available from InfoEngine via the REST API's?
Solved! Go to Solution.
- Labels:
-
API
-
REST Services
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MalteSiefkes provided the information that got me to the solution. I did the following.
- Updated "<Windchill>\codebase\rest\custom\domain\DynamicDocMgmt\v4\entity\DynamicDocumentsExt.json". Note that "v4" indicates this change will only show up for the API Version 4 API request.
{
"extends": "DynamicDocument",
"attributes": [
{
"name":"UpdateStamp",
"internalName":"thePersistInfo.updateStamp",
"type":"DateTimeOffset",
"readOnly": true
}
]
}
- I restarted Windchill
- I executed a request to the following endpoint.
- http://example.oberontech.com:80/Windchill/servlet/odata/v4/DynamicDocMgmt/DynamicDocuments?%24filter=UpdateStamp%20gt%202025-01-01T14%3A02%3A57-04%3A00&%24count=false
- The query used is UpdateStamp gt 2025-01-01T14:02:57-04:00
- The results returned were only the results that were updated after January 1, 2025.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AdamElkins
I would say that you can create own report in the Windchill by queryBuilder and then call this report with the RestAPI
Thanks that you can get anything you need even though the RestApi does not support everything .
PetrH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can extend the Product Management Domain with a supported customization.
Extend WRS to include PersistInfo.UpdateStamp:
And add to PartsExt.json:
"attributes": [ { "name":"UpdateStamp", "internalName":"thePersistInfo.updateStamp", "type":"DateTimeOffset", "readOnly": true },
|
Restart Windchill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AdamElkins,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Please note that industry experts also review the replies and may eventually accept one of them as solution on your behalf.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I haven't gotten a chance to look back into this yet but will update this thread once I do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MalteSiefkes provided the information that got me to the solution. I did the following.
- Updated "<Windchill>\codebase\rest\custom\domain\DynamicDocMgmt\v4\entity\DynamicDocumentsExt.json". Note that "v4" indicates this change will only show up for the API Version 4 API request.
{
"extends": "DynamicDocument",
"attributes": [
{
"name":"UpdateStamp",
"internalName":"thePersistInfo.updateStamp",
"type":"DateTimeOffset",
"readOnly": true
}
]
}
- I restarted Windchill
- I executed a request to the following endpoint.
- http://example.oberontech.com:80/Windchill/servlet/odata/v4/DynamicDocMgmt/DynamicDocuments?%24filter=UpdateStamp%20gt%202025-01-01T14%3A02%3A57-04%3A00&%24count=false
- The query used is UpdateStamp gt 2025-01-01T14:02:57-04:00
- The results returned were only the results that were updated after January 1, 2025.
