diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-25 11:05:34 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-25 11:05:34 +0100 |
commit | 895d97af87c66f4763e8d1fc0ef6cae19924b18d (patch) | |
tree | 09a596fb057d11bf94d7c3a323f38049061c6518 /doc/api | |
parent | 0a5a65df0c7d08e3ce041e10906549313a9ad156 (diff) | |
parent | afe90d529c82566886d1f2513dd6bee4fa73ff94 (diff) | |
download | gitlab-ce-895d97af87c66f4763e8d1fc0ef6cae19924b18d.tar.gz |
Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeeds
* master: (312 commits)
Fix bad selection on dropdown menu for tags filter
Fixed issue boards scrolling with a lot of lists & issues
You can only assign default_branch when editing a project ...
Don't convert data which already is the target type
Stop supporting Google and Azure as backup strategies
renames some of the specs and adds changelog entry
Fixed dragging issue moving wrong issue after multiple drags of issue
Fixed issue boards issue sorting when dragging issue into list
Rephrase some system notes to be compatible with new system note style
Add missing JIRA file that redirects to the new location
Fix documentation to create the `pg_trm` extension before creating the DB
Document that we always use `do...end` for `before` in RSpec
Backport Note#commands_changes from EE
Log mv_namespace parameters
Add default_branch attr to Project API payload in docs.
Fix title case to sentence case
properly escape username validation error message flash
Remove header ids from University docs
Add missing documentation.
Added test that checks the correct select box is there for the LFS ...
...
Conflicts:
app/services/system_note_service.rb
spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb
spec/services/system_note_service_spec.rb
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/merge_requests.md | 1 | ||||
-rw-r--r-- | doc/api/milestones.md | 6 | ||||
-rw-r--r-- | doc/api/notes.md | 2 | ||||
-rw-r--r-- | doc/api/pipelines.md | 46 | ||||
-rw-r--r-- | doc/api/projects.md | 21 | ||||
-rw-r--r-- | doc/api/services.md | 16 | ||||
-rw-r--r-- | doc/api/users.md | 44 |
7 files changed, 103 insertions, 33 deletions
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 75b9d5d1a75..1d1d646138c 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -11,6 +11,7 @@ GET /projects/:id/merge_requests GET /projects/:id/merge_requests?state=opened GET /projects/:id/merge_requests?state=all GET /projects/:id/merge_requests?iid=42 +GET /projects/:id/merge_requests?iid[]=42&iid[]=43 ``` Parameters: diff --git a/doc/api/milestones.md b/doc/api/milestones.md index ae7d22a4be5..12497acff98 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -7,6 +7,7 @@ Returns a list of project milestones. ``` GET /projects/:id/milestones GET /projects/:id/milestones?iid=42 +GET /projects/:id/milestones?iid[]=42&iid[]=43 GET /projects/:id/milestones?state=active GET /projects/:id/milestones?state=closed ``` @@ -16,7 +17,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `id` | integer | yes | The ID of a project | -| `iid` | integer | optional | Return only the milestone having the given `iid` | +| `iid` | Array[integer] | optional | Return only the milestone having the given `iid` | | `state` | string | optional | Return only `active` or `closed` milestones` | ```bash @@ -34,6 +35,7 @@ Example Response: "title": "10.0", "description": "Version", "due_date": "2013-11-29", + "start_date": "2013-11-10", "state": "active", "updated_at": "2013-10-02T09:24:18Z", "created_at": "2013-10-02T09:24:18Z" @@ -69,6 +71,7 @@ Parameters: - `title` (required) - The title of an milestone - `description` (optional) - The description of the milestone - `due_date` (optional) - The due date of the milestone +- `start_date` (optional) - The start date of the milestone ## Edit milestone @@ -85,6 +88,7 @@ Parameters: - `title` (optional) - The title of a milestone - `description` (optional) - The description of a milestone - `due_date` (optional) - The due date of the milestone +- `start_date` (optional) - The start date of the milestone - `state_event` (optional) - The state event of the milestone (close|activate) ## Get all issues assigned to a single milestone diff --git a/doc/api/notes.md b/doc/api/notes.md index 58d40eecf3e..9971806be56 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -21,7 +21,7 @@ Parameters: [ { "id": 302, - "body": "Status changed to closed", + "body": "closed", "attachment": null, "author": { "id": 1, diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md index a29b3eb6f44..6455c333faf 100644 --- a/doc/api/pipelines.md +++ b/doc/api/pipelines.md @@ -114,6 +114,51 @@ Example of response } ``` +## Create a new pipeline + +> [Introduced][ce-7209] in GitLab 8.14 + +``` +POST /projects/:id/pipeline +``` + +| Attribute | Type | Required | Description | +|------------|---------|----------|---------------------| +| `id` | integer | yes | The ID of a project | +| `ref` | string | yes | Reference to commit | + +``` +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/pipeline?ref=master" +``` + +Example of response + +```json +{ + "id": 61, + "sha": "384c444e840a515b23f21915ee5766b87068a70d", + "ref": "master", + "status": "pending", + "before_sha": "0000000000000000000000000000000000000000", + "tag": false, + "yaml_errors": null, + "user": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://localhost:3000/root" + }, + "created_at": "2016-11-04T09:36:13.747Z", + "updated_at": "2016-11-04T09:36:13.977Z", + "started_at": null, + "finished_at": null, + "committed_at": null, + "duration": null +} +``` + ## Retry failed builds in a pipeline > [Introduced][ce-5837] in GitLab 8.11 @@ -205,3 +250,4 @@ Response: ``` [ce-5837]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5837 +[ce-7209]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7209 diff --git a/doc/api/projects.md b/doc/api/projects.md index 467a880ac13..bd27a0a6fae 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -624,6 +624,7 @@ Parameters: | `user_id` | integer | yes | The user ID of the project owner | | `name` | string | yes | The name of the new project | | `path` | string | no | Custom repository name for new project. By default generated based on name | +| `default_branch` | string | no | `master` by default | | `namespace_id` | integer | no | Namespace for the new project (defaults to the current user's namespace) | | `description` | string | no | Short project description | | `issues_enabled` | boolean | no | Enable issues for this project | @@ -657,6 +658,7 @@ Parameters: | `id` | integer/string | yes | The ID or NAMESPACE/PROJECT_NAME of the project | | `name` | string | yes | The name of the project | | `path` | string | no | Custom repository name for the project. By default generated based on name | +| `default_branch` | string | no | `master` by default | | `description` | string | no | Short project description | | `issues_enabled` | boolean | no | Enable issues for this project | | `merge_requests_enabled` | boolean | no | Enable merge requests for this project | @@ -1074,6 +1076,25 @@ Parameters: | `group_access` | integer | yes | The permissions level to grant the group | | `expires_at` | string | no | Share expiration date in ISO 8601 format: 2016-09-26 | +### Delete a shared project link within a group + +Unshare the project from the group. Returns `204` and no content on success. + +``` +DELETE /projects/:id/share/:group_id +``` + +Parameters: + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `group_id` | integer | yes | The ID of the group | + +```bash +curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/share/17 +``` + ## Hooks Also called Project Hooks and Webhooks. diff --git a/doc/api/services.md b/doc/api/services.md index c7f537aceb6..a5d733fe6c7 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -465,10 +465,10 @@ GET /projects/:id/services/jira Set JIRA service for a project. ->**Note:** -Setting `project_url`, `issues_url` and `new_issue_url` will allow a user to -easily navigate to the JIRA issue tracker. See the [integration doc][jira-doc] -for details. +>**Notes:** +- Starting with GitLab 8.14, `api_url`, `issues_url`, `new_issue_url` and + `project_url` are replaced by `project_key`, `url`. If you are using an + older version, [follow this documentation][old-jira-api]. ``` PUT /projects/:id/services/jira @@ -477,11 +477,8 @@ PUT /projects/:id/services/jira | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `active` | boolean| no | Enable/disable the JIRA service. | -| `project_url` | string | yes | The URL to the JIRA project which is being linked to this GitLab project. It is of the form: `https://<jira_host_url>/issues/?jql=project=<jira_project>`. | -| `issues_url` | string | yes | The URL to the JIRA project issues overview for the project that is linked to this GitLab project. It is of the form: `https://<jira_host_url>/browse/:id`. Leave `:id` as-is, it gets replaced by GitLab at runtime.| -| `new_issue_url` | string | yes | This is the URL to create a new issue in JIRA for the project linked to this GitLab project, and it is of the form: `https://<jira_host_url>/secure/CreateIssue.jspa` | -| `api_url` | string | yes | The base URL of the JIRA API. It may be omitted, in which case GitLab will automatically use API version `2` based on the `project url`. It is of the form: `https://<jira_host_url>/rest/api/2`. | -| `description` | string | no | A name for the issue tracker. | +| `url` | string | yes | The URL to the JIRA project which is being linked to this GitLab project, e.g., `https://jira.example.com`. | +| `project_key` | string | yes | The short identifier for your JIRA project, all uppercase, e.g., `PROJ`. | | `username` | string | no | The username of the user created to be used with GitLab/JIRA. | | `password` | string | no | The password of the user created to be used with GitLab/JIRA. | | `jira_issue_transition_id` | string | no | The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (**Administration > Issues > Workflows**) by selecting **View** under **Operations** of the desired workflow of your project. The ID of each state can be found inside the parenthesis of each transition name under the **Transitions (id)** column ([see screenshot][trans]). By default, this ID is set to `2`. | @@ -670,3 +667,4 @@ GET /projects/:id/services/teamcity ``` [jira-doc]: ../project_services/jira.md +[old-jira-api]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-13-stable/doc/api/services.md#jira diff --git a/doc/api/users.md b/doc/api/users.md index 041df07c051..b38c335490a 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -369,24 +369,24 @@ Parameters: Get a list of a specified user's SSH keys. Available only for admin ``` -GET /users/:uid/keys +GET /users/:id/keys ``` Parameters: -- `uid` (required) - id of specified user +- `id` (required) - id of specified user ## Single SSH key Get a single key. ``` -GET /user/keys/:id +GET /user/keys/:key_id ``` Parameters: -- `id` (required) - The ID of an SSH key +- `key_id` (required) - The ID of an SSH key ```json { @@ -458,25 +458,25 @@ This is an idempotent function and calling it on a key that is already deleted or not available results in `200 OK`. ``` -DELETE /user/keys/:id +DELETE /user/keys/:key_id ``` Parameters: -- `id` (required) - SSH key ID +- `key_id` (required) - SSH key ID ## Delete SSH key for given user Deletes key owned by a specified user. Available only for admin. ``` -DELETE /users/:uid/keys/:id +DELETE /users/:id/keys/:key_id ``` Parameters: -- `uid` (required) - id of specified user -- `id` (required) - SSH key ID +- `id` (required) - id of specified user +- `key_id` (required) - SSH key ID Will return `200 OK` on success, or `404 Not found` if either user or key cannot be found. @@ -510,24 +510,24 @@ Parameters: Get a list of a specified user's emails. Available only for admin ``` -GET /users/:uid/emails +GET /users/:id/emails ``` Parameters: -- `uid` (required) - id of specified user +- `id` (required) - id of specified user ## Single email Get a single email. ``` -GET /user/emails/:id +GET /user/emails/:email_id ``` Parameters: -- `id` (required) - email ID +- `email_id` (required) - email ID ```json { @@ -590,25 +590,25 @@ This is an idempotent function and calling it on a email that is already deleted or not available results in `200 OK`. ``` -DELETE /user/emails/:id +DELETE /user/emails/:email_id ``` Parameters: -- `id` (required) - email ID +- `email_id` (required) - email ID ## Delete email for given user Deletes email owned by a specified user. Available only for admin. ``` -DELETE /users/:uid/emails/:id +DELETE /users/:id/emails/:email_id ``` Parameters: -- `uid` (required) - id of specified user -- `id` (required) - email ID +- `id` (required) - id of specified user +- `email_id` (required) - email ID Will return `200 OK` on success, or `404 Not found` if either user or email cannot be found. @@ -617,12 +617,12 @@ Will return `200 OK` on success, or `404 Not found` if either user or email cann Blocks the specified user. Available only for admin. ``` -PUT /users/:uid/block +PUT /users/:id/block ``` Parameters: -- `uid` (required) - id of specified user +- `id` (required) - id of specified user Will return `200 OK` on success, `404 User Not Found` is user cannot be found or `403 Forbidden` when trying to block an already blocked user by LDAP synchronization. @@ -632,12 +632,12 @@ Will return `200 OK` on success, `404 User Not Found` is user cannot be found or Unblocks the specified user. Available only for admin. ``` -PUT /users/:uid/unblock +PUT /users/:id/unblock ``` Parameters: -- `uid` (required) - id of specified user +- `id` (required) - id of specified user Will return `200 OK` on success, `404 User Not Found` is user cannot be found or `403 Forbidden` when trying to unblock a user blocked by LDAP synchronization. |