Rally Software

 View Only
  • 1.  Rally API to fetch risk & dependency data for a project

    Posted Apr 07, 2022 11:16 AM
    Is there any Rally API to get Risk and dependency for  Rally Projects? We need to fetch risk & dependency associated with a project in rally.


  • 2.  RE: Rally API to fetch risk & dependency data for a project

    Broadcom Employee
    Posted Apr 07, 2022 01:11 PM
    Hi Manish,

    There is a Risk object that is part of Rally's API. You can see Rally API objects listed in the WSAPI Page (scroll down the alphabetically sorted list of objects on the left side). Risk belongs to a project, so you can filter your risk query by a project name.

    Can you elaborate on what you mean by 'dependency'. Do you mean the associated work items of that risk? do you mean dependency of work items themselves? 

    Thanks,
    Sagi


  • 3.  RE: Rally API to fetch risk & dependency data for a project

    Posted Jun 13, 2022 03:24 PM

    Hi Sagi, all, 

    I was able to fetch some information about Risks via a JSON call (I'm using Postman), but it does not have all of the fields I requested in the call. How do I get this information? Below is my API call and one record I received from the result set. Am I missing something?

    Thank you, 

    Leah

    Query:
    {
    "find": {
    "_ProjectHierarchy": 241860509196,
    "_TypeHierarchy": "Risks"
    },
    "fields": [
    "FormattedID",
    "CalculatedRisk",
    "Impact",
    "Probability",
    "Resolution",
    "State",
    "WorkItemsAffected"
    ],
    "start": 1,
    "pagesize": 20000
    }

    Example Record:

                {
                    "_rallyAPIMajor""2",
                    "_rallyAPIMinor""0",
                    "_ref""https://rally1.rallydev.com/slm/webservice/v2.0/risk/237247831676",
                    "_refObjectUUID""fd7de806-7faa-4339-8e4c-ce2fbebc5f80",
                    "_refObjectName""New team members learning curve",
                    "_type""Risk"
                },


    ------------------------------
    Sr. Business/Data Analyst
    EBSCO Information Services
    ------------------------------



  • 4.  RE: Rally API to fetch risk & dependency data for a project

    Broadcom Employee
    Posted Jun 13, 2022 03:28 PM
    Hi Leah,

    Good to hear from you.  It seems to me like you're querying an object named: "Risks" (plural) , while object name is:  "Risk" (singular). I can see that in your query' "_TypeHierarchy" field.

    Can you change that to "Risk" and see if that will help.

    Let us know if that helped.

    Thanks,
    Sagi



  • 5.  RE: Rally API to fetch risk & dependency data for a project

    Posted Jun 13, 2022 03:50 PM

    Thank You Sagi, 

    I changed this and the results were the same. I did some more testing and found that no matter what I put in the body of the request (even with incorrect syntax or _TypeHierarchy: "banana"), the results were the same. The results are the same as what I see when I go to the URL:

    https://rally1.rallydev.com/slm/webservice/v2.0/risk/

    This is also the URL I am using to connect. Should I be using something else?

    Thank you, 

    Leah



    ------------------------------
    Sr. Business/Data Analyst
    EBSCO Information Services
    ------------------------------



  • 6.  RE: Rally API to fetch risk & dependency data for a project

    Broadcom Employee
    Posted Jun 13, 2022 03:55 PM
    Hi Leah,
    The payload you're supplying appears to be for the lookback API however the URL you gave was for WSAPI.  

    Thanks
    Dave


  • 7.  RE: Rally API to fetch risk & dependency data for a project

    Posted Jun 13, 2022 05:44 PM

    Thank you Dave, 

    Yes, good catch! The majority of my queries hit the Lookback API so I made a false assumption that it worked the same way. This worked for me!

    https://rally1.rallydev.com/slm/webservice/v2.0/risk?query=(Tags.Name%20%3D%20%22risk_reliability_tech%22)&shallowFetch=FormattedID,Name,Description,Probability,Impact,CalculatedRisk,AcceptedDate,Response,Notes,ScheduleState,Resolution

    Thank you both for your help!

    -Leah



    ------------------------------
    Sr. Business/Data Analyst
    EBSCO Information Services
    ------------------------------



  • 8.  RE: Rally API to fetch risk & dependency data for a project

    Broadcom Employee
    Posted Jun 13, 2022 11:52 PM
    Good catch!  Thanks Dave.

    Sagi