diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-14 16:40:16 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-14 16:40:16 +0300 |
commit | 02693b72a4240a9d94246e590775a66eb48c55ed (patch) | |
tree | 418c335a86cb54221c20f8175cba46daa9a5c5f7 /doc/api/README.md | |
parent | 12800e544527c08e3423ecabe4dffd5bef90e9d5 (diff) | |
download | gitlab-ce-02693b72a4240a9d94246e590775a66eb48c55ed.tar.gz |
Explain iid in API
Diffstat (limited to 'doc/api/README.md')
-rw-r--r-- | doc/api/README.md | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/doc/api/README.md b/doc/api/README.md index ee24449343a..517a9fae6f6 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -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) |