Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
10669097
Commit
10669097
authored
Jan 13, 2016
by
Josh Frye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add public params to GET /projects api. Closes #3788
parent
425f8d6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
CHANGELOG
CHANGELOG
+1
-0
doc/api/projects.md
doc/api/projects.md
+1
-0
lib/api/helpers.rb
lib/api/helpers.rb
+4
-0
No files found.
CHANGELOG
View file @
10669097
Please view this file on the master branch, on stable branches it's out of date.
v 8.5.0 (unreleased)
- Add "public" flag to GET /projects api endpoint
v 8.4.0 (unreleased)
- Ensure Gravatar host looks like an actual host
...
...
doc/api/projects.md
View file @
10669097
...
...
@@ -29,6 +29,7 @@ GET /projects
Parameters:
-
`archived`
(optional) - if passed, limit by archived status
-
`public`
(optional) - if passed, limit by public visibility
-
`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
...
...
lib/api/helpers.rb
View file @
10669097
...
...
@@ -264,6 +264,10 @@ module API
projects
=
projects
.
search
(
params
[
:search
])
end
if
params
[
:public
].
present?
&&
parse_boolean
(
params
[
:public
])
projects
=
projects
.
public_only
end
projects
.
reorder
(
project_order_by
=>
project_sort
)
end
...
...
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