summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-12-23 01:03:57 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-12-23 01:03:57 +0100
commitdb2c15369c365340aeaf4e431e8838714b40396b (patch)
tree26ca045a337132370b67cc8f2ed4010e3087dfa5 /doc/api
parentb47173da6a0fea0982d009f91e2c4d042f9b5c37 (diff)
parent68c43d59f09a66cca0da1b9a50c11421d52eac9a (diff)
downloadgitlab-ce-db2c15369c365340aeaf4e431e8838714b40396b.tar.gz
Merge branch 'master' into discussions
Conflicts: app/assets/stylesheets/main.scss app/models/project.rb app/views/notes/_common_form.html.haml app/views/notes/_per_line_form.html.haml lib/gitlab/markdown.rb spec/models/note_spec.rb
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/README.md2
-rw-r--r--doc/api/issues.md27
-rw-r--r--doc/api/merge_requests.md19
-rw-r--r--doc/api/milestones.md8
-rw-r--r--doc/api/notes.md19
-rw-r--r--doc/api/projects.md35
-rw-r--r--doc/api/repositories.md10
-rw-r--r--doc/api/session.md1
-rw-r--r--doc/api/snippets.md13
-rw-r--r--doc/api/users.md7
10 files changed, 73 insertions, 68 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index ca346418f23..477429c9fa0 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version
Example of a valid API request:
```
-GET http://example.com/api/v2/projects?private_token=QVy1PB7sTxfy4pqfZM1U
+GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U
```
The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL.
diff --git a/doc/api/issues.md b/doc/api/issues.md
index aaad3305489..0383b676073 100644
--- a/doc/api/issues.md
+++ b/doc/api/issues.md
@@ -18,6 +18,7 @@ GET /issues
"assignee": null,
"author": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -46,6 +47,7 @@ GET /issues
},
"assignee": {
"id": 2,
+ "username": "jack_smith",
"email": "jack@example.com",
"name": "Jack Smith",
"blocked": false,
@@ -53,6 +55,7 @@ GET /issues
},
"author": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -75,7 +78,7 @@ GET /projects/:id/issues
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
## Single issue
@@ -87,7 +90,7 @@ GET /projects/:id/issues/:issue_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of a project issue
```json
@@ -110,6 +113,7 @@ Parameters:
},
"assignee": {
"id": 2,
+ "username": "jack_smith",
"email": "jack@example.com",
"name": "Jack Smith",
"blocked": false,
@@ -117,6 +121,7 @@ Parameters:
},
"author": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -138,7 +143,7 @@ POST /projects/:id/issues
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `title` (required) - The title of an issue
+ `description` (optional) - The description of an issue
+ `assignee_id` (optional) - The ID of a user to assign issue
@@ -157,7 +162,7 @@ PUT /projects/:id/issues/:issue_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of a project's issue
+ `title` (optional) - The title of an issue
+ `description` (optional) - The description of an issue
@@ -168,17 +173,3 @@ Parameters:
Will return updated issue with status `200 OK` on success, or `404 Not found` on fail.
-## Delete issue
-
-Delete existing project issue.
-
-```
-DELETE /projects/:id/issues/:issue_id
-```
-
-Parameters:
-
-+ `id` (required) - The ID or code name of a project
-+ `issue_id` (required) - The ID of a project's issue
-
-Status code `200` will be returned on success.
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index e5b067a61d9..525c55d12c2 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -8,7 +8,7 @@ GET /projects/:id/merge_requests
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
```json
[
@@ -22,6 +22,7 @@ Parameters:
"merged":false,
"author":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -29,6 +30,7 @@ Parameters:
},
"assignee":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -48,7 +50,7 @@ GET /projects/:id/merge_request/:merge_request_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of MR
```json
@@ -62,6 +64,7 @@ Parameters:
"merged":false,
"author":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -69,6 +72,7 @@ Parameters:
},
"assignee":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -88,7 +92,7 @@ POST /projects/:id/merge_requests
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `source_branch` (required) - The source branch
+ `target_branch` (required) - The target branch
+ `assignee_id` - Assignee user ID
@@ -105,6 +109,7 @@ Parameters:
"merged":false,
"author":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -112,6 +117,7 @@ Parameters:
},
"assignee":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -130,7 +136,7 @@ PUT /projects/:id/merge_request/:merge_request_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `merge_request_id` (required) - ID of MR
+ `source_branch` - The source branch
+ `target_branch` - The target branch
@@ -150,6 +156,7 @@ Parameters:
"merged":false,
"author":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -157,6 +164,7 @@ Parameters:
},
"assignee":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
@@ -174,7 +182,7 @@ POST /projects/:id/merge_request/:merge_request_id/comments
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `merge_request_id` (required) - ID of MR
+ `note` (required) - Text of comment
@@ -184,6 +192,7 @@ Will return created note with status `201 Created` on success, or `404 Not found
{
"author":{
"id":1,
+ "username": "admin",
"email":"admin@local.host",
"name":"Administrator",
"blocked":false,
diff --git a/doc/api/milestones.md b/doc/api/milestones.md
index f68d8eb7d58..b997e83901b 100644
--- a/doc/api/milestones.md
+++ b/doc/api/milestones.md
@@ -8,7 +8,7 @@ GET /projects/:id/milestones
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
## Single milestone
@@ -20,7 +20,7 @@ GET /projects/:id/milestones/:milestone_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
## New milestone
@@ -33,7 +33,7 @@ POST /projects/:id/milestones
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
+ `title` (required) - The title of an milestone
+ `description` (optional) - The description of the milestone
@@ -49,7 +49,7 @@ PUT /projects/:id/milestones/:milestone_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
+ `title` (optional) - The title of a milestone
+ `description` (optional) - The description of a milestone
diff --git a/doc/api/notes.md b/doc/api/notes.md
index 7b226dea44c..bb33efb8c25 100644
--- a/doc/api/notes.md
+++ b/doc/api/notes.md
@@ -15,6 +15,7 @@ GET /projects/:id/notes
"body": "The solution is rather tricky",
"author": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -27,7 +28,7 @@ GET /projects/:id/notes
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
### List issue notes
@@ -39,7 +40,7 @@ GET /projects/:id/issues/:issue_id/notes
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of an issue
### List snippet notes
@@ -52,7 +53,7 @@ GET /projects/:id/snippets/:snippet_id/notes
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a snippet
## Single note
@@ -67,7 +68,7 @@ GET /projects/:id/notes/:note_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `note_id` (required) - The ID of a wall note
### Single issue note
@@ -80,7 +81,7 @@ GET /projects/:id/issues/:issue_id/:notes/:note_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of a project issue
+ `note_id` (required) - The ID of an issue note
@@ -94,7 +95,7 @@ GET /projects/:id/issues/:snippet_id/:notes/:note_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project snippet
+ `note_id` (required) - The ID of an snippet note
@@ -110,7 +111,7 @@ POST /projects/:id/notes
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `body` (required) - The content of a note
Will return created note with status `201 Created` on success, or `404 Not found` on fail.
@@ -126,7 +127,7 @@ POST /projects/:id/issues/:issue_id/notes
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of an issue
+ `body` (required) - The content of a note
@@ -142,7 +143,7 @@ POST /projects/:id/snippets/:snippet_id/notes
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of an snippet
+ `body` (required) - The content of a note
diff --git a/doc/api/projects.md b/doc/api/projects.md
index fdedf904a3a..411286750f8 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -10,13 +10,12 @@ GET /projects
[
{
"id": 3,
- "code": "rails",
"name": "rails",
"description": null,
- "path": "rails",
"default_branch": "master",
"owner": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -31,13 +30,12 @@ GET /projects
},
{
"id": 5,
- "code": "gitlab",
"name": "gitlab",
"description": null,
- "path": "gitlab",
"default_branch": "api",
"owner": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -63,18 +61,17 @@ GET /projects/:id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
```json
{
"id": 5,
- "code": "gitlab",
"name": "gitlab",
"description": null,
- "path": "gitlab",
"default_branch": "api",
"owner": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -100,8 +97,6 @@ POST /projects
Parameters:
+ `name` (required) - new project name
-+ `code` (optional) - new project code, uses project name if not set
-+ `path` (optional) - new project path, uses project name if not set
+ `description` (optional) - short project description
+ `default_branch` (optional) - 'master' by default
+ `issues_enabled` (optional) - enabled by default
@@ -122,7 +117,8 @@ GET /projects/:id/members
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
++ `query` - Query string
## Get project team member
@@ -134,13 +130,14 @@ GET /projects/:id/members/:user_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a user
```json
{
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -159,7 +156,7 @@ POST /projects/:id/members
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a user to add
+ `access_level` (required) - Project access level
@@ -175,7 +172,7 @@ PUT /projects/:id/members/:user_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a team member
+ `access_level` (required) - Project access level
@@ -191,7 +188,7 @@ DELETE /projects/:id/members/:user_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a team member
Status code `200` will be returned on success.
@@ -206,7 +203,7 @@ GET /projects/:id/hooks
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
Will return hooks with status `200 OK` on success, or `404 Not found` on fail.
@@ -220,7 +217,7 @@ GET /projects/:id/hooks/:hook_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `hook_id` (required) - The ID of a project hook
Will return hook with status `200 OK` on success, or `404 Not found` on fail.
@@ -235,7 +232,7 @@ POST /projects/:id/hooks
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `url` (required) - The hook URL
Will return status `201 Created` on success, or `404 Not found` on fail.
@@ -250,7 +247,7 @@ PUT /projects/:id/hooks/:hook_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `hook_id` (required) - The ID of a project hook
+ `url` (required) - The hook URL
@@ -267,7 +264,7 @@ DELETE /projects/:id/hooks
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `hook_id` (required) - The ID of hook to delete
Will return status `200 OK` on success, or `404 Not found` on fail.
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 487ad9b2718..685797ad78d 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -8,7 +8,7 @@ GET /projects/:id/repository/branches
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
```json
[
@@ -48,7 +48,7 @@ GET /projects/:id/repository/branches/:branch
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `branch` (required) - The name of the branch
```json
@@ -87,7 +87,7 @@ GET /projects/:id/repository/tags
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
```json
[
@@ -125,7 +125,7 @@ GET /projects/:id/repository/commits
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `ref_name` (optional) - The name of a repository branch or tag
```json
@@ -159,7 +159,7 @@ GET /projects/:id/repository/commits/:sha/blob
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `sha` (required) - The commit or branch name
+ `filepath` (required) - The path the file
diff --git a/doc/api/session.md b/doc/api/session.md
index 9fdbeb439a4..c7e57aaca7a 100644
--- a/doc/api/session.md
+++ b/doc/api/session.md
@@ -13,6 +13,7 @@ Parameters:
```json
{
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"private_token": "dd34asd13as",
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index 288fd5296f6..ceb8a63d06f 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -8,7 +8,7 @@ GET /projects/:id/snippets
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
## Single snippet
@@ -20,7 +20,7 @@ GET /projects/:id/snippets/:snippet_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
```json
@@ -30,6 +30,7 @@ Parameters:
"file_name": "add.rb",
"author": {
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -51,7 +52,7 @@ GET /projects/:id/snippets/:snippet_id/raw
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
## New snippet
@@ -64,7 +65,7 @@ POST /projects/:id/snippets
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `title` (required) - The title of a snippet
+ `file_name` (required) - The name of a snippet file
+ `lifetime` (optional) - The expiration date of a snippet
@@ -82,7 +83,7 @@ PUT /projects/:id/snippets/:snippet_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
+ `title` (optional) - The title of a snippet
+ `file_name` (optional) - The name of a snippet file
@@ -101,7 +102,7 @@ DELETE /projects/:id/snippets/:snippet_id
Parameters:
-+ `id` (required) - The ID or code name of a project
++ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
Status code `200` will be returned on success.
diff --git a/doc/api/users.md b/doc/api/users.md
index c116144d91e..200c0e06e04 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -10,6 +10,7 @@ GET /users
[
{
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -23,6 +24,7 @@ GET /users
},
{
"id": 2,
+ "username": "jack_smith",
"email": "jack@example.com",
"name": "Jack Smith",
"blocked": false,
@@ -52,6 +54,7 @@ Parameters:
```json
{
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,
@@ -75,7 +78,8 @@ POST /users
Parameters:
+ `email` (required) - Email
+ `password` (required) - Password
-+ `name` - Name
++ `username` (required) - Username
++ `name` (required) - Name
+ `skype` - Skype ID
+ `linkedin` - Linkedin
+ `twitter` - Twitter account
@@ -95,6 +99,7 @@ GET /user
```json
{
"id": 1,
+ "username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"blocked": false,