From a862ade55bf68f56734538b40e02e56036f8a1bd Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Tue, 5 Jan 2016 16:36:14 +0100 Subject: Update ./doc/api/ --- doc/api/README.md | 1 + doc/api/builds.md | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 207 insertions(+) create mode 100644 doc/api/builds.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 25a31b235cc..43ee24ddb63 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -23,6 +23,7 @@ - [Namespaces](namespaces.md) - [Settings](settings.md) - [Keys](keys.md) +- [Builds](builds.md) ## Clients diff --git a/doc/api/builds.md b/doc/api/builds.md new file mode 100644 index 00000000000..b716499dd36 --- /dev/null +++ b/doc/api/builds.md @@ -0,0 +1,206 @@ +# Builds API + +## List project builds + +Get a list of builds in a project. + +``` +GET /projects/:id/builds +``` + +Parameters: + +- `id` (required) - The ID of a project +- `scope` (optional) - The scope of builds to show (one of: `all`, `finished`, `running`; default: `all`) + +```json +[ + { + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-04T15:41:23.147Z", + "finished_at": null, + "id": 65, + "name": "brakeman", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "pending" + }, + { + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-04T15:41:23.046Z", + "finished_at": null, + "id": 64, + "name": "rubocop", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "pending" + } +] +``` + +## List commit builds + +Get a list of builds for specific commit in a project. + +``` +GET /projects/:id/builds/commit/:sha +``` + +Parameters: + +- `id` (required) - The ID of a project +- `sha` (required) - The SHA id of a commit +- `scope` (optional) - The scope of builds to show (one of: `all`, `finished`, `running`; default: `all`) + + +```json +[ + { + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-04T15:41:23.147Z", + "finished_at": null, + "id": 65, + "name": "brakeman", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "pending" + }, + { + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-04T15:41:23.046Z", + "finished_at": null, + "id": 64, + "name": "rubocop", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "pending" + } +] +``` + +## Get a single build + +Get a single build of a project + +``` +GET /projects/:id/builds/:build_id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `build_id` (required) - The ID of a build + +```json +{ + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-04T15:41:23.046Z", + "finished_at": null, + "id": 64, + "name": "rubocop", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "pending" +} +``` + +## Cancel a build + +Cancel a single build of a project + +``` +POST /projects/:id/builds/:build_id/cancel +``` + +Parameters: + +- `id` (required) - The ID of a project +- `build_id` (required) - The ID of a build + +```json +{ + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-05T15:33:25.936Z", + "finished_at": "2016-01-05T15:33:47.553Z", + "id": 66, + "name": "rubocop", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "canceled" +} +``` + +## Retry a build + +Retry a single build of a project + +``` +POST /projects/:id/builds/:build_id/retry +``` + +Parameters: + +- `id` (required) - The ID of a project +- `build_id` (required) - The ID of a build + +```json +{ + "commit": { + "committed_at": "2015-12-28T14:34:03.814Z", + "id": 2, + "ref": null, + "sha": "6b053ad388c531c21907f022933e5e81598db388" + }, + "created_at": "2016-01-05T15:33:25.936Z", + "finished_at": null, + "id": 66, + "name": "rubocop", + "ref": "master", + "runner": null, + "stage": "test", + "started_at": null, + "status": "pending" +} +``` -- cgit v1.2.1 From ba9799b42f5bc861df1fc5d41c149cf72e9daf04 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Thu, 7 Jan 2016 10:39:02 +0100 Subject: Update ./doc/api --- doc/api/projects.md | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'doc/api') diff --git a/doc/api/projects.md b/doc/api/projects.md index 0ca81ffd49e..96a3f08490c 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -76,7 +76,14 @@ Parameters: "updated_at": "2013-09-30T13: 46: 02Z" }, "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png" + "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png", + "shared_runners_enabled": true, + "forks_count": 0, + "star_count": 0, + "build_allow_git_fetch": true, + "build_coverage_regex": null, + "build_timeout": 3600, + "runners_token": "4f9e77be0eed5ef29548fccda3b371" }, { "id": 6, @@ -129,7 +136,14 @@ Parameters: } }, "archived": false, - "avatar_url": null + "avatar_url": null, + "shared_runners_enabled": true, + "forks_count": 0, + "star_count": 0, + "build_allow_git_fetch": true, + "build_coverage_regex": null, + "build_timeout": 3600, + "runners_token": "b8547b1dc37721d05889db52fa2f02" } ] ``` @@ -244,7 +258,14 @@ Parameters: } }, "archived": false, - "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png" + "avatar_url": "http://example.com/uploads/project/avatar/3/uploads/avatar.png", + "shared_runners_enabled": true, + "forks_count": 0, + "star_count": 0, + "build_allow_git_fetch": true, + "build_coverage_regex": null, + "build_timeout": 3600, + "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b" } ``` @@ -409,6 +430,9 @@ Parameters: - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `import_url` (optional) +- `build_allow_git_fetch` (optional) +- `build_timeout` (optional) +- `build_coverage_regex` (optional) ### Create project for user @@ -431,6 +455,9 @@ Parameters: - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `import_url` (optional) +- `build_allow_git_fetch` (optional) +- `build_timeout` (optional) +- `build_coverage_regex` (optional) ### Edit project @@ -454,6 +481,9 @@ Parameters: - `snippets_enabled` (optional) - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) +- `build_allow_git_fetch` (optional) +- `build_timeout` (optional) +- `build_coverage_regex` (optional) On success, method returns 200 with the updated project. If parameters are invalid, 400 is returned. -- cgit v1.2.1 From b0a77a224857ed45afaf642b26ce3ba87d9828a7 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Thu, 7 Jan 2016 11:04:25 +0100 Subject: Update ./doc/api --- doc/api/README.md | 1 + doc/api/triggers.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 doc/api/triggers.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 25a31b235cc..1838bcc0bb9 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -23,6 +23,7 @@ - [Namespaces](namespaces.md) - [Settings](settings.md) - [Keys](keys.md) +- [Triggers](triggers.md) ## Clients diff --git a/doc/api/triggers.md b/doc/api/triggers.md new file mode 100644 index 00000000000..6adcc8fe3b8 --- /dev/null +++ b/doc/api/triggers.md @@ -0,0 +1,94 @@ +# Triggers + +## List project triggers + +Get a list of project triggers + +``` +GET /projects/:id/triggers +``` + +Parameters: + +- `id` (required) - The ID of a project + +```json +[ + { + "created_at": "2015-12-23T16:24:34.716Z", + "deleted_at": null, + "id": 1, + "last_used": "2016-01-04T15:41:21.986Z", + "token": "fbdb730c2fbdb095a0862dbd8ab88b", + "updated_at": "2015-12-23T16:24:34.716Z" + }, + { + "created_at": "2015-12-23T16:25:56.760Z", + "deleted_at": null, + "id": 2, + "last_used": null, + "token": "7b9148c158980bbd9bcea92c17522d", + "updated_at": "2015-12-23T16:25:56.760Z" + } +] +``` + +## Get trigger details + +Get details of trigger of a project + +``` +GET /projects/:id/triggers/:trigger_id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `trigger_id` (required) - The ID of a trigger + +```json +{ + "created_at": "2015-12-23T16:25:56.760Z", + "deleted_at": null, + "id": 2, + "last_used": null, + "token": "7b9148c158980bbd9bcea92c17522d", + "updated_at": "2015-12-23T16:25:56.760Z" +} +``` + +## Create a project trigger + +Create a trigger for a project + +``` +POST /projects/:id/triggers +``` + +Parameters: + +- `id` (required) - The ID of a project + +```json +{ + "created_at": "2016-01-07T09:53:58.235Z", + "deleted_at": null, + "id": 5, + "last_used": null, + "token": "6d056f63e50fe6f8c5f8f4aa10edb7", + "updated_at": "2016-01-07T09:53:58.235Z" +} +``` + +## Remove a project trigger + +Remove a trigger of a project + +``` +DELETE /projects/:id/triggers/:trigger_id +``` + +Parameters: + +- `id` (required) - The ID of a project +- `trigger_id` (required) - The ID of a trigger -- cgit v1.2.1 From b60445906849e84ff52ac6a5d7d501bb5a21eb60 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Thu, 7 Jan 2016 14:10:49 +0100 Subject: Update ./doc/api --- doc/api/README.md | 1 + doc/api/variables.md | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 doc/api/variables.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 25a31b235cc..198b4ddfee1 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -23,6 +23,7 @@ - [Namespaces](namespaces.md) - [Settings](settings.md) - [Keys](keys.md) +- [Variables](variables.md) ## Clients diff --git a/doc/api/variables.md b/doc/api/variables.md new file mode 100644 index 00000000000..cdc9ba42254 --- /dev/null +++ b/doc/api/variables.md @@ -0,0 +1,106 @@ +# Variables + +## Variables keys + +All variable keys must contains only letters, digits and '\_'. They must also be no longer than 255 characters. + +## List project variables + +Get list of variables of a project. + +``` +GET /projects/:id/variables +``` + +Parameters: + +- `id` (required) - The ID of a project + +```json +[ + { + "key": "TEST_VARIABLE_1", + "value": "TEST_1" + }, + { + "key": "TEST_VARIABLE_2", + "value": "TEST_2" + } +] +``` + +## Show variable details + +Get details of specifica variable of a project. + +``` +GET /projects/:id/variables/:key +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` of variable + +```json +{ + "key": "TEST_VARIABLE_1", + "value": "TEST_1" +} +``` + +## Create variable + +Create new variable in project. + +``` +POST /projects/:id/variables +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` for variable +- `value` (required) - The `value` for variable + +```json +{ + "key": "NEW_VARIABLE", + "value": "new value" +} +``` + +## Update variable + +Update variable. + +``` +PUT /projects/:id/variables/:key +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` for variable +- `value` (required) - The `value` for variable + +```json +{ + "key": "NEW_VARIABLE", + "value": "updated value" +} +``` + +## Remove variable + +Remove variable. + +``` +DELETE /projects/:id/variables/:key +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` for variable + -- cgit v1.2.1 From e0ec69d919cb44194e76034f2324ec0d4f5f1df6 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Thu, 7 Jan 2016 18:48:33 +0100 Subject: Change 'trigger_id' to 'token' as resource ID in triggers API --- doc/api/triggers.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'doc/api') diff --git a/doc/api/triggers.md b/doc/api/triggers.md index 6adcc8fe3b8..4150d7b4c10 100644 --- a/doc/api/triggers.md +++ b/doc/api/triggers.md @@ -17,7 +17,6 @@ Parameters: { "created_at": "2015-12-23T16:24:34.716Z", "deleted_at": null, - "id": 1, "last_used": "2016-01-04T15:41:21.986Z", "token": "fbdb730c2fbdb095a0862dbd8ab88b", "updated_at": "2015-12-23T16:24:34.716Z" @@ -25,7 +24,6 @@ Parameters: { "created_at": "2015-12-23T16:25:56.760Z", "deleted_at": null, - "id": 2, "last_used": null, "token": "7b9148c158980bbd9bcea92c17522d", "updated_at": "2015-12-23T16:25:56.760Z" @@ -38,19 +36,18 @@ Parameters: Get details of trigger of a project ``` -GET /projects/:id/triggers/:trigger_id +GET /projects/:id/triggers/:token ``` Parameters: - `id` (required) - The ID of a project -- `trigger_id` (required) - The ID of a trigger +- `token` (required) - The `token` of a trigger ```json { "created_at": "2015-12-23T16:25:56.760Z", "deleted_at": null, - "id": 2, "last_used": null, "token": "7b9148c158980bbd9bcea92c17522d", "updated_at": "2015-12-23T16:25:56.760Z" @@ -73,7 +70,6 @@ Parameters: { "created_at": "2016-01-07T09:53:58.235Z", "deleted_at": null, - "id": 5, "last_used": null, "token": "6d056f63e50fe6f8c5f8f4aa10edb7", "updated_at": "2016-01-07T09:53:58.235Z" @@ -85,10 +81,10 @@ Parameters: Remove a trigger of a project ``` -DELETE /projects/:id/triggers/:trigger_id +DELETE /projects/:id/triggers/:token ``` Parameters: - `id` (required) - The ID of a project -- `trigger_id` (required) - The ID of a trigger +- `token` (required) - The `token` of a trigger -- cgit v1.2.1 From 549a2fa7873366b52e9ba3caa849073b7b958b73 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Fri, 8 Jan 2016 14:01:31 +0100 Subject: Modify builds scope filtering in builds API --- doc/api/builds.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/api') diff --git a/doc/api/builds.md b/doc/api/builds.md index b716499dd36..c52266714d0 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -11,7 +11,7 @@ GET /projects/:id/builds Parameters: - `id` (required) - The ID of a project -- `scope` (optional) - The scope of builds to show (one of: `all`, `finished`, `running`; default: `all`) +- `scope` (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds) ```json [ @@ -64,8 +64,7 @@ Parameters: - `id` (required) - The ID of a project - `sha` (required) - The SHA id of a commit -- `scope` (optional) - The scope of builds to show (one of: `all`, `finished`, `running`; default: `all`) - +- `scope` (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds) ```json [ -- cgit v1.2.1 From 6e7db8e23e169bcbf0847ece27b9e44e00ae572b Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Wed, 30 Dec 2015 16:52:02 -0200 Subject: Prevent ldap_blocked users from being blocked/unblocked by the API --- doc/api/users.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/users.md b/doc/api/users.md index 773fe36d277..b7fc903825e 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -558,7 +558,8 @@ Parameters: - `uid` (required) - id of specified user -Will return `200 OK` on success, or `404 User Not Found` is user cannot be found. +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. ## Unblock user @@ -572,4 +573,5 @@ Parameters: - `uid` (required) - id of specified user -Will return `200 OK` on success, or `404 User Not Found` is user cannot be found. +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. -- cgit v1.2.1 From 4e70f2519bba83d5f9d6fd0bed80e9837e8b5fc5 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Mon, 11 Jan 2016 11:15:04 +0100 Subject: Update ./doc/api/builds.md --- doc/api/builds.md | 301 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 232 insertions(+), 69 deletions(-) (limited to 'doc/api') diff --git a/doc/api/builds.md b/doc/api/builds.md index c52266714d0..64efe6bb3b1 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -17,37 +17,97 @@ Parameters: [ { "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-04T15:41:23.147Z", - "finished_at": null, - "id": 65, - "name": "brakeman", + "coverage": null, + "created_at": "2015-12-24T15:51:21.802Z", + "download_url": null, + "finished_at": "2015-12-24T17:54:27.895Z", + "id": 7, + "name": "teaspoon", "ref": "master", "runner": null, "stage": "test", - "started_at": null, - "status": "pending" + "started_at": "2015-12-24T17:54:27.722Z", + "status": "failed", + "tag": false, + "user": { + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "bio": null, + "can_create_group": true, + "can_create_project": true, + "color_scheme_id": 2, + "created_at": "2015-12-21T13:14:24.077Z", + "current_sign_in_at": "2016-01-11T09:31:40.472Z", + "email": "admin@example.com", + "id": 1, + "identities": [], + "is_admin": true, + "linkedin": "", + "name": "Administrator", + "projects_limit": 100, + "skype": "", + "state": "active", + "theme_id": 3, + "twitter": "", + "two_factor_enabled": false, + "username": "root", + "web_url": "http://gitlab.dev/u/root", + "website_url": "" + } }, { "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-04T15:41:23.046Z", - "finished_at": null, - "id": 64, - "name": "rubocop", + "coverage": null, + "created_at": "2015-12-24T15:51:21.727Z", + "download_url": null, + "finished_at": "2015-12-24T17:54:24.921Z", + "id": 6, + "name": "spinach:other", "ref": "master", "runner": null, "stage": "test", - "started_at": null, - "status": "pending" + "started_at": "2015-12-24T17:54:24.729Z", + "status": "failed", + "tag": false, + "user": { + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "bio": null, + "can_create_group": true, + "can_create_project": true, + "color_scheme_id": 2, + "created_at": "2015-12-21T13:14:24.077Z", + "current_sign_in_at": "2016-01-11T09:31:40.472Z", + "email": "admin@example.com", + "id": 1, + "identities": [], + "is_admin": true, + "linkedin": "", + "name": "Administrator", + "projects_limit": 100, + "skype": "", + "state": "active", + "theme_id": 3, + "twitter": "", + "two_factor_enabled": false, + "username": "root", + "web_url": "http://gitlab.dev/u/root", + "website_url": "" + } } ] ``` @@ -57,7 +117,7 @@ Parameters: Get a list of builds for specific commit in a project. ``` -GET /projects/:id/builds/commit/:sha +GET /projects/:id/repository/commits/:sha/builds ``` Parameters: @@ -67,45 +127,104 @@ Parameters: - `scope` (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds) ```json -[ - { - "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + +``` + +## Get a single build +mmit": { + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-04T15:41:23.147Z", - "finished_at": null, - "id": 65, + "coverage": null, + "created_at": "2015-12-24T15:51:21.957Z", + "download_url": null, + "finished_at": "2015-12-24T17:54:33.913Z", + "id": 9, "name": "brakeman", "ref": "master", "runner": null, "stage": "test", - "started_at": null, - "status": "pending" + "started_at": "2015-12-24T17:54:33.727Z", + "status": "failed", + "tag": false, + "user": { + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "bio": null, + "can_create_group": true, + "can_create_project": true, + "color_scheme_id": 2, + "created_at": "2015-12-21T13:14:24.077Z", + "current_sign_in_at": "2016-01-11T09:31:40.472Z", + "email": "admin@example.com", + "id": 1, + "identities": [], + "is_admin": true, + "linkedin": "", + "name": "Administrator", + "projects_limit": 100, + "skype": "", + "state": "active", + "theme_id": 3, + "twitter": "", + "two_factor_enabled": false, + "username": "root", + "web_url": "http://gitlab.dev/u/root", + "website_url": "" + } }, { "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-04T15:41:23.046Z", - "finished_at": null, - "id": 64, + "coverage": null, + "created_at": "2015-12-24T15:51:21.880Z", + "download_url": null, + "finished_at": "2015-12-24T17:54:31.198Z", + "id": 8, "name": "rubocop", "ref": "master", "runner": null, "stage": "test", - "started_at": null, - "status": "pending" + "started_at": "2015-12-24T17:54:30.733Z", + "status": "failed", + "tag": false, + "user": { + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "bio": null, + "can_create_group": true, + "can_create_project": true, + "color_scheme_id": 2, + "created_at": "2015-12-21T13:14:24.077Z", + "current_sign_in_at": "2016-01-11T09:31:40.472Z", + "email": "admin@example.com", + "id": 1, + "identities": [], + "is_admin": true, + "linkedin": "", + "name": "Administrator", + "projects_limit": 100, + "skype": "", + "state": "active", + "theme_id": 3, + "twitter": "", + "two_factor_enabled": false, + "username": "root", + "web_url": "http://gitlab.dev/u/root", + "website_url": "" + } } ] -``` - -## Get a single build Get a single build of a project @@ -121,20 +240,50 @@ Parameters: ```json { "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-04T15:41:23.046Z", - "finished_at": null, - "id": 64, + "coverage": null, + "created_at": "2015-12-24T15:51:21.880Z", + "download_url": null, + "finished_at": "2015-12-24T17:54:31.198Z", + "id": 8, "name": "rubocop", "ref": "master", "runner": null, "stage": "test", - "started_at": null, - "status": "pending" + "started_at": "2015-12-24T17:54:30.733Z", + "status": "failed", + "tag": false, + "user": { + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "bio": null, + "can_create_group": true, + "can_create_project": true, + "color_scheme_id": 2, + "created_at": "2015-12-21T13:14:24.077Z", + "current_sign_in_at": "2016-01-11T09:31:40.472Z", + "email": "admin@example.com", + "id": 1, + "identities": [], + "is_admin": true, + "linkedin": "", + "name": "Administrator", + "projects_limit": 100, + "skype": "", + "state": "active", + "theme_id": 3, + "twitter": "", + "two_factor_enabled": false, + "username": "root", + "web_url": "http://gitlab.dev/u/root", + "website_url": "" + } } ``` @@ -154,20 +303,27 @@ Parameters: ```json { "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-05T15:33:25.936Z", - "finished_at": "2016-01-05T15:33:47.553Z", - "id": 66, + "coverage": null, + "created_at": "2016-01-11T10:13:33.506Z", + "download_url": null, + "finished_at": "2016-01-11T10:14:09.526Z", + "id": 69, "name": "rubocop", "ref": "master", "runner": null, "stage": "test", "started_at": null, - "status": "canceled" + "status": "canceled", + "tag": false, + "user": null } ``` @@ -187,19 +343,26 @@ Parameters: ```json { "commit": { - "committed_at": "2015-12-28T14:34:03.814Z", - "id": 2, - "ref": null, - "sha": "6b053ad388c531c21907f022933e5e81598db388" + "author_email": "admin@example.com", + "author_name": "Administrator", + "created_at": "2015-12-24T16:51:14.000+01:00", + "id": "0ff3ae198f8601a285adcf5c0fff204ee6fba5fd", + "message": "Test the CI integration.", + "short_id": "0ff3ae19", + "title": "Test the CI integration." }, - "created_at": "2016-01-05T15:33:25.936Z", + "coverage": null, + "created_at": "2016-01-11T10:13:33.506Z", + "download_url": null, "finished_at": null, - "id": 66, + "id": 69, "name": "rubocop", "ref": "master", "runner": null, "stage": "test", "started_at": null, - "status": "pending" + "status": "pending", + "tag": false, + "user": null } ``` -- cgit v1.2.1 From fc4108b38b5d0a7fc755c1977663f516b5dea0bd Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Mon, 11 Jan 2016 15:27:20 +0100 Subject: Modify CI features in projects API --- doc/api/projects.md | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'doc/api') diff --git a/doc/api/projects.md b/doc/api/projects.md index 96a3f08490c..4632554bf86 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -79,11 +79,7 @@ Parameters: "avatar_url": "http://example.com/uploads/project/avatar/4/uploads/avatar.png", "shared_runners_enabled": true, "forks_count": 0, - "star_count": 0, - "build_allow_git_fetch": true, - "build_coverage_regex": null, - "build_timeout": 3600, - "runners_token": "4f9e77be0eed5ef29548fccda3b371" + "star_count": 0 }, { "id": 6, @@ -140,9 +136,6 @@ Parameters: "shared_runners_enabled": true, "forks_count": 0, "star_count": 0, - "build_allow_git_fetch": true, - "build_coverage_regex": null, - "build_timeout": 3600, "runners_token": "b8547b1dc37721d05889db52fa2f02" } ] @@ -262,9 +255,6 @@ Parameters: "shared_runners_enabled": true, "forks_count": 0, "star_count": 0, - "build_allow_git_fetch": true, - "build_coverage_regex": null, - "build_timeout": 3600, "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b" } ``` @@ -430,9 +420,6 @@ Parameters: - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `import_url` (optional) -- `build_allow_git_fetch` (optional) -- `build_timeout` (optional) -- `build_coverage_regex` (optional) ### Create project for user @@ -455,9 +442,6 @@ Parameters: - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `import_url` (optional) -- `build_allow_git_fetch` (optional) -- `build_timeout` (optional) -- `build_coverage_regex` (optional) ### Edit project @@ -481,9 +465,6 @@ Parameters: - `snippets_enabled` (optional) - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) -- `build_allow_git_fetch` (optional) -- `build_timeout` (optional) -- `build_coverage_regex` (optional) On success, method returns 200 with the updated project. If parameters are invalid, 400 is returned. -- cgit v1.2.1 From 470b3a482a06c733665abcf2d92ad4d898b2efe0 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Tue, 12 Jan 2016 11:50:14 +0100 Subject: Fix doc/api/builds.md --- doc/api/builds.md | 60 ++++++++++++++++++------------------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) (limited to 'doc/api') diff --git a/doc/api/builds.md b/doc/api/builds.md index 64efe6bb3b1..99ef0882c16 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -127,11 +127,9 @@ Parameters: - `scope` (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds) ```json - -``` - -## Get a single build -mmit": { +[ + { + "commit": { "author_email": "admin@example.com", "author_name": "Administrator", "created_at": "2015-12-24T16:51:14.000+01:00", @@ -141,41 +139,18 @@ mmit": { "title": "Test the CI integration." }, "coverage": null, - "created_at": "2015-12-24T15:51:21.957Z", + "created_at": "2016-01-11T10:13:33.506Z", "download_url": null, - "finished_at": "2015-12-24T17:54:33.913Z", - "id": 9, - "name": "brakeman", + "finished_at": "2016-01-11T10:14:09.526Z", + "id": 69, + "name": "rubocop", "ref": "master", "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:33.727Z", - "status": "failed", + "started_at": null, + "status": "canceled", "tag": false, - "user": { - "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "bio": null, - "can_create_group": true, - "can_create_project": true, - "color_scheme_id": 2, - "created_at": "2015-12-21T13:14:24.077Z", - "current_sign_in_at": "2016-01-11T09:31:40.472Z", - "email": "admin@example.com", - "id": 1, - "identities": [], - "is_admin": true, - "linkedin": "", - "name": "Administrator", - "projects_limit": 100, - "skype": "", - "state": "active", - "theme_id": 3, - "twitter": "", - "two_factor_enabled": false, - "username": "root", - "web_url": "http://gitlab.dev/u/root", - "website_url": "" - } + "user": null }, { "commit": { @@ -188,15 +163,15 @@ mmit": { "title": "Test the CI integration." }, "coverage": null, - "created_at": "2015-12-24T15:51:21.880Z", + "created_at": "2015-12-24T15:51:21.957Z", "download_url": null, - "finished_at": "2015-12-24T17:54:31.198Z", - "id": 8, - "name": "rubocop", + "finished_at": "2015-12-24T17:54:33.913Z", + "id": 9, + "name": "brakeman", "ref": "master", "runner": null, "stage": "test", - "started_at": "2015-12-24T17:54:30.733Z", + "started_at": "2015-12-24T17:54:33.727Z", "status": "failed", "tag": false, "user": { @@ -206,7 +181,7 @@ mmit": { "can_create_project": true, "color_scheme_id": 2, "created_at": "2015-12-21T13:14:24.077Z", - "current_sign_in_at": "2016-01-11T09:31:40.472Z", + "current_sign_in_at": "2016-01-12T10:30:48.315Z", "email": "admin@example.com", "id": 1, "identities": [], @@ -225,6 +200,9 @@ mmit": { } } ] +``` + +## Get a single build Get a single build of a project -- cgit v1.2.1 From 97338496188add9ec8d192c7e78f6a6040befffa Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 15:17:59 +0100 Subject: Add some fixes after review --- doc/api/builds.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'doc/api') diff --git a/doc/api/builds.md b/doc/api/builds.md index 99ef0882c16..06ff89bea00 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -40,23 +40,14 @@ Parameters: "user": { "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "bio": null, - "can_create_group": true, - "can_create_project": true, - "color_scheme_id": 2, "created_at": "2015-12-21T13:14:24.077Z", - "current_sign_in_at": "2016-01-11T09:31:40.472Z", - "email": "admin@example.com", "id": 1, - "identities": [], "is_admin": true, "linkedin": "", "name": "Administrator", - "projects_limit": 100, "skype": "", "state": "active", - "theme_id": 3, "twitter": "", - "two_factor_enabled": false, "username": "root", "web_url": "http://gitlab.dev/u/root", "website_url": "" @@ -87,23 +78,14 @@ Parameters: "user": { "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "bio": null, - "can_create_group": true, - "can_create_project": true, - "color_scheme_id": 2, "created_at": "2015-12-21T13:14:24.077Z", - "current_sign_in_at": "2016-01-11T09:31:40.472Z", - "email": "admin@example.com", "id": 1, - "identities": [], "is_admin": true, "linkedin": "", "name": "Administrator", - "projects_limit": 100, "skype": "", "state": "active", - "theme_id": 3, "twitter": "", - "two_factor_enabled": false, "username": "root", "web_url": "http://gitlab.dev/u/root", "website_url": "" @@ -177,23 +159,14 @@ Parameters: "user": { "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "bio": null, - "can_create_group": true, - "can_create_project": true, - "color_scheme_id": 2, "created_at": "2015-12-21T13:14:24.077Z", - "current_sign_in_at": "2016-01-12T10:30:48.315Z", - "email": "admin@example.com", "id": 1, - "identities": [], "is_admin": true, "linkedin": "", "name": "Administrator", - "projects_limit": 100, "skype": "", "state": "active", - "theme_id": 3, "twitter": "", - "two_factor_enabled": false, "username": "root", "web_url": "http://gitlab.dev/u/root", "website_url": "" @@ -241,23 +214,14 @@ Parameters: "user": { "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "bio": null, - "can_create_group": true, - "can_create_project": true, - "color_scheme_id": 2, "created_at": "2015-12-21T13:14:24.077Z", - "current_sign_in_at": "2016-01-11T09:31:40.472Z", - "email": "admin@example.com", "id": 1, - "identities": [], "is_admin": true, "linkedin": "", "name": "Administrator", - "projects_limit": 100, "skype": "", "state": "active", - "theme_id": 3, "twitter": "", - "two_factor_enabled": false, "username": "root", "web_url": "http://gitlab.dev/u/root", "website_url": "" -- cgit v1.2.1 From d338087605791e408e696b11974995be9ebff80e Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 18:51:06 +0100 Subject: Add 'Build' prefix to Variables entry name in API docs index --- doc/api/README.md | 2 +- doc/api/build_variables.md | 106 +++++++++++++++++++++++++++++++++++++++++++++ doc/api/variables.md | 106 --------------------------------------------- 3 files changed, 107 insertions(+), 107 deletions(-) create mode 100644 doc/api/build_variables.md delete mode 100644 doc/api/variables.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 198b4ddfee1..c3401bcbc9d 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -23,7 +23,7 @@ - [Namespaces](namespaces.md) - [Settings](settings.md) - [Keys](keys.md) -- [Variables](variables.md) +- [Build Variables](build_variables.md) ## Clients diff --git a/doc/api/build_variables.md b/doc/api/build_variables.md new file mode 100644 index 00000000000..2b804fd9051 --- /dev/null +++ b/doc/api/build_variables.md @@ -0,0 +1,106 @@ +# Build Variables + +## Variables keys + +All variable keys must contains only letters, digits and '\_'. They must also be no longer than 255 characters. + +## List project variables + +Get list of variables of a project. + +``` +GET /projects/:id/variables +``` + +Parameters: + +- `id` (required) - The ID of a project + +```json +[ + { + "key": "TEST_VARIABLE_1", + "value": "TEST_1" + }, + { + "key": "TEST_VARIABLE_2", + "value": "TEST_2" + } +] +``` + +## Show variable details + +Get details of specifica variable of a project. + +``` +GET /projects/:id/variables/:key +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` of variable + +```json +{ + "key": "TEST_VARIABLE_1", + "value": "TEST_1" +} +``` + +## Create variable + +Create new variable in project. + +``` +POST /projects/:id/variables +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` for variable +- `value` (required) - The `value` for variable + +```json +{ + "key": "NEW_VARIABLE", + "value": "new value" +} +``` + +## Update variable + +Update variable. + +``` +PUT /projects/:id/variables/:key +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` for variable +- `value` (required) - The `value` for variable + +```json +{ + "key": "NEW_VARIABLE", + "value": "updated value" +} +``` + +## Remove variable + +Remove variable. + +``` +DELETE /projects/:id/variables/:key +``` + +Parameters: + +- `id` (required) - The ID of a project +- `key` (required) - The `key` for variable + diff --git a/doc/api/variables.md b/doc/api/variables.md deleted file mode 100644 index cdc9ba42254..00000000000 --- a/doc/api/variables.md +++ /dev/null @@ -1,106 +0,0 @@ -# Variables - -## Variables keys - -All variable keys must contains only letters, digits and '\_'. They must also be no longer than 255 characters. - -## List project variables - -Get list of variables of a project. - -``` -GET /projects/:id/variables -``` - -Parameters: - -- `id` (required) - The ID of a project - -```json -[ - { - "key": "TEST_VARIABLE_1", - "value": "TEST_1" - }, - { - "key": "TEST_VARIABLE_2", - "value": "TEST_2" - } -] -``` - -## Show variable details - -Get details of specifica variable of a project. - -``` -GET /projects/:id/variables/:key -``` - -Parameters: - -- `id` (required) - The ID of a project -- `key` (required) - The `key` of variable - -```json -{ - "key": "TEST_VARIABLE_1", - "value": "TEST_1" -} -``` - -## Create variable - -Create new variable in project. - -``` -POST /projects/:id/variables -``` - -Parameters: - -- `id` (required) - The ID of a project -- `key` (required) - The `key` for variable -- `value` (required) - The `value` for variable - -```json -{ - "key": "NEW_VARIABLE", - "value": "new value" -} -``` - -## Update variable - -Update variable. - -``` -PUT /projects/:id/variables/:key -``` - -Parameters: - -- `id` (required) - The ID of a project -- `key` (required) - The `key` for variable -- `value` (required) - The `value` for variable - -```json -{ - "key": "NEW_VARIABLE", - "value": "updated value" -} -``` - -## Remove variable - -Remove variable. - -``` -DELETE /projects/:id/variables/:key -``` - -Parameters: - -- `id` (required) - The ID of a project -- `key` (required) - The `key` for variable - -- cgit v1.2.1 From 2b81248ad5329a717d2f10f8c19453b989d202ac Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 20:23:48 +0100 Subject: Modify builds API documentation style [ci skip] --- doc/api/build_variables.md | 84 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 20 deletions(-) (limited to 'doc/api') diff --git a/doc/api/build_variables.md b/doc/api/build_variables.md index 2b804fd9051..5da5fb8f4a6 100644 --- a/doc/api/build_variables.md +++ b/doc/api/build_variables.md @@ -1,9 +1,5 @@ # Build Variables -## Variables keys - -All variable keys must contains only letters, digits and '\_'. They must also be no longer than 255 characters. - ## List project variables Get list of variables of a project. @@ -12,9 +8,19 @@ Get list of variables of a project. GET /projects/:id/variables ``` -Parameters: +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | + +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" +``` -- `id` (required) - The ID of a project +### Example of response ```json [ @@ -37,10 +43,20 @@ Get details of specifica variable of a project. GET /projects/:id/variables/:key ``` -Parameters: +### Parameters -- `id` (required) - The ID of a project -- `key` (required) - The `key` of variable +| Attribute | Type | required | Description | +|-----------|---------|----------|-----------------------| +| id | integer | yes | The ID of a project | +| key | string | yes | The `key` of variable | + +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/TEST_VARIABLE_1" +``` + +### Example of response ```json { @@ -57,11 +73,21 @@ Create new variable in project. POST /projects/:id/variables ``` -Parameters: +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|-----------------------| +| id | integer | yes | The ID of a project | +| key | string | yes | The `key` of variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9`, and `_` are allowed | +| value | string | yes | The `value` of variable | -- `id` (required) - The ID of a project -- `key` (required) - The `key` for variable -- `value` (required) - The `value` for variable +### Example of request + +``` +curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" -F "key=NEW_VARIABLE" -F "value=new value" +``` + +### Example of response ```json { @@ -78,11 +104,21 @@ Update variable. PUT /projects/:id/variables/:key ``` -Parameters: +### Parameters -- `id` (required) - The ID of a project -- `key` (required) - The `key` for variable -- `value` (required) - The `value` for variable +| Attribute | Type | required | Description | +|-----------|---------|----------|-------------------------| +| id | integer | yes | The ID of a project | +| key | string | yes | The `key` of variable | +| value | string | yes | The `value` of variable | + +### Example of request + +``` +curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/NEW_VARIABLE" -F "value=updated value" +``` + +### Example of response ```json { @@ -99,8 +135,16 @@ Remove variable. DELETE /projects/:id/variables/:key ``` -Parameters: +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|-------------------------| +| id | integer | yes | The ID of a project | +| key | string | yes | The `key` of variable | -- `id` (required) - The ID of a project -- `key` (required) - The `key` for variable +### Example of request + +``` +curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/VARIABLE_1" +``` -- cgit v1.2.1 From 4cdbb2f628620be90de872cf7f5cd591e17c1bd0 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 21:19:18 +0100 Subject: Modify builds API documentation style [ci skip] --- doc/api/builds.md | 82 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 16 deletions(-) (limited to 'doc/api') diff --git a/doc/api/builds.md b/doc/api/builds.md index 06ff89bea00..ecb50754c88 100644 --- a/doc/api/builds.md +++ b/doc/api/builds.md @@ -8,10 +8,20 @@ Get a list of builds in a project. GET /projects/:id/builds ``` -Parameters: +### Parameters -- `id` (required) - The ID of a project -- `scope` (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds) +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | +| scope | string|array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided | + +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds" +``` + +### Example of response ```json [ @@ -102,11 +112,21 @@ Get a list of builds for specific commit in a project. GET /projects/:id/repository/commits/:sha/builds ``` -Parameters: +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | +| sha | string | yes | The SHA id of a commit | +| scope | string|array of strings | no | The scope of builds to show, one or array of: `pending`, `running`, `failed`, `success`, `canceled`; showing all builds if none provided | -- `id` (required) - The ID of a project -- `sha` (required) - The SHA id of a commit -- `scope` (optional) - The scope of builds to show (one or array of: pending, running, failed, success, canceled; if none provided showing all builds) +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/repository/commits/0ff3ae198f8601a285adcf5c0fff204ee6fba5fd/builds" +``` + +### Example of response ```json [ @@ -183,10 +203,20 @@ Get a single build of a project GET /projects/:id/builds/:build_id ``` -Parameters: +### Parameters -- `id` (required) - The ID of a project -- `build_id` (required) - The ID of a build +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | +| build\_id | integer | yes | The ID of a build | + +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/8" +``` + +### Example of response ```json { @@ -237,10 +267,20 @@ Cancel a single build of a project POST /projects/:id/builds/:build_id/cancel ``` -Parameters: +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | +| build\_id | integer | yes | The ID of a build | + +### Example of request + +``` +curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/cancel" +``` -- `id` (required) - The ID of a project -- `build_id` (required) - The ID of a build +### Example of response ```json { @@ -277,10 +317,20 @@ Retry a single build of a project POST /projects/:id/builds/:build_id/retry ``` -Parameters: +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | +| build\_id | integer | yes | The ID of a build | + +### Example of request + +``` +curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/1/retry" +``` -- `id` (required) - The ID of a project -- `build_id` (required) - The ID of a build +### Example of response ```json { -- cgit v1.2.1 From f11ba743a58ce769cdf6ea7427392836355c067d Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 22:44:11 +0100 Subject: Add some cosmetic changes to variables API documentation [ci skip] --- doc/api/build_variables.md | 66 ++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 44 deletions(-) (limited to 'doc/api') diff --git a/doc/api/build_variables.md b/doc/api/build_variables.md index 5da5fb8f4a6..b96f1bdac8a 100644 --- a/doc/api/build_variables.md +++ b/doc/api/build_variables.md @@ -2,26 +2,20 @@ ## List project variables -Get list of variables of a project. +Get list of a project's build variables. ``` GET /projects/:id/variables ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|---------------------| -| id | integer | yes | The ID of a project | - -### Example of request +| `id` | integer | yes | The ID of a project | ``` curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" ``` -### Example of response - ```json [ { @@ -37,27 +31,21 @@ curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3 ## Show variable details -Get details of specifica variable of a project. +Get the details of a project's specific build variable. ``` GET /projects/:id/variables/:key ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|-----------------------| -| id | integer | yes | The ID of a project | -| key | string | yes | The `key` of variable | - -### Example of request +| `id` | integer | yes | The ID of a project | +| `key` | string | yes | The `key` of a variable | ``` curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/TEST_VARIABLE_1" ``` -### Example of response - ```json { "key": "TEST_VARIABLE_1", @@ -67,28 +55,22 @@ curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3 ## Create variable -Create new variable in project. +Create a new build variable. ``` POST /projects/:id/variables ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|-----------------------| -| id | integer | yes | The ID of a project | -| key | string | yes | The `key` of variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9`, and `_` are allowed | -| value | string | yes | The `value` of variable | - -### Example of request +| `id` | integer | yes | The ID of a project | +| `key` | string | yes | The `key` of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9`, and `_` are allowed | +| `value` | string | yes | The `value` of a variable | ``` curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables" -F "key=NEW_VARIABLE" -F "value=new value" ``` -### Example of response - ```json { "key": "NEW_VARIABLE", @@ -98,28 +80,22 @@ curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.co ## Update variable -Update variable. +Update a project's build variable. ``` PUT /projects/:id/variables/:key ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|-------------------------| -| id | integer | yes | The ID of a project | -| key | string | yes | The `key` of variable | -| value | string | yes | The `value` of variable | - -### Example of request +| `id` | integer | yes | The ID of a project | +| `key` | string | yes | The `key` of a variable | +| `value` | string | yes | The `value` of a variable | ``` curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/NEW_VARIABLE" -F "value=updated value" ``` -### Example of response - ```json { "key": "NEW_VARIABLE", @@ -129,22 +105,24 @@ curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com ## Remove variable -Remove variable. +Remove a project's build variable. ``` DELETE /projects/:id/variables/:key ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|-------------------------| -| id | integer | yes | The ID of a project | -| key | string | yes | The `key` of variable | - -### Example of request +| `id` | integer | yes | The ID of a project | +| `key` | string | yes | The `key` of a variable | ``` curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/variables/VARIABLE_1" ``` +```json +{ + "key": "VARIABLE_1", + "value": "VALUE_1" +} +``` -- cgit v1.2.1 From 633ac13404a38bfa3901f515179dc795cded2fa9 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Wed, 13 Jan 2016 20:46:34 +0100 Subject: Modify triggers API documentation style [ci skip] --- doc/api/README.md | 2 +- doc/api/build_triggers.md | 128 ++++++++++++++++++++++++++++++++++++++++++++++ doc/api/triggers.md | 90 -------------------------------- 3 files changed, 129 insertions(+), 91 deletions(-) create mode 100644 doc/api/build_triggers.md delete mode 100644 doc/api/triggers.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 1838bcc0bb9..4dc5c931f52 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -23,7 +23,7 @@ - [Namespaces](namespaces.md) - [Settings](settings.md) - [Keys](keys.md) -- [Triggers](triggers.md) +- [Build triggers](build_triggers.md) ## Clients diff --git a/doc/api/build_triggers.md b/doc/api/build_triggers.md new file mode 100644 index 00000000000..14f7e3534bd --- /dev/null +++ b/doc/api/build_triggers.md @@ -0,0 +1,128 @@ +# Build triggers + +## List project triggers + +Get a list of project triggers + +``` +GET /projects/:id/triggers +``` + +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| id | integer | yes | The ID of a project | + +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers" +``` + +### Example of response + +```json +[ + { + "created_at": "2015-12-23T16:24:34.716Z", + "deleted_at": null, + "last_used": "2016-01-04T15:41:21.986Z", + "token": "fbdb730c2fbdb095a0862dbd8ab88b", + "updated_at": "2015-12-23T16:24:34.716Z" + }, + { + "created_at": "2015-12-23T16:25:56.760Z", + "deleted_at": null, + "last_used": null, + "token": "7b9148c158980bbd9bcea92c17522d", + "updated_at": "2015-12-23T16:25:56.760Z" + } +] +``` + +## Get trigger details + +Get details of trigger of a project + +``` +GET /projects/:id/triggers/:token +``` + +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|--------------------------| +| id | integer | yes | The ID of a project | +| token | string | yes | The `token` of a project | + +### Example of request + +``` +curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" +``` + +### Example of response + +```json +{ + "created_at": "2015-12-23T16:25:56.760Z", + "deleted_at": null, + "last_used": null, + "token": "7b9148c158980bbd9bcea92c17522d", + "updated_at": "2015-12-23T16:25:56.760Z" +} +``` + +## Create a project trigger + +Create a trigger for a project + +``` +POST /projects/:id/triggers +``` + +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|--------------------------| +| id | integer | yes | The ID of a project | + +### Example of request + +``` +curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers" +``` + +### Example of response + +```json +{ + "created_at": "2016-01-07T09:53:58.235Z", + "deleted_at": null, + "last_used": null, + "token": "6d056f63e50fe6f8c5f8f4aa10edb7", + "updated_at": "2016-01-07T09:53:58.235Z" +} +``` + +## Remove a project trigger + +Remove a trigger of a project + +``` +DELETE /projects/:id/triggers/:token +``` + +### Parameters + +| Attribute | Type | required | Description | +|-----------|---------|----------|--------------------------| +| id | integer | yes | The ID of a project | +| token | string | yes | The `token` of a project | + +### Example of request + +``` +curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" +``` diff --git a/doc/api/triggers.md b/doc/api/triggers.md deleted file mode 100644 index 4150d7b4c10..00000000000 --- a/doc/api/triggers.md +++ /dev/null @@ -1,90 +0,0 @@ -# Triggers - -## List project triggers - -Get a list of project triggers - -``` -GET /projects/:id/triggers -``` - -Parameters: - -- `id` (required) - The ID of a project - -```json -[ - { - "created_at": "2015-12-23T16:24:34.716Z", - "deleted_at": null, - "last_used": "2016-01-04T15:41:21.986Z", - "token": "fbdb730c2fbdb095a0862dbd8ab88b", - "updated_at": "2015-12-23T16:24:34.716Z" - }, - { - "created_at": "2015-12-23T16:25:56.760Z", - "deleted_at": null, - "last_used": null, - "token": "7b9148c158980bbd9bcea92c17522d", - "updated_at": "2015-12-23T16:25:56.760Z" - } -] -``` - -## Get trigger details - -Get details of trigger of a project - -``` -GET /projects/:id/triggers/:token -``` - -Parameters: - -- `id` (required) - The ID of a project -- `token` (required) - The `token` of a trigger - -```json -{ - "created_at": "2015-12-23T16:25:56.760Z", - "deleted_at": null, - "last_used": null, - "token": "7b9148c158980bbd9bcea92c17522d", - "updated_at": "2015-12-23T16:25:56.760Z" -} -``` - -## Create a project trigger - -Create a trigger for a project - -``` -POST /projects/:id/triggers -``` - -Parameters: - -- `id` (required) - The ID of a project - -```json -{ - "created_at": "2016-01-07T09:53:58.235Z", - "deleted_at": null, - "last_used": null, - "token": "6d056f63e50fe6f8c5f8f4aa10edb7", - "updated_at": "2016-01-07T09:53:58.235Z" -} -``` - -## Remove a project trigger - -Remove a trigger of a project - -``` -DELETE /projects/:id/triggers/:token -``` - -Parameters: - -- `id` (required) - The ID of a project -- `token` (required) - The `token` of a trigger -- cgit v1.2.1 From c5b429f099d8b6b71225a96f111d65c97f15d2a8 Mon Sep 17 00:00:00 2001 From: Tomasz Maczukin Date: Thu, 14 Jan 2016 11:08:33 +0100 Subject: Add mofications to triggers API documentation [ci skip] --- doc/api/build_triggers.md | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) (limited to 'doc/api') diff --git a/doc/api/build_triggers.md b/doc/api/build_triggers.md index 14f7e3534bd..4a12e962b62 100644 --- a/doc/api/build_triggers.md +++ b/doc/api/build_triggers.md @@ -1,27 +1,23 @@ # Build triggers +You can read more about [triggering builds through the API](../ci/triggers/README.md). + ## List project triggers -Get a list of project triggers +Get a list of project's build triggers. ``` GET /projects/:id/triggers ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|---------------------| -| id | integer | yes | The ID of a project | - -### Example of request +| `id` | integer | yes | The ID of a project | ``` curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers" ``` -### Example of response - ```json [ { @@ -43,27 +39,21 @@ curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3 ## Get trigger details -Get details of trigger of a project +Get details of project's build trigger. ``` GET /projects/:id/triggers/:token ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|--------------------------| -| id | integer | yes | The ID of a project | -| token | string | yes | The `token` of a project | - -### Example of request +| `id` | integer | yes | The ID of a project | +| `token` | string | yes | The `token` of a trigger | ``` curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" ``` -### Example of response - ```json { "created_at": "2015-12-23T16:25:56.760Z", @@ -76,26 +66,20 @@ curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3 ## Create a project trigger -Create a trigger for a project +Create a build trigger for a project. ``` POST /projects/:id/triggers ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|--------------------------| -| id | integer | yes | The ID of a project | - -### Example of request +| `id` | integer | yes | The ID of a project | ``` curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers" ``` -### Example of response - ```json { "created_at": "2016-01-07T09:53:58.235Z", @@ -108,20 +92,16 @@ curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.co ## Remove a project trigger -Remove a trigger of a project +Remove a project's build trigger. ``` DELETE /projects/:id/triggers/:token ``` -### Parameters - | Attribute | Type | required | Description | |-----------|---------|----------|--------------------------| -| id | integer | yes | The ID of a project | -| token | string | yes | The `token` of a project | - -### Example of request +| `id` | integer | yes | The ID of a project | +| `token` | string | yes | The `token` of a project | ``` curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d" -- cgit v1.2.1 From 8026d420c9a0ffa3f6393c38487d12b3315efa73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 14 Jan 2016 17:14:20 +0100 Subject: Document new API pagination headers --- doc/api/README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index c3401bcbc9d..953138cb374 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -149,7 +149,30 @@ 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 -[Link headers](http://www.w3.org/wiki/LinkHeader) are send back with each response. These have `rel` prev/next/first/last and contain the relevant URL. Please use these instead of generating your own URLs. +### `Link` header + +[Link headers](http://www.w3.org/wiki/LinkHeader) are sent back with each response. These have `rel` prev/next/first/last and contain the relevant URL. Please use these instead of generating your own URLs. + +Example of `Link` header (line breaks added for clarity): +``` +$ curl -I -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ +https://gitlab.example.com/api/v3/projects/gitlab-org/gitlab-ce/issues/1/notes?per_page=1&page=2 + +Link: ; rel="prev", +; rel="next", +; rel="first", +; rel="last" +``` + +### Other pagination headers + +Additional pagination headers are also sent back: +- `X-Total`: number of items returned in this page +- `X-Total-Pages`: total number of pages of items +- `X-Per-Page`: number of items per page +- `X-Page`: index of the current page (starting at 1) +- `X-Next-Page`: index of the next page +- `X-Prev-Page`: index of the previous page ## id vs iid -- cgit v1.2.1 From 4a76f9217a7aba54ac5e57f12d9d8b448f225557 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 18 Jan 2016 10:55:25 +0100 Subject: Clean up pagination documentation [ci skip] - Fix heading names - Fix curl example - Use full request output - Use table for the extra headers --- doc/api/README.md | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index 953138cb374..64169885cd4 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -149,30 +149,53 @@ 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 -### `Link` header +### Pagination Link header -[Link headers](http://www.w3.org/wiki/LinkHeader) are sent back with each response. These have `rel` prev/next/first/last and contain the relevant URL. Please use these instead of generating your own URLs. +[Link headers](http://www.w3.org/wiki/LinkHeader) are sent back with each +response. They have `rel` set to prev/next/first/last and contain the relevant +URL. Please use these links instead of generating your own URLs. -Example of `Link` header (line breaks added for clarity): +In the cURL example below, we limit the output to 3 items per page (`per_page=3`) +and we request the second page (`page=2`) of [comments](notes.md) of the issue +with ID `8` which belongs to the project with ID `8`: + +```bash +curl -I -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/8/issues/8/notes?per_page=3&page=2 ``` -$ curl -I -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ -https://gitlab.example.com/api/v3/projects/gitlab-org/gitlab-ce/issues/1/notes?per_page=1&page=2 -Link: ; rel="prev", -; rel="next", -; rel="first", -; rel="last" +The response will then be: + +``` +HTTP/1.1 200 OK +Cache-Control: no-cache +Content-Length: 1103 +Content-Type: application/json +Date: Mon, 18 Jan 2016 09:43:18 GMT +Link: ; rel="prev", ; rel="next", ; rel="first", ; rel="last" +Status: 200 OK +Vary: Origin +X-Next-Page: 3 +X-Page: 2 +X-Per-Page: 3 +X-Prev-Page: 1 +X-Request-Id: 732ad4ee-9870-4866-a199-a9db0cde3c86 +X-Runtime: 0.108688 +X-Total: 8 +X-Total-Pages: 3 ``` ### Other pagination headers -Additional pagination headers are also sent back: -- `X-Total`: number of items returned in this page -- `X-Total-Pages`: total number of pages of items -- `X-Per-Page`: number of items per page -- `X-Page`: index of the current page (starting at 1) -- `X-Next-Page`: index of the next page -- `X-Prev-Page`: index of the previous page +Additional pagination headers are also sent back. + +| Header | Description | +| ------ | ----------- | +| `X-Total` | The total number of items | +| `X-Total-Pages` | The total number of pages | +| `X-Per-Page` | The number of items per page | +| `X-Page` | The index of the current page (starting at 1) | +| `X-Next-Page` | The index of the next page | +| `X-Prev-Page` | The index of the previous page | ## id vs iid -- cgit v1.2.1 From 10669097fa7621a175755d144c61ecb80a5ea9fb Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Wed, 13 Jan 2016 09:07:21 -0500 Subject: Add public params to GET /projects api. Closes #3788 --- doc/api/projects.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/api') diff --git a/doc/api/projects.md b/doc/api/projects.md index 241229221db..29ed327d983 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -29,6 +29,7 @@ GET /projects Parameters: - `archived` (optional) - if passed, limit by archived status +- `public` (optional) - if passed, limit by public visibility - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria -- cgit v1.2.1 From 6951396dbeddc72821c3beddf5aa13d24eeb0712 Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Wed, 13 Jan 2016 09:53:41 -0500 Subject: Update all docs for public param --- doc/api/groups.md | 1 + doc/api/projects.md | 3 +++ 2 files changed, 4 insertions(+) (limited to 'doc/api') diff --git a/doc/api/groups.md b/doc/api/groups.md index 808675d8605..c6f1975bdac 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -33,6 +33,7 @@ GET /groups/:id/projects Parameters: - `archived` (optional) - if passed, limit by archived status +- `public` (optional) - if passed, limit by public visibility - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria diff --git a/doc/api/projects.md b/doc/api/projects.md index 29ed327d983..8b9dec46f38 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -153,6 +153,7 @@ GET /projects/owned Parameters: - `archived` (optional) - if passed, limit by archived status +- `public` (optional) - if passed, limit by public visibility - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria @@ -168,6 +169,7 @@ GET /projects/starred Parameters: - `archived` (optional) - if passed, limit by archived status +- `public` (optional) - if passed, limit by public visibility - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria @@ -183,6 +185,7 @@ GET /projects/all Parameters: - `archived` (optional) - if passed, limit by archived status +- `public` (optional) - if passed, limit by public visibility - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria -- cgit v1.2.1 From 11797df1af483156b8cf11290c49c3f4d6089d99 Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Mon, 18 Jan 2016 12:41:49 -0500 Subject: Change 'public' flag to more robust 'visibility' query. --- doc/api/groups.md | 2 +- doc/api/projects.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'doc/api') diff --git a/doc/api/groups.md b/doc/api/groups.md index c6f1975bdac..d47e79ba47f 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -33,7 +33,7 @@ GET /groups/:id/projects Parameters: - `archived` (optional) - if passed, limit by archived status -- `public` (optional) - if passed, limit by public visibility +- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria diff --git a/doc/api/projects.md b/doc/api/projects.md index 8b9dec46f38..3f372c955d2 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -29,7 +29,7 @@ GET /projects Parameters: - `archived` (optional) - if passed, limit by archived status -- `public` (optional) - if passed, limit by public visibility +- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria @@ -153,7 +153,7 @@ GET /projects/owned Parameters: - `archived` (optional) - if passed, limit by archived status -- `public` (optional) - if passed, limit by public visibility +- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria @@ -169,7 +169,7 @@ GET /projects/starred Parameters: - `archived` (optional) - if passed, limit by archived status -- `public` (optional) - if passed, limit by public visibility +- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria @@ -185,7 +185,7 @@ GET /projects/all Parameters: - `archived` (optional) - if passed, limit by archived status -- `public` (optional) - if passed, limit by public visibility +- `visibility` (optional) - if passed, limit by visibility `public`, `internal`, `private` - `order_by` (optional) - Return requests ordered by `id`, `name`, `path`, `created_at`, `updated_at` or `last_activity_at` fields. Default is `created_at` - `sort` (optional) - Return requests sorted in `asc` or `desc` order. Default is `desc` - `search` (optional) - Return list of authorized projects according to a search criteria -- cgit v1.2.1