•  
      request #8461 API /projects option doesn't list projects you're already a member of
    Infos
    #8461
    Isaac Campbell (isaac.campbell)
    2016-09-21 08:01
    2015-10-01 17:43
    8590
    Details
    API /projects option doesn't list projects you're already a member of
    The /projects request in the API only lists public projects and doesn't include projects you're already a member of.

    ----

    After login (including X-Auth-UserId and X-Auth-Token) querying /api/projects lists only publicly viewable projects. I have no means to find out the project ID of my own (not public) project.

    I would like to see the project id: 786, when I'm logged in.

    Directly querying /projects/786 lists the parameters of the project, so it is available for me, only it does not appear in the list.
    API
    Empty
    CentOS 6
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2016-09-21
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    Sergio Gazzola (sega)2016-09-13 18:42
    Hello Nicolas,

    Alright, I understand now. I was under the impression that regardless of the "offset" value, the response sends all results starting from a given offset record, I was hoping to get away with this in one curl command, I see now that I will have to script this in a loop to get all pages.

    thanks for the immediate response.

    BR/Sergio
    User avatar
    Hello,

    I cannot reproduce the issue, I've just tried on tuleap.net and when I query /projects, all project I am member of are returned, including private projects.

    Please remember that the collection is paginated, if you adjust offset/limit parameters, you may retrieve needed information.

    Does it answer your question?
    User avatar
    Sergio Gazzola (sega)2016-09-12 21:45
    Hello,

    I am following up on this ticket originally opened by Isaac. I experimented using Curl and still see the same issue, I am not getting details of the projects in which my account is a member of, only the public projects.

    Below in my curl command, token id is stored in a variable called tok.

    curl -k -XGET --header 'Content-type: application/json' --header 'X-Auth-Token:'${tok:8:32} --header 'X-Auth-UserId: 1250' https://openalm-staging.lmera.ericsson.se:443/api/projects?&order=asc

    I also tried with the API Explorer using "Get Projects" and same results.

    Please advise?

    BR/Sergio
    User avatar
    Hello,

    Did you query all the results for this route (using limit and offset) ?

    • Status changed from New to Waiting for information
    • Reported in version cleared values: 8.5