Rally Software

  • 1.  Lookback API - Revision

    Posted Jul 31, 2018 08:09 AM

    Hi Team,

     

    We are looking to use look back api to get item type - Revision but we havent had much luck in getting it.

    Can you please advise if Revision or RevisionHistory type is supported and available in look back api ? If so, can you please share an sample.

     

    Thanks,

    Vijay



  • 2.  Re: Lookback API - Revision

    Broadcom Employee
    Posted Jul 31, 2018 12:30 PM

    Hi Vijay,

     

    Yes, the Lookback Api allows you to examine the Revisions and the RevisionHistory. You may want to review the documentation of the Lookback API here: https://rally1.rallydev.com/analytics/doc/#/manual/28421e0c04458d594e698625c9896629 

     

    On the left panel of that page you will see a number of scenario examples we provide. The first two examples are about retrieving the full history as well as the current revision. You can use these sections to workout the queries, see:

    https://rally1.rallydev.com/analytics/doc/#/tryitnow/scenario1 

     

    Please let us know if that helped.

    Sagi



  • 3.  Re: Lookback API - Revision

    Posted Aug 09, 2018 11:02 AM

    Hi Sagi,

     

    Thanks for the reply.  I am looking to query look back api to get revision as 'itemhierarchy'. I have gone over the document and manual but did not find much luck. Can you please help ?

     

    Thanks,

    Vijay



  • 4.  Re: Lookback API - Revision

    Broadcom Employee
    Posted Aug 09, 2018 11:08 AM

    Hi Vijay.

     

    What do you mean by you'd like to get the revisions as 'item hierarchy'. Can you give us an example of what you mean?

     

    Thanks.

    Sagi



  • 5.  Re: Lookback API - Revision

    Posted Aug 09, 2018 11:12 AM

    Vijay,

     

    What exactly are you trying to accomplish?  Maybe if we have a bit more context, we can suggest a way to proceed.

     

    Michael



  • 6.  Re: Lookback API - Revision

    Posted Aug 09, 2018 11:15 AM

    Hi Sagi.

    Correction to the original comment. I would like to get revisions as 'type hierarchy'. Something like below.

    basically, I want to get all the version 0 of an work item to get the user who created it.

     

    POST data:{    "find":  {       "_ProjectHierarchy": 279050021,       "_TypeHierarchy": "Revision",       "__At": "current"    },}

    Hope this help!

     

    Thanks,



  • 7.  Re: Lookback API - Revision

    Broadcom Employee
    Posted Aug 09, 2018 11:23 AM

    Hi Vijay,

     

    Thanks for clarifying. I'll see if I can find a query that works. However, if what you need is a list of users who created the artifacts, then you can query the 'Submitted By' field. 

     

    The' Submitted By' field is basically holding the user who created the artifact.

     

    If Lookback API isn't helping then I'm certain you can do it with WS-API.

     

     

    I'll see if I can find a Lookback API example for what you're asking. However, can you let me know if you can get this info by querying for 'Submitted By' field?

     

     

    Thanks,

    Sagi



  • 8.  Re: Lookback API - Revision

    Posted Aug 09, 2018 11:41 AM

    vijayakumar.balraj,

     

    I think the "CreatedBy" Field is what is needed here.  It is a newer field, but should get you what you need, 

     

    Product Announcement - Created By for All Artifacts 

     

    No need to get revisions and revision history now.  But, if you absolutely want to use the Lookback API instead of the regular WSAPI, you can do it.  Just get the CREATE snapshot and the _User is who created it, but it is just the OID, so you would need another query to get Username...

     

    Michael



  • 9.  Re: Lookback API - Revision

    Broadcom Employee
    Posted Aug 09, 2018 11:46 AM

    Hi Vijay,

     

    Michael is correct. Using WSAPI for this is the quickest. Here is an example of a query you can run in WSAPI for CreatedBy:

     

    (CreatedBy = "YOUR_USER_NAME")

     

    You can run it against any specific REST endpoint of an artifact (such as Defect or PortfolioItem/Feature), or you can even run it again the Artifact endpoint itself and you'll then get all the artifacts created by this user.

     

     

    Sagi