•  
      story #7687 REST endpoint to list project'ss git repositories
    Summary
    git user
    REST endpoint to list project'ss git repositories
    Empty

    Based on existing tuleap REST api

    
    Update GET /v1/projects/:id
    Add in "resources":
    {
        "type": "git",
        "uri": "projects/:id/git"
    }
    Add OPTIONS /v1/projects/:id/git
    Add GET /v1/projects/:id/git
    {
        "repositories": [
            {
                "id": 123,
                "uri": "/v1/git/123",
                "name": "/projectname/repo/path.git",
                "description": "bla"
            },
            ...
        ]
    }
    GET /v1/projects/:id/git?full
    {
        "repositories": [
            {
                "id": :id,
                "uri": "/v1/git/:id",
                "name": "/projectname/repo/path.git",
                "description": "bla",
                "permissions": {
                    "read": [ <user_group_def> ],
                    "write": [ <user_group_def> ],
                    "rewind": [ <user_group_def> ]
                }
            },
            ...
        ]
    }

    Important => those 2 GET route must manage pagination

    Add OPTIONS /v1/git/:id
    Add GET /v1/git/:id
    {
        "id": :id,
        "uri": "/v1/git/:id",
        "name": "/projectname/repo/path.git",
        "description": "bla",
        "permissions": {
            "read": [ <user_group_def> ],
            "write": [ <user_group_def> ],
            "rewind": [ <user_group_def> ]
        }
    }
    
    
    <user group def> (for reference, already existing)
    {
        "id": "101_3",
        "uri": "user_groups/101_3",
        "label": "project_members",
        "users_uri": "user_groups/101_3/users"
    }

    Permissions:

    • id, uri, name, description are accessible as long as the user has access to the repo

    • permissions are accessible only to git administrators

    Empty
    Nouha Terzi (terzino), Salma MOAKHAR (moakhars), Denis PILAT (denis_pilat)
    Status
    Empty
    Done
    Development
    • [ ] Does it involves User Interface? 
    • [ ] Are there any mockups?
    • [ ] Are permissions checked?
    • [ ] Does it need Javascript development?
    • [ ] Does it need a forge upgrade bucket?
    • [ ] Does it need to execute things in system events?
    • [ ] Does it impact project creation (templates)?
    • [ ] Is it exploratory?
    Empty
    Details
    #7687
    Manuel Vacelet (vaceletm)
    2015-01-02 16:05
    2014-12-11 12:08
    7692

    References

    Follow-ups

    User avatar

    Please note that we renamed the 'full' parameter to 'fields' so that it respects the convention used until now for such resources.

    GET /api/v1/projects/:id/git?fields=basic
    GET /api/v1/projects/:id/git?fields=all      #same as basic plus permissions

    This is currently available on stable/master.


    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar

    Question for denis/nouha/salma: Is there a need for a route that get all the detailed informations at once, like:

    GET /v1/projects/:id/git?full
    [
        {
            "id": :id,
            "uri": "/v1/git/:id",
            "name": "/projectname/repo/path.git",
            "description": "bla",
            "permissions": {
                "read": [ <user_group_def> ],
                "write": [ <user_group_def> ],
                "rewind": [ <user_group_def> ]
            }
        },
        ...
    ]

    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes