Rally - Lookback API: How to find all artifacts a user owned in a given time frame

book

Article ID: 129469

calendar_today

Updated On:

Products

CA Agile Central On Premise (Rally) CA Agile Central SaaS (Rally)

Issue/Introduction



How can we find all artifacts that a given user owned within a certain period of time?

Environment

Release:
Component: ACSAAS

Resolution

Lookback API can help achieve this request. 

Below is a query that will return:
- All defects within workspace 197887695532
- Owned by User (objectid = 197888163144)
- between time period: 2019-0213T03:53:38.000Z and 2019-02-13T03:54:38.000Z

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/197887695532/artifact/snapshot/query.js?find={"_TypeHierarchy": "Defect", "_User":197888163144,"_ValidFrom":{"$gte":"2019-02-13T03:53:38.000Z"},"_ValidTo":{"$lte":"2019-02-13T03:54:38.000Z"}}}&fields=["FormattedID","Name","Owner","_ValidFrom","_ValidTo","_PreviousValues","_RevisionNumber"]&pagesize=2000


To make it more generic:

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/<Your Workspace ObjectID/artifact/snapshot/query.js?find={"_TypeHierarchy": "<A Type>", "_User":<A User ObjectID>,"_ValidFrom":{"$gte":"<From-TimeStamp>"},"_ValidTo":{"$lte":"<To-TimeStamp>"}}}&fields=["FormattedID","Name","Owner","_ValidFrom","_ValidTo","_PreviousValues","_RevisionNumber"]&pagesize=2000

You shall replace:
- <Your Workspace ObjectID> with your own workspace objectID.
- <A Type> with the type of artifact you need such as: Defect, HierarchicalRequirement, Task etc..
- <A User ObjectID> - with the objectID of the user you are asking about.
- <From-TimeStamp> and <To-TimeStamp> with the time frame you need.