Commit Graph

95 Commits

Author SHA1 Message Date
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
Robert Schilling 2273b5d6d6 Sort API mounts 2016-10-13 12:52:51 +02:00
Robert Speicher 58e2b44afe Merge branch 'api-version' into 'master'
API: Version information

## What does this MR do?

Adds a new endpoint to retrieve the version information.

## Why was this MR needed?

Clients can now use this information to enable/disable certain API features depending on the version.  

## What are the relevant issue numbers?

Closes #22608, https://gitlab.com/gitlab-org/gitlab-ce/issues/23148

See merge request !6822
2016-10-12 18:38:02 +00:00
Robert Schilling b998479c81 API: Version information 2016-10-12 16:47:35 +02:00
Thomas Balthazar b9b13ea801 Create a new /templates API namespace
The /licenses, /gitignores and /gitlab_ci_ymls endpoints are now also
available under a new /templates namespace. Old endpoints will be
deprecated when GitLab 9.0.0 is released.
2016-10-12 11:09:41 +02:00
Dmitriy Zaporozhets 137ebcfb3c Replace undefined Grape routing code from 400 to 404
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-10 16:32:32 +03:00
Dmitriy Zaporozhets d6cfc0042e Catch any undefined API routing and return 400 Bad Request
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-10 16:32:32 +03:00
Andre Guedes 41d70ea300 Added Issue Board API support
- Includes documentation and tests
2016-10-05 13:12:07 -03:00
Achilleas Pipinellis 7150774530 Keep API mounts in alphabetical order 2016-09-25 11:28:23 +03:00
Marc Siegfriedt 48333b9da3 Add notification_settings API calls
Use NotificationSetting::EMAIL_EVENTS for params
2016-09-09 17:08:06 +00:00
Katarzyna Kobierska ca1f5ede84 Move lint to api from ci/api 2016-09-07 12:10:49 +02:00
Robert Speicher 6a58af3a4a Add BroadcastMessage API implementation 2016-08-31 17:03:18 -03:00
Douwe Maan bbd9a6fe40 Merge branch 'dz-merge-request-version' 2016-08-25 12:59:21 -05:00
Stan Hu 170885edd6 Add Sentry logging to API calls
Closes #21043
2016-08-24 12:09:51 -07:00
Dmitriy Zaporozhets 6db65143db
Merge branch 'master' into dz-merge-request-version
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-19 13:01:58 +03:00
Z.J. van de Weg 47d6f286eb Add deployment endpoints 2016-08-18 21:10:52 +02:00
Z.J. van de Weg de7b8e51b8 Add endpoints for pipelines 2016-08-18 16:56:39 +02:00
Dmitriy Zaporozhets 5e95c0b8d2
Merge branch 'master' into dz-merge-request-version
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-08-15 17:27:22 +03:00
Rémy Coutable 29850364ec New AccessRequests API endpoints for Group & Project
Also, mutualize AccessRequests and Members endpoints for Group &
Project.
New API documentation for the AccessRequests endpoints.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-10 19:07:05 +02:00
Connor Shea c53b599e61
Retain old behavior 2016-08-09 09:42:49 -06:00