Question

Is Project a valid _Type to use in a lookback lquery?

I tried "_Type":"Project"

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/1234/artifact/snapshot/query.js?find={"_Type":"Project","State":"Open"}&fields=["Name"]

and also "_TypeHierarchy":"Project"

https://rally1.rallydev.com/analytics/v2.0/service/rally/workspace/1234/artifact/snapshot/query.js?find={"_TypeHierarchy":"Project","State":"Open"}&fields=["Name"]

and both returned 0 results. The same syntax works if "_TypeHierarchy":"Defect" but not with Project, but there are no errors. Thanks.

Was it helpful?

Solution

The Lookback API supports querying snapshots for a given Project or ProjectHierarchy. For example:

{
    [...]
    "Project": 12345
}

or

{
    [...]
    "_ProjectHierarchy": 12345 
}

However, it's not possible get a list of projects from the Lookback API outside the context of artifact snapshots. Getting projects would be a manual process. If you get a list of snapshots, you could iterate the result set and extract the Project OIDs, then generate a list. You could even parse the _ProjectHierarchy values and construct the project tree. Another caveat is hydrating the Project OIDs will require WSAPI calls.

Querying projects from the Lookback API may be expensive. You can specify fields to reduce the amount of data in the response. e.g.

fields: ["Project", "_ProjectHierarchy"] 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top