Commit Graph

21 Commits

Author SHA1 Message Date
Lee Tickett ec66f1b5ca Add name & search parameters to project environments API 2019-06-24 12:18:40 +00:00
Krasimir Angelov 724f19ba0a Add new API endpoint to expose single environment
This is resolving https://gitlab.com/gitlab-org/gitlab-ce/issues/30157.

Implement new API endpoint `/projects/:id/environments/:environment_id`
to expose single environment. Include information for environment's last
deployment if there is one.
2019-04-09 09:16:57 +00:00
Luke Duncalfe 618b87448e Prevent leaking of private repo data through API
default_branch, statistics and config_ci_path are now only exposed if
the user has permissions to the repository.
2019-02-18 11:30:32 +13:00
Rémy Coutable 3a2abc1d50
Enable the Layout/ExtraSpacing cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-01-24 13:05:45 +01:00
Imre Farkas b1e070bf49
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
2018-11-28 12:54:11 +01:00
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Winnie Hellmann d79cef3a9a Support manually stopping any environment from the UI 2018-07-10 08:11:04 +00:00
Robert Schilling 6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Robert Schilling e80313f9ee Conditionally destroy a ressource 2017-08-28 16:40:25 +02:00
Robert Schilling 998afa5f74 API: Respect the 'If-Unmodified-Since' for delete endpoints 2017-08-28 16:40:25 +02:00
Dmitriy Zaporozhets 6b8ad689da
Update grape gem
New version of the gem returns 200 status code on delete with content
instead of 204 so we explicitly set status code to keep existing
behavior

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-07-20 16:33:18 +03:00
Rémy Coutable 63360adeae
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +01:00
Toon Claes 8c569e21d5 Add environment `/stop` action
Add endpoint to stop an environment through the API.
2017-02-28 15:34:38 +01:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Nick Thomas 93a03cd92f Add an environment slug 2016-12-15 13:57:03 +00:00
Semyon Pupkov 77cf855bb9 Define common helper for describe pagination params in api 2016-11-22 09:19:26 +05:00
Robert Schilling 76bd09326f Use declared_params helper in API 2016-11-14 15:22:06 +01:00
Z.J. van de Weg 34c1c8a3b1 Minor fixes in the Env API endpoints 2016-08-01 08:42:09 +02:00
Z.J. van de Weg 1b72256fa1 Use Grape DSL for environment endpoints
Also a couple of minor edits for this branch are included
2016-07-29 20:35:38 +02:00
Z.J. van de Weg 76e9b68439 Incorporate feedback 2016-07-29 13:54:45 +02:00
Z.J. van de Weg 84cd212095 Add API support for environments 2016-07-29 13:54:45 +02:00