diff options
author | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
---|---|---|
committer | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
commit | 87d01cc3bfc12c08024881dc8f13101e5430e3e6 (patch) | |
tree | 05e82defa51500257f97e3530862da03668895e3 /doc/api | |
parent | fef5c923c009c64183cc43909444a1bdaba218b7 (diff) | |
parent | 71f3d48544cc0857c8d470b182f7e809de6a4642 (diff) | |
download | gitlab-ce-consolidate-page-widths-part02.tar.gz |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into consolidate-page-widths-part02consolidate-page-widths-part02
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/README.md | 1 | ||||
-rw-r--r-- | doc/api/jobs.md | 36 | ||||
-rw-r--r-- | doc/api/projects.md | 1 | ||||
-rw-r--r-- | doc/api/resource_label_events.md | 175 | ||||
-rw-r--r-- | doc/api/users.md | 1 |
5 files changed, 201 insertions, 13 deletions
diff --git a/doc/api/README.md b/doc/api/README.md index e2a6e87a2c3..1738d4fae5c 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -40,6 +40,7 @@ following locations: - [Namespaces](namespaces.md) - [Notes](notes.md) (comments) - [Discussions](discussions.md) (threaded comments) +- [Resource Label Events](resource_label_events.md) - [Notification settings](notification_settings.md) - [Open source license templates](templates/licenses.md) - [Pages Domains](pages_domains.md) diff --git a/doc/api/jobs.md b/doc/api/jobs.md index 5f9556726d1..cf292adf150 100644 --- a/doc/api/jobs.md +++ b/doc/api/jobs.md @@ -33,7 +33,9 @@ Example of response }, "coverage": null, "created_at": "2015-12-24T15:51:21.727Z", + "started_at": "2015-12-24T17:54:24.729Z", "finished_at": "2015-12-24T17:54:24.921Z", + "duration": 0.192, "artifacts_expire_at": "2016-01-23T17:54:24.921Z", "id": 6, "name": "rspec:other", @@ -47,7 +49,6 @@ Example of response "artifacts": [], "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:24.729Z", "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/6", @@ -78,6 +79,9 @@ Example of response }, "coverage": null, "created_at": "2015-12-24T15:51:21.802Z", + "started_at": "2015-12-24T17:54:27.722Z", + "finished_at": "2015-12-24T17:54:27.895Z", + "duration": 0.173, "artifacts_file": { "filename": "artifacts.zip", "size": 1000 @@ -88,7 +92,6 @@ Example of response {"file_type": "trace", "size": 1500, "filename": "job.log", "file_format": "raw"}, {"file_type": "junit", "size": 750, "filename": "junit.xml.gz", "file_format": "gzip"} ], - "finished_at": "2015-12-24T17:54:27.895Z", "artifacts_expire_at": "2016-01-23T17:54:27.895Z", "id": 7, "name": "teaspoon", @@ -102,7 +105,6 @@ Example of response "artifacts": [], "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:27.722Z", "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/7", @@ -158,7 +160,9 @@ Example of response }, "coverage": null, "created_at": "2015-12-24T15:51:21.727Z", + "started_at": "2015-12-24T17:54:24.729Z", "finished_at": "2015-12-24T17:54:24.921Z", + "duration": 0.192, "artifacts_expire_at": "2016-01-23T17:54:24.921Z", "id": 6, "name": "rspec:other", @@ -172,7 +176,6 @@ Example of response "artifacts": [], "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:24.729Z", "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/6", @@ -203,6 +206,9 @@ Example of response }, "coverage": null, "created_at": "2015-12-24T15:51:21.802Z", + "started_at": "2015-12-24T17:54:27.722Z", + "finished_at": "2015-12-24T17:54:27.895Z", + "duration": 0.173, "artifacts_file": { "filename": "artifacts.zip", "size": 1000 @@ -213,7 +219,6 @@ Example of response {"file_type": "trace", "size": 1500, "filename": "job.log", "file_format": "raw"}, {"file_type": "junit", "size": 750, "filename": "junit.xml.gz", "file_format": "gzip"} ], - "finished_at": "2015-12-24T17:54:27.895Z", "artifacts_expire_at": "2016-01-23T17:54:27.895Z", "id": 7, "name": "teaspoon", @@ -227,7 +232,6 @@ Example of response "artifacts": [], "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:27.722Z", "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/7", @@ -281,7 +285,9 @@ Example of response }, "coverage": null, "created_at": "2015-12-24T15:51:21.880Z", + "started_at": "2015-12-24T17:54:30.733Z", "finished_at": "2015-12-24T17:54:31.198Z", + "duration": 0.465, "artifacts_expire_at": "2016-01-23T17:54:31.198Z", "id": 8, "name": "rubocop", @@ -295,7 +301,6 @@ Example of response "artifacts": [], "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:30.733Z", "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/8", @@ -319,7 +324,7 @@ Example of response ## Get job artifacts > **Notes**: -> +> > - [Introduced][ce-2893] in GitLab 8.5. Get job artifacts of a project. @@ -351,7 +356,7 @@ Response: ## Download the artifacts archive > **Notes**: -> +> > - [Introduced][ce-5347] in GitLab 8.10. Download the artifacts archive from the given reference name and job provided the @@ -474,14 +479,15 @@ Example of response }, "coverage": null, "created_at": "2016-01-11T10:13:33.506Z", - "finished_at": "2016-01-11T10:14:09.526Z", + "started_at": "2016-01-11T10:14:09.526Z", + "finished_at": null, + "duration": 8, "id": 42, "name": "rubocop", "ref": "master", "artifacts": [], "runner": null, "stage": "test", - "started_at": null, "status": "canceled", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/42", @@ -521,14 +527,15 @@ Example of response }, "coverage": null, "created_at": "2016-01-11T10:13:33.506Z", + "started_at": null, "finished_at": null, + "duration": null, "id": 42, "name": "rubocop", "ref": "master", "artifacts": [], "runner": null, "stage": "test", - "started_at": null, "status": "pending", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/42", @@ -581,6 +588,7 @@ Example of response "created_at": "2016-01-11T10:13:33.506Z", "started_at": "2016-01-11T10:13:33.506Z", "finished_at": "2016-01-11T10:15:10.506Z", + "duration": 97.0, "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/42", @@ -633,6 +641,7 @@ Example response: "created_at": "2016-01-11T10:13:33.506Z", "started_at": "2016-01-11T10:13:33.506Z", "finished_at": "2016-01-11T10:15:10.506Z", + "duration": 97.0, "status": "failed", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/42", @@ -672,14 +681,15 @@ Example of response }, "coverage": null, "created_at": "2016-01-11T10:13:33.506Z", + "started_at": null, "finished_at": null, + "duration": null, "id": 42, "name": "rubocop", "ref": "master", "artifacts": [], "runner": null, "stage": "test", - "started_at": null, "status": "started", "tag": false, "web_url": "https://example.com/foo/bar/-/jobs/42", diff --git a/doc/api/projects.md b/doc/api/projects.md index 7e8b7c4b502..947e7db9c52 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -661,6 +661,7 @@ POST /projects | `avatar` | mixed | no | Image file for avatar of the project | | `printing_merge_request_link_enabled` | boolean | no | Show link to create/view merge request when pushing from the command line | | `ci_config_path` | string | no | The path to CI config file | +| `initialize_with_readme` | boolean | no | `false` by default | ## Create project for user diff --git a/doc/api/resource_label_events.md b/doc/api/resource_label_events.md new file mode 100644 index 00000000000..33e4821ccf4 --- /dev/null +++ b/doc/api/resource_label_events.md @@ -0,0 +1,175 @@ +# Resource label events API + +Resource label events keep track about who, when, and which label was added or removed to an issuable. + +## Issues + +### List project issue label events + +Gets a list of all label events for a single issue. + +``` +GET /projects/:id/issues/:issue_iid/resource_label_events +``` + +| Attribute | Type | Required | Description | +| ------------------- | ---------------- | ---------- | ------------ | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | +| `issue_iid` | integer | yes | The IID of an issue | + +```json +[ + { + "id": 142, + "user": { + "id": 1, + "name": "Administrator", + "username": "root", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://gitlab.example.com/root" + }, + "created_at": "2018-08-20T13:38:20.077Z", + "resource_type": "Issue", + "resource_id": 253, + "label": { + "id": 73, + "name": "a1", + "color": "#34495E", + "description": "" + }, + "action": "add" + }, + { + "id": 143, + "user": { + "id": 1, + "name": "Administrator", + "username": "root", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://gitlab.example.com/root" + }, + "created_at": "2018-08-20T13:38:20.077Z", + "resource_type": "Issue", + "resource_id": 253, + "label": { + "id": 74, + "name": "p1", + "color": "#0033CC", + "description": "" + }, + "action": "remove" + } +] +``` + +```bash +curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events +``` + +### Get single issue label event + +Returns a single label event for a specific project issue + +``` +GET /projects/:id/issues/:issue_iid/resource_label_events/:resource_label_event_id +``` + +Parameters: + +| Attribute | Type | Required | Description | +| --------------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | +| `issue_iid` | integer | yes | The IID of an issue | +| `resource_label_event_id` | integer | yes | The ID of a label event | + +```bash +curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1 +``` + +## Merge requests + +### List project merge request label events + +Gets a list of all label events for a single merge request. + +``` +GET /projects/:id/merge_requests/:merge_request_iid/resource_label_events +``` + +| Attribute | Type | Required | Description | +| ------------------- | ---------------- | ---------- | ------------ | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | +| `merge_request_iid` | integer | yes | The IID of a merge request | + +```json +[ + { + "id": 119, + "user": { + "id": 1, + "name": "Administrator", + "username": "root", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://gitlab.example.com/root" + }, + "created_at": "2018-08-20T06:17:28.394Z", + "resource_type": "MergeRequest", + "resource_id": 28, + "label": { + "id": 74, + "name": "p1", + "color": "#0033CC", + "description": "" + }, + "action": "add" + }, + { + "id": 120, + "user": { + "id": 1, + "name": "Administrator", + "username": "root", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://gitlab.example.com/root" + }, + "created_at": "2018-08-20T06:17:28.394Z", + "resource_type": "MergeRequest", + "resource_id": 28, + "label": { + "id": 41, + "name": "project", + "color": "#D1D100", + "description": "" + }, + "action": "add" + } +] +``` + +```bash +curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events +``` + +### Get single merge request label event + +Returns a single label event for a specific project merge request + +``` +GET /projects/:id/merge_requests/:merge_request_iid/resource_label_events/:resource_label_event_id +``` + +Parameters: + +| Attribute | Type | Required | Description | +| ------------------- | -------------- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | +| `merge_request_iid` | integer | yes | The IID of a merge request | +| `resource_label_event_id` | integer | yes | The ID of a label event | + +```bash +curl --request GET --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events/120 +``` diff --git a/doc/api/users.md b/doc/api/users.md index a8858468cab..51935280401 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -972,6 +972,7 @@ Parameters: - `id` (required) - id of specified user - `email` (required) - email address +- `skip_confirmation` (optional) - Skip confirmation and assume e-mail is verified - true or false (default) ## Delete email for current user |