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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
02693b72
Commit
02693b72
authored
Oct 14, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain iid in API
parent
12800e54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
1 deletion
+24
-1
doc/api/README.md
doc/api/README.md
+18
-1
doc/api/issues.md
doc/api/issues.md
+3
-0
doc/api/merge_requests.md
doc/api/merge_requests.md
+2
-0
doc/api/milestones.md
doc/api/milestones.md
+1
-0
No files found.
doc/api/README.md
View file @
02693b72
...
...
@@ -96,13 +96,30 @@ curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: username" "h
curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http://example.com/api/v3/projects"
```
##
##
Pagination
## Pagination
When listing resources you can pass the following parameters:
+
`page`
(default:
`1`
) - page number
+
`per_page`
(default:
`20`
, max:
`100`
) - number of items to list per page
## id vs iid
When you work with API you may notice two similar fields in api entites: id and iid.
The main difference between them is scope. Example:
Issue
id: 46
iid: 5
*
id - is uniq across all Issues table. It used for any api calls.
*
iid - is uniq only in scope of single project. When you browse issues or merge requests with Web UI - you see iid.
So if you want to get issue with api you use
`http://host/api/v3/.../issues/:id.json`
But when you want to create a link to web page - use
`http:://host/project/issues/:iid.json`
## Contents
+
[
Users
](
users.md
)
...
...
doc/api/issues.md
View file @
02693b72
...
...
@@ -11,6 +11,7 @@ GET /issues
[
{
"id"
:
43
,
"iid"
:
3
,
"project_id"
:
8
,
"title"
:
"4xx/5xx pages"
,
"description"
:
""
,
...
...
@@ -31,6 +32,7 @@ GET /issues
},
{
"id"
:
42
,
"iid"
:
4
,
"project_id"
:
8
,
"title"
:
"Add user settings"
,
"description"
:
""
,
...
...
@@ -100,6 +102,7 @@ Parameters:
```
json
{
"id"
:
42
,
"iid"
:
3
,
"project_id"
:
8
,
"title"
:
"Add user settings"
,
"description"
:
""
,
...
...
doc/api/merge_requests.md
View file @
02693b72
...
...
@@ -15,6 +15,7 @@ Parameters:
[
{
"id"
:
1
,
"iid"
:
1
,
"target_branch"
:
"master"
,
"source_branch"
:
"test1"
,
"project_id"
:
3
,
...
...
@@ -59,6 +60,7 @@ Parameters:
```
json
{
"id"
:
1
,
"iid"
:
1
,
"target_branch"
:
"master"
,
"source_branch"
:
"test1"
,
"project_id"
:
3
,
...
...
doc/api/milestones.md
View file @
02693b72
...
...
@@ -10,6 +10,7 @@ GET /projects/:id/milestones
[
{
"id"
:
12
,
"iid"
:
3
,
"project_id"
:
16
,
"title"
:
"10.0"
,
"description"
:
"Version"
,
...
...
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