Project

General

Profile

Actions

Feature #23894

open

Expose repository through REST API

Added by Daniel Dehennin about 8 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
REST API
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Hello,

The public REST API does not contains information about repository.

It seems that the only way to access repository information is through the repository WS, but there is only one key.

I would like to have repository information per project, like what I get with GET /sys/projects.xml?key=<WS KEY>.

We may only list repositories when adding an ?include=repositories:

  • for all projects GET /projects.json?include=repositories
    {
       "projects" : [
          {
             "identifier" : "project",
             "id" : 1,
             "name" : "Project Name",
         [...]
             "repositories" : [
                {
                   "id" : 1,
                   "identifier" : "",
                   "is_default" : true,
                   "type" : "Repository::Git",
                   "url" : "repositories/project-repo.git" 
                }
             ]
          }
       ],
       "limit" : 25,
       "total_count" : 1,
       "offset" : 0
    }
    
  • per project GET /projects/1.json?include=repositories
    {
       "project" : {
          "id" : 1,
          "identifier" : "project",
          "name" : "Project Name",
          "repositories" : [
             {
                "id" : 1,
                "identifier" : "",
                "is_default" : true,
                "url" : "repositories/project-repo.git",
                "type" : "Repository::Git" 
             }
          ]
       }
    }
    

Regards.


Files


Related issues

Related to Redmine - Feature #11977: REST API for repositoriesNew

Actions
Has duplicate Redmine - Patch #35612: Applied patches from #23894Closed

Actions
Actions

Also available in: Atom PDF