Rally Software

Expand all | Collapse all

Rally API can't see a User Story

  • 1.  Rally API can't see a User Story

    Posted 01-20-2021 04:07 PM
    Hi All,

    A user can see a US in the Rally UI, as they have access to the team/project.

    When I'm using the Rally API with an api key owned by that user - I get no results.

    For US that we both have access to, the Rally API finds the US no problem.

    I changed the Rally API to set the project ref to the top level parent project, no difference.

    Any ideas about a configuration that I have to make?


  • 2.  RE: Rally API can't see a User Story

    Broadcom Employee
    Posted 01-20-2021 04:19 PM
    Hi Simon,

    It's difficult to know based only on what you had mentioned. You may want to look into the Project you're looking into.
    When using WSAPI then it will look for the object in the user's default workspace and default project, unless you specify the workspace and project you'd like to look into using the 'Workspace' and 'Project' argument on the GET call. You can also use the ProjectScopeDown and ProjectScopeUp flags to make certain you're scoping your query correctly.

    I am guessing that perhaps you aren't using these arguments in your call and then the API is looking at that user's default project which perhaps isn't where this user story is.

    I hope this helps.
    Let us know.


  • 3.  RE: Rally API can't see a User Story

    Posted 01-20-2021 05:39 PM
    Thanks very much for the suuggestion Sagi,

    I tried setting up only, down only and then both (shown below), but always the
    TotalResultCount = 0

    public RallyUserStory getUserStory(String userStoryId) {
    QueryRequest request = new QueryRequest("HierarchicalRequirement");
    request.setQueryFilter(new QueryFilter("FormattedID", "=", userStoryId));
    request.setScopedDown( true );
    request.setScopedUp( true );
    QueryResponse response = query( request );

    RallyUserStory userStory = new RallyUserStory( response );

    return userStory;

  • 4.  RE: Rally API can't see a User Story

    Broadcom Employee
    Posted 01-25-2021 12:08 PM
    Hello Simon,

    Just following up to see if you have solve this issue. As @Sagi Gabay mentioned it seems odd given that the User can see the User Story in the UI, and that you are using an API Key by that same User.

    Did you try parsing the Workspace/Project parameters in the GET request too? This would be needed if the User Story is not in the Default Project for that User. Note: this is in addition to the Project Scope Down/Up.

    I'd be happy to do ​some testing with Postman or something, or provide an example Postman payload if you would like, or arrange a working session offline. I'm hoping you solved it but feel free to ping us if you would like to review it further.


  • 5.  RE: Rally API can't see a User Story

    Posted 01-25-2021 03:59 PM
    Hi Chris,

    It turns out that the line that @Sagi Gabay mentioned:
    request.setScopedDown( true );
    was the one we needed, but someone had reassigned the api-key to another user, so we were chasing a ghost. Once that was determined we were able to see what access was missing from the real api-key owner and remediate.

    Thanks again to the Rally community


  • 6.  RE: Rally API can't see a User Story

    Broadcom Employee
    Posted 01-26-2021 10:30 AM
    Good deal. Thanks Simon. Glad it helped.