BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8f817c7b
Commit
8f817c7b
authored
Dec 07, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add API group projects endpoint.
parent
66affb83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
4 deletions
+79
-4
groups.md
doc/api/groups.md
+67
-4
groups.rb
lib/api/groups.rb
+12
-0
No files found.
doc/api/groups.md
View file @
8f817c7b
# Groups
## List
project
groups
## List groups
Get a list of groups. (As user: my groups, as admin: all groups)
...
...
@@ -21,6 +21,70 @@ GET /groups
You can search for groups by name or path, see below.
## List a group's projects
Get a list of projects in this group.
```
GET /groups/:id/projects
```
Parameters:
-
`archived`
(optional) - if passed, limit by archived status
-
`order_by`
(optional) - Return requests ordered by
`id`
,
`name`
,
`path`
,
`created_at`
,
`updated_at`
or
`last_activity_at`
fields. Default is
`created_at`
-
`sort`
(optional) - Return requests sorted in
`asc`
or
`desc`
order. Default is
`desc`
-
`search`
(optional) - Return list of authorized projects according to a search criteria
-
`ci_enabled_first`
- Return projects ordered by ci_enabled flag. Projects with enabled GitLab CI go first
```
json
[
{
"id"
:
4
,
"description"
:
null
,
"default_branch"
:
"master"
,
"public"
:
false
,
"visibility_level"
:
0
,
"ssh_url_to_repo"
:
"git@example.com:diaspora/diaspora-client.git"
,
"http_url_to_repo"
:
"http://example.com/diaspora/diaspora-client.git"
,
"web_url"
:
"http://example.com/diaspora/diaspora-client"
,
"tag_list"
:
[
"example"
,
"disapora client"
],
"owner"
:
{
"id"
:
3
,
"name"
:
"Diaspora"
,
"created_at"
:
"2013-09-30T13: 46: 02Z"
},
"name"
:
"Diaspora Client"
,
"name_with_namespace"
:
"Diaspora / Diaspora Client"
,
"path"
:
"diaspora-client"
,
"path_with_namespace"
:
"diaspora/diaspora-client"
,
"issues_enabled"
:
true
,
"merge_requests_enabled"
:
true
,
"builds_enabled"
:
true
,
"wiki_enabled"
:
true
,
"snippets_enabled"
:
false
,
"created_at"
:
"2013-09-30T13: 46: 02Z"
,
"last_activity_at"
:
"2013-09-30T13: 46: 02Z"
,
"creator_id"
:
3
,
"namespace"
:
{
"created_at"
:
"2013-09-30T13: 46: 02Z"
,
"description"
:
""
,
"id"
:
3
,
"name"
:
"Diaspora"
,
"owner_id"
:
1
,
"path"
:
"diaspora"
,
"updated_at"
:
"2013-09-30T13: 46: 02Z"
},
"archived"
:
false
,
"avatar_url"
:
"http://example.com/uploads/project/avatar/4/uploads/avatar.png"
}
]
```
## Details of a group
Get all details of a group.
...
...
@@ -186,7 +250,7 @@ To get more (up to 100), pass the following as an argument to the API call:
/groups?per_page=100
```
And to switch pages add:
And to switch pages add:
```
/groups?per_page=100&page=2
```
\ No newline at end of file
```
lib/api/groups.rb
View file @
8f817c7b
...
...
@@ -65,6 +65,18 @@ module API
DestroyGroupService
.
new
(
group
,
current_user
).
execute
end
# Get a list of projects in this group
#
# Example Request:
# GET /groups/:id/projects
get
":id/projects"
do
group
=
find_group
(
params
[
:id
])
projects
=
group
.
projects
projects
=
filter_projects
(
projects
)
projects
=
paginate
projects
present
projects
,
with:
Entities
::
Project
end
# Transfer a project to the Group namespace
#
# Parameters:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment