Commit Graph

114 Commits

Author SHA1 Message Date
Bob Van Landuyt 3598e60bf2 Add a Circuitbreaker for storage paths 2017-08-04 15:38:48 +02:00
Sean McGivern 1018ab0516 Merge branch 'dm-api-current-user' into 'master'
Do not validate CSRF token in API unless needed

Closes #35705

See merge request !13256
2017-08-03 10:47:03 +00:00
Douwe Maan 14644d40e0 Do not validate CSRF token in API unless needed 2017-08-02 18:20:31 +02:00
Eric fb5b2d8d0e Extending API for protected branches 2017-08-02 10:16:17 +00:00
Kamil Trzciński 8ffd40cee7 Merge branch '34519-extend-api-group-secret-variable' into 'master'
Extend API: Group Secret Variable

Closes #34519

See merge request !12936
2017-08-01 09:29:50 +00:00
Rémy Coutable 4e3e0dc8d4
DRY the branches API requirements definition
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:29:42 +02:00
Sean McGivern 1162257080 Merge branch 'issue_34622' into 'master'
Group milestones API endpoint

Closes #34622

See merge request !12819
2017-07-25 12:52:47 +00:00
Oswaldo Ferreira 33dc5171e5 Resolve "More RESTful API: include resource URLs in responses" 2017-07-25 09:35:45 +00:00
Felipe Artur c5c9dce270 Add group milestones API endpoint 2017-07-21 11:00:00 -03:00
Shinya Maeda b539951768 Ini 2017-07-19 20:50:05 +09:00
Timothy Andrew 6f1922500b Initial attempt at refactoring API scope declarations.
- Declaring an endpoint's scopes in a `before` block has proved to be
  unreliable. For example, if we're accessing the `API::Users` endpoint - code
  in a `before` block in `API::API` wouldn't be able to see the scopes set in
  `API::Users` since the `API::API` `before` block runs first.

- This commit moves these declarations to the class level, since they don't need
  to change once set.
2017-06-28 07:17:13 +00:00
DJ Mountney e1d1a5240c Merge branch 'dz-api-x-frame' into 'security-9-2'
Restrict API X-Frame-Options to same origin

See merge request !2103
2017-06-08 09:54:24 -07:00
Mark Fletcher ad3e180ed3 Introduce an Events API
* Meld the following disparate endpoints:
 * `/projects/:id/events`
 * `/events`
 * `/users/:id/events`
+ Add result filtering to the above endpoints:
 * action
 * target_type
 * before and after dates
2017-06-06 20:16:41 +08:00
Alejandro Rodríguez 671284ba37 Add feature toggles through Flipper 2017-05-31 21:06:01 +00:00
Shinya Maeda fbd3b3d8a2 Add API support for pipeline schedule 2017-05-30 23:55:08 +09:00
Ruben Davila 5c921809cd Bugfix: Always use the default language when generating emails.
There was a race condition issue when the application was generating an
email and was using a language that was previously being used in other
request.
2017-05-25 10:22:45 -05:00
Valery Sizov 5004579b15 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into mia_backort[ci skip] 2017-05-05 16:59:31 +03:00
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Ruben Davila dbd1bdaeed More updates for translations plus some refactoring. 2017-05-03 21:08:43 -05:00
Timothy Andrew dd99622347
API routes referencing a specific issue should use the issue `iid`
- As opposed to the issue `id` that was previously being used.
- This brings the API routes closer to the web interface's routes.
- This is specific to API v4.
2017-03-07 13:06:42 +05:30
Kamil Trzciński b63c41e12e Merge branch 'zj-builds-to-jobs-api' into 'master'
Rename builds to jobs in the API

Closes #28515

See merge request !9463
2017-03-06 16:36:16 +00:00
Pawel Chojnacki 9cc0ff8f46 Cleanup common code in Unique Ips tests 2017-03-06 15:41:25 +01:00
Pawel Chojnacki 8993801f0c Test various login scenarios if the limit gets enforced 2017-03-06 15:41:25 +01:00
Z.J. van de Weg 111748ea89 Rename Builds to Jobs in the API
Fixes gitlab-org/gitlab-ce#28515

[ci skip]
2017-03-06 14:34:07 +01:00
Toon Claes 59e7d04bc7 Expose pipelines as PipelineBasic `projects/:id/pipelines`
The `projects/:id/pipelines` exposed a lot of extra details
that are superfluous and it was taking extra resources to fetch them.

To get more details about a pipeline, use
`projects/:id/pipelines/:pipeline_id`.
2017-03-03 09:52:04 +01:00
Sean McGivern b18646040c Merge branch '27532_api_changes' into 'master'
Use iids as filter parameter

Closes #27532

See merge request !9096
2017-03-03 06:32:58 +00:00
Jarka Kadlecova 17ee1e1a63 Use iids as filter parameter 2017-03-02 13:17:39 +01:00
Toon Claes 260cc57838 Expose ApplicationSetting visibility settings as String
Use strings for the ApplicationSetting properties:
 - restricted_visibility_levels
 - default_project_visibility
 - default_snippet_visibility
 - default_group_visibility
2017-03-02 12:15:25 +01:00
Toon Claes 209856166e Expose Snippet VisibilityLevel as String 2017-03-02 12:15:24 +01:00
Robert Schilling c280acb00b Backport API to V3 2017-02-28 08:32:39 +01:00
Kamil Trzciński 3e8d63293e Merge branch 'feature/runners-v4-api' into 'master'
Add Runner registration/deletion API

See merge request !9246
2017-02-27 11:46:55 +00:00
Robert Schilling 2ac84e36f9 Backport groups API to V3 2017-02-24 10:31:44 +01:00
Robert Schilling 0b402e11e3 Remove deprecated `upvotes` and `downvotes` from the notes API 2017-02-22 13:07:49 +01:00
Rémy Coutable 87411889b9 Merge branch '22132-rename-branch-name-params-to-branch' into 'master'
Standardize branch name params as `branch` on V4 API

Closes #22132

See merge request !8936
2017-02-22 11:47:13 +00:00
Oswaldo Ferreira c79bbe26ab Change branch_name param to branch throughout V4 API 2017-02-21 16:33:14 -03:00
Robert Schilling 55f2425a67 API: Make subscription API more RESTfuL 2017-02-21 17:44:44 +01:00
Robert Schilling 32691ffd4a Backport Todos API to V3 2017-02-21 12:01:18 +01:00
Robert Schilling ce54a801fe Backport API to v3 2017-02-17 09:05:24 +01:00
Tomasz Maczukin e25f26e550
Rename API::Ci to API::Runner 2017-02-16 01:30:46 +01:00
Tomasz Maczukin 618ce94164
Add Runner registration/deletion API 2017-02-16 01:16:41 +01:00
Oswaldo Ferreira 8adc356902 Remove deprecated templates endpoints in V4 2017-02-13 13:59:17 -02:00
Jarka Kadlecova 88d610c60e Add member: Always return 409 when a member exists 2017-02-10 15:53:01 +01:00
Robert Schilling 67f5522d2e Remove /projects/:id/keys/.. endpoints 2017-02-07 14:14:15 +01:00
Robert Schilling 5985b55769 Remove deprecated 'expires_at' from project snippets API 2017-02-07 12:16:00 +01:00
Oswaldo Ferreira c2d64d6702 Remove deprecated MR and Issue endpoints and preserve V3 namespace 2017-02-06 10:12:20 -02:00
Oswaldo Ferreira cadef80275 Remain V3 endpoint unchanged 2017-01-30 17:00:21 -02:00
Rémy Coutable c28b0a539d Don't instrument 405 Grape calls
Fixes #26051.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-09 10:02:52 +01:00
Timothy Andrew 7fa06ed55d Calls to the API are checked for scope.
- Move the `Oauth2::AccessTokenValidationService` class to
  `AccessTokenValidationService`, since it is now being used for
  personal access token validation as well.

- Each API endpoint declares the scopes it accepts (if any). Currently,
  the top level API module declares the `api` scope, and the `Users` API
  module declares the `read_user` scope (for GET requests).

- Move the `find_user_by_private_token` from the API `Helpers` module to
  the `APIGuard` module, to avoid littering `Helpers` with more
  auth-related methods to support `find_user_by_private_token`
2016-12-16 16:29:31 +05:30
Guyzmo fde754e267 API: Endpoint to expose personal snippets as /snippets
Adding the necessary API for the new /snippets Restful resource
added with this commit. Added a new Grape class `Snippets`, as
well as a `PersonalSnippet` entity.

Issue: #20042
Merge-Request: !6373
Signed-off-by: Guyzmo <guyzmo+gitlab+pub@m0g.net>
2016-12-01 19:07:49 +01:00
Rémy Coutable 626d5e555a Merge branch 'api-order-mounts' into 'master'
Sort API mounts

## What does this MR do?

Sort the API mounts.

## Why was this MR needed?

The API mounts are unsorted.

See merge request !6831
2016-10-13 16:03:22 +00:00