From b28714b6a9bf71fac64a0423091fb7eab244fd7f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 6 Jul 2015 15:53:08 +0200 Subject: Add docs and empty specs for applicaiton settings API Signed-off-by: Dmitriy Zaporozhets --- doc/api/README.md | 1 + doc/api/settings.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 doc/api/settings.md (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index ca58c184543..b474e0ea389 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -20,6 +20,7 @@ - [System Hooks](system_hooks.md) - [Groups](groups.md) - [Namespaces](namespaces.md) +- [Settings](settings.md) ## Clients diff --git a/doc/api/settings.md b/doc/api/settings.md new file mode 100644 index 00000000000..d1b93a09c02 --- /dev/null +++ b/doc/api/settings.md @@ -0,0 +1,88 @@ +# Application settings + +This API allows you to read and modify GitLab instance application settings. + + +## Get current application settings: + +``` +GET /application/settings +``` + +```json +{ + "id": 1, + "default_projects_limit": 10, + "signup_enabled": true, + "signin_enabled": true, + "gravatar_enabled": true, + "sign_in_text": "", + "created_at": "2015-06-12T15:51:55.432Z", + "updated_at": "2015-06-30T13:22:42.210Z", + "home_page_url": "", + "default_branch_protection": 2, + "twitter_sharing_enabled": true, + "restricted_visibility_levels": [], + "max_attachment_size": 10, + "session_expire_delay": 10080, + "default_project_visibility": 0, + "default_snippet_visibility": 0, + "restricted_signup_domains": [], + "user_oauth_applications": true, + "after_sign_out_path": "" +} +``` + +## Change application settings: + + + +``` +PUT /application/settings +``` + +Parameters: + +- `default_projects_limit` - project limit per user +- `signup_enabled` - enable registration +- `signin_enabled` - enable login via GitLab account +- `gravatar_enabled` - enable gravatar +- `sign_in_text` - text on login page +- `home_page_url` - redirect to this URL when not logged in +- `default_branch_protection` - determine if developers can push to master +- `twitter_sharing_enabled` - allow users to share project creation in twitter +- `restricted_visibility_levels` - restrict certain visibility levels +- `max_attachment_size` - limit attachment size +- `session_expire_delay` - session lifetime +- `default_project_visibility` - what visibility level new project receives +- `default_snippet_visibility` - what visibility level new snippet receives +- `restricted_signup_domains` - force people to use only corporate emails for signup +- `user_oauth_applications` - allow users to create oauth applicaitons +- `after_sign_out_path` - where redirect user after logout + +All parameters are optional. You can send only one that you want to change. + + +```json +{ + "id": 1, + "default_projects_limit": 10, + "signup_enabled": true, + "signin_enabled": true, + "gravatar_enabled": true, + "sign_in_text": "", + "created_at": "2015-06-12T15:51:55.432Z", + "updated_at": "2015-06-30T13:22:42.210Z", + "home_page_url": "", + "default_branch_protection": 2, + "twitter_sharing_enabled": true, + "restricted_visibility_levels": [], + "max_attachment_size": 10, + "session_expire_delay": 10080, + "default_project_visibility": 0, + "default_snippet_visibility": 0, + "restricted_signup_domains": [], + "user_oauth_applications": true, + "after_sign_out_path": "" +} +``` -- cgit v1.2.1 From b2246ed175975cba21aa3b396fd4b5a8f5567b57 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 8 Jul 2015 22:27:36 +0200 Subject: Make sure webhooks are mentioned at the top level. --- doc/api/README.md | 2 +- doc/api/projects.md | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'doc/api') diff --git a/doc/api/README.md b/doc/api/README.md index b474e0ea389..f369c3fd978 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -4,7 +4,7 @@ - [Users](users.md) - [Session](session.md) -- [Projects](projects.md) +- [Projects](projects.md) including setting Webhooks - [Project Snippets](project_snippets.md) - [Services](services.md) - [Repositories](repositories.md) diff --git a/doc/api/projects.md b/doc/api/projects.md index 17c014019ea..10533c73a31 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -4,16 +4,16 @@ ### Project visibility level Project in GitLab has be either private, internal or public. -You can determine it by `visibility_level` field in project. +You can determine it by `visibility_level` field in project. Constants for project visibility levels are next: -* Private. `visibility_level` is `0`. +* Private. `visibility_level` is `0`. Project access must be granted explicitly for each user. * Internal. `visibility_level` is `10`. The project can be cloned by any logged in user. - + * Public. `visibility_level` is `20`. The project can be cloned without any authentication. @@ -362,7 +362,7 @@ Parameters: - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) -On success, method returns 200 with the updated project. If parameters are +On success, method returns 200 with the updated project. If parameters are invalid, 400 is returned. ### Fork project @@ -479,6 +479,9 @@ rely on the returned JSON structure. ## Hooks +Also called Project Hooks and Webhooks. +These are different for [System Hooks](system_hooks.md) that are system wide. + ### List project hooks Get a list of project hooks. -- cgit v1.2.1 From dd4fee5fdbda07fbc09234c4b043c3c9939a6a9b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Mar 2015 12:55:02 -0400 Subject: api: add 'system', 'upvote', and 'downvote' fields to note queries --- doc/api/notes.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/notes.md b/doc/api/notes.md index ee2f9fa0eac..c683cb883d4 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -31,7 +31,10 @@ Parameters: "state": "active", "created_at": "2013-09-30T13:46:01Z" }, - "created_at": "2013-10-02T09:22:45Z" + "created_at": "2013-10-02T09:22:45Z", + "system": true, + "upvote": false, + "downvote": false }, { "id": 305, @@ -45,7 +48,10 @@ Parameters: "state": "active", "created_at": "2013-09-30T13:46:01Z" }, - "created_at": "2013-10-02T09:56:03Z" + "created_at": "2013-10-02T09:56:03Z", + "system": false, + "upvote": false, + "downvote": false } ] ``` -- cgit v1.2.1 From 4c586dc7c217b3e43956919fa752a8fa4e16acb9 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 9 Jul 2015 12:35:53 -0700 Subject: Revert "api: add 'system', 'upvote', and 'downvote' fields to note queries" This reverts commit dd4fee5fdbda07fbc09234c4b043c3c9939a6a9b. --- doc/api/notes.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'doc/api') diff --git a/doc/api/notes.md b/doc/api/notes.md index c683cb883d4..ee2f9fa0eac 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -31,10 +31,7 @@ Parameters: "state": "active", "created_at": "2013-09-30T13:46:01Z" }, - "created_at": "2013-10-02T09:22:45Z", - "system": true, - "upvote": false, - "downvote": false + "created_at": "2013-10-02T09:22:45Z" }, { "id": 305, @@ -48,10 +45,7 @@ Parameters: "state": "active", "created_at": "2013-09-30T13:46:01Z" }, - "created_at": "2013-10-02T09:56:03Z", - "system": false, - "upvote": false, - "downvote": false + "created_at": "2013-10-02T09:56:03Z" } ] ``` -- cgit v1.2.1 From 414cacd7f47c8c89a6a270928bbf9c8d8dcbd3ab Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 9 Jul 2015 13:21:37 -0400 Subject: api: expose work_in_progress flag --- doc/api/merge_requests.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 7b0873a9111..24c0b461308 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -49,7 +49,8 @@ Parameters: "state": "active", "created_at": "2012-04-29T08:46:00Z" }, - "description":"fixed login page css paddings" + "description":"fixed login page css paddings", + "work_in_progress": false } ] ``` @@ -94,7 +95,8 @@ Parameters: "state": "active", "created_at": "2012-04-29T08:46:00Z" }, - "description":"fixed login page css paddings" + "description":"fixed login page css paddings", + "work_in_progress": false } ``` @@ -118,6 +120,7 @@ Parameters: "project_id": 4, "title": "Blanditiis beatae suscipit hic assumenda et molestias nisi asperiores repellat et.", "description": "Qui voluptatibus placeat ipsa alias quasi. Deleniti rem ut sint. Optio velit qui distinctio.", + "work_in_progress": false, "state": "reopened", "created_at": "2015-02-02T19:49:39.159Z", "updated_at": "2015-02-02T20:08:49.959Z", -- cgit v1.2.1 From 903daedb5a963d55f8b2e836127958f92a1562a5 Mon Sep 17 00:00:00 2001 From: karen Carias Date: Fri, 10 Jul 2015 12:54:02 -0700 Subject: added link to issue closing pattern in doc --- doc/api/milestones.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/api') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index a6828728264..cba4a7c484c 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -87,3 +87,5 @@ Parameters: - `id` (required) - The ID of a project - `milestone_id` (required) - The ID of a project milestone + +You can close multiple issues with one Merge Request by following the [issue closing pattern documentation](http://doc.gitlab.com/ce/customization/issue_closing.html). -- cgit v1.2.1 From 31565d78906577bf8582982e5492166e8edd3218 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Mon, 13 Jul 2015 12:36:53 +0200 Subject: Revert "added link to issue closing pattern in doc" This reverts commit 903daedb5a963d55f8b2e836127958f92a1562a5. --- doc/api/milestones.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/milestones.md b/doc/api/milestones.md index cba4a7c484c..a6828728264 100644 --- a/doc/api/milestones.md +++ b/doc/api/milestones.md @@ -87,5 +87,3 @@ Parameters: - `id` (required) - The ID of a project - `milestone_id` (required) - The ID of a project milestone - -You can close multiple issues with one Merge Request by following the [issue closing pattern documentation](http://doc.gitlab.com/ce/customization/issue_closing.html). -- cgit v1.2.1 From 6f581841d5c01b39fcc9f5c013541136d861ebcc Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 13 Jul 2015 18:54:15 +0200 Subject: Remove author information from "post" in merge_requests API. From both experimenting with the API and reading the source code, this appears to not be used at all. My guess is this was copypasta from somewhere else. --- doc/api/merge_requests.md | 8 -------- 1 file changed, 8 deletions(-) (limited to 'doc/api') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 7b0873a9111..7624fd3a3ef 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -336,14 +336,6 @@ Parameters: ```json { - "author": { - "id": 1, - "username": "admin", - "email": "admin@example.com", - "name": "Administrator", - "blocked": false, - "created_at": "2012-04-29T08:46:00Z" - }, "note": "text1" } ``` -- cgit v1.2.1