Commit Graph

248 Commits

Author SHA1 Message Date
GitLab Bot 1a0d6dbdc2 Add latest changes from gitlab-org/gitlab@master 2020-04-01 12:08:00 +00:00
GitLab Bot 45b4df3e57 Add latest changes from gitlab-org/gitlab@master 2020-03-30 09:07:58 +00:00
GitLab Bot 83731155d9 Add latest changes from gitlab-org/gitlab@master 2020-03-06 18:08:08 +00:00
GitLab Bot 946771d0b0 Add latest changes from gitlab-org/gitlab@master 2020-03-03 15:08:08 +00:00
GitLab Bot 852f4a85dd Add latest changes from gitlab-org/gitlab@master 2020-02-20 03:08:57 +00:00
GitLab Bot 1078b7bf25 Add latest changes from gitlab-org/gitlab@master 2020-02-11 09:08:39 +00:00
GitLab Bot 11e5d1b9ca Add latest changes from gitlab-org/gitlab@master 2020-02-10 15:08:54 +00:00
GitLab Bot 3f9e1b2611 Add latest changes from gitlab-org/gitlab@master 2020-01-23 15:08:46 +00:00
GitLab Bot 74a89b1221 Add latest changes from gitlab-org/gitlab@master 2020-01-13 21:07:39 +00:00
GitLab Bot 8bda404e29 Add latest changes from gitlab-org/gitlab@master 2020-01-09 06:07:57 +00:00
GitLab Bot 511e761b41 Add latest changes from gitlab-org/gitlab@master 2020-01-03 15:08:33 +00:00
GitLab Bot aa10b541b6 Add latest changes from gitlab-org/gitlab@master 2019-12-09 09:08:00 +00:00
GitLab Bot 330eac18ce Add latest changes from gitlab-org/gitlab@master 2019-12-09 03:07:57 +00:00
GitLab Bot d8c06be498 Add latest changes from gitlab-org/gitlab@master 2019-11-14 12:06:30 +00:00
GitLab Bot 7071f9bf3e Add latest changes from gitlab-org/gitlab@master 2019-11-11 15:06:42 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Kamil Trzciński cbb35ea882 Merge branch '61927-skeleton-pages-internal-api' into 'master'
Add skeleton Pages internal API

See merge request gitlab-org/gitlab-ce!32732
2019-09-09 13:27:11 +00:00
Manoj MJ b041321a35 Application Statistics API
This change implements Application
Statistics API
2019-09-09 03:38:42 +00:00
Krasimir Angelov 477ba2b346 Add skeleton Pages internal API
Basic `/internal/pages` endpoint that will be used for Pages virtual
domains internal API. The endpoint is currently behind feature flag and
provides authetication similar to how Workhorse is authenticating with
the GitLab.
2019-09-06 16:06:25 +12:00
Krasimir Angelov c4b804c6db Rename API::Internal class to API::Internal::Base
so that we can use API::Internal namespace.

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/61927.
2019-09-04 10:07:49 +12:00
Stan Hu e632ae8084 Standardize remote_ip and path keys for auth.log and api_json.log
Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses
`remote_ip` and `path` for the same fields. Let's standardize these
namings to make it easier for people working with the data.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
2019-08-20 18:12:28 +00:00
Steve Abrams 3dbf3997bb Add group level container repository endpoints
API endpoints for requesting container repositories
and container repositories with their tag information
are enabled for users that want to specify the group
containing the repository rather than the specific project.
2019-08-05 20:00:50 +00:00
Stan Hu 0ffac1ab27 Filter Geo proxied data from api_json.log
Currently the base64-encoded value of the push-to-secondary data is
saved in `api_json.log`, and this can easily be hundreds of
megabytes. We should filter this from the logs.
2019-07-14 20:53:54 -07:00
Grzegorz Bizon 1def071991 Merge branch '55623-group-cluster-apis' into 'master'
Resolve "API support for group-level clusters"

Closes #55623

See merge request gitlab-org/gitlab-ce!30213
2019-07-12 08:36:24 +00:00
Dylan Griffith 7fb076f5d0 Add API for CRUD group clusters
This is basically a copy of the API for project clusters.
2019-07-11 17:22:58 +10:00
Tim Zallmann b9e52612fe Updates on success of an MR the count on top and in other tabs
New API endpoint for merge request count
Updates all open tabs at the same time with one call
Restructured API response

API response changed to 401 if no current_user

Added API + JS specs

Fix for Static Check

Updated Count on Open/Close, Assign/Unassign of MR's

Checking if MR Count is refreshed

Added # frozen_string_literal: true to spec

Added Changelog
2019-07-09 08:44:19 +00:00
Nick Thomas 381468d0cc
Allow asynchronous rebase operations to be monitored
This MR introduces tracking of the `rebase_jid` for merge requests. As
with `merge_ongoing?`, `rebase_in_progress?` will now return true if a
rebase is proceeding in sidekiq.

After one release, we should remove the Gitaly-based lookup of rebases.
It is much better to track this kind of thing via the database.
2019-07-04 08:50:55 +01:00
Markus Koller 1b1a960bf3
Remove the circuit breaker API
The circuit breaker itself was removed in 11.5, this removes the
corresponding API endpoints which returned empty data since then.
2019-05-24 17:17:14 +02:00
Stan Hu f93b2e02a5 Run rubocop -a on CE files 2019-05-05 03:24:28 -07:00
Małgorzata Ksionek 1103c09776 Add new api class for projects events
Refactor api events class to use external helper

Move specs from old class

Add changelog and magic string

Refactor events class to be more explicit

Remove blank line
2019-04-24 17:20:11 +02:00
Jacopo 5ae9a44aa1 Add project http fetch statistics API
The API get projects/:id/traffic/fetches allows user with write
access to the repository to get the number of clones for the
last 30 days.
2019-02-27 11:52:35 +01:00
Sean McGivern d91b96458e Merge branch 'api-group-labels' into 'master'
API group labels

Closes #44901

See merge request gitlab-org/gitlab-ce!21368
2019-02-07 09:48:04 +00:00
Rémy Coutable 8028a59d7a Merge branch '51913-api-getting-projects-for-users-with-dot-gets-404' into 'master'
API: Support username with dots

Closes #51913

See merge request gitlab-org/gitlab-ce!24395
2019-02-01 14:35:46 +00:00
Robert Schilling 3418697e90 Inital API implementation for group labels 2019-01-31 13:49:49 +01:00
Robert Schilling a612bd0708 Unify user requirements for API slugs 2019-01-31 11:13:23 +01:00
Grzegorz Bizon dc6091876d Merge branch 'container-repository-cleanup-api' into 'master'
Container repository cleanup API

Closes #55978

See merge request gitlab-org/gitlab-ce!24303
2019-01-25 13:24:35 +00:00
Kamil Trzciński 045d07bab3 Add Container Registry API
This includes a set of APIs to manipulate container registry.
This includes also an ability to delete tags based on requested
criteria, like keep-last-n, matching-name, older-than.
2019-01-25 13:13:48 +01:00
Ben 1e2bd85333 API for importing external repos 2019-01-17 10:37:08 +00:00
Shinya Maeda 124905e23b Add API for release asset links
Authorize against release not project
2019-01-07 14:07:05 +09:00
Mayra Cabrera 013d262266 Include CRUD endpoints for Cluster API
Adds the following initial CRUD endpoints for Clusters API:

- GET list of clusters
- GET specific cluster
- POST add existing cluster (mimic of "Add cluster")
- PUT update cluser
- DELETE destroy cluster

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40473
2019-01-04 15:12:44 -06:00
Alessio Caiazza 1ea2d9faa5 Add releases API
This commit introduces Releases API under /api/v4/projects/:id/releases

* We are introducing release policies at project level.
* We are deprecating releases changes from tags, both api and web
interface.
* Tags::CreateService no longer create a release

This feature is controlled by :releases_page feature flag
2018-12-31 12:05:56 +09:00
Oswaldo Ferreira ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
Kamil Trzciński 39c1731a53 Log and pass correlation-id between Unicorn, Sidekiq and Gitaly
The Correlation ID is taken or generated from received X-Request-ID.
Then it is being passed to all executed services (sidekiq workers
or gitaly calls).

The Correlation ID is logged in all structured logs as `correlation_id`.
2018-12-06 20:46:14 +01:00
Nick Thomas 93d6f56968 Merge branch 'if-52811-fix_namespaces_api_routing' into 'master'
Fix API::Namespaces routing to accept namepaces with dots

See merge request gitlab-org/gitlab-ce!22912
2018-11-30 15:08:56 +00: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
Kamil Trzciński 31a1ce2132 Lock writes to trace stream 2018-11-27 17:55:20 +01:00
Francisco Javier López 28cbb2acfe
Add submodule update API endpoint
This new endpoint allow users to update a submodule's reference.

The MR involves adding a new operation RPC operation in gitaly-proto
(see gitlab-org/gitaly-proto!233) and change Gitaly to use this
new version (see gitlab-org/gitaly!936).

See gitlab-org/gitlab-ce!20949
2018-11-07 14:03:30 +01:00
Nick Thomas 25bd49e4f5
Backport project template API to CE 2018-10-05 11:34:43 +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
Jan Provaznik d95c1f0335 Use ResourceLabelEvent for tracking label changes 2018-09-07 13:39:20 +00:00
Andrew Newdigate 189b063ee1 Add route information to lograge structured logging 2018-09-05 10:01:26 +01:00
Andrew Newdigate a62a65b869 Add gitaly_calls to API structured logs 2018-09-04 17:14:22 +00:00
Robert Schilling 08cc6afc6e API: Protected tags 2018-08-25 05:38:54 +00:00
Imre c8f0e4b5da
Add Avatar API 2018-06-06 10:12:52 +02:00
Francisco Javier López 4d3f7ae1ef
Removed API endpoint and specs 2018-05-30 18:23:07 +02:00
Stan Hu 16e04e006c Log queue duration for Grape API calls
This mimics the same thing the RailsQueueDuration does for Rails controller
requests and will help diagnose issues with API delays.

Closes #46601
2018-05-28 13:56:42 -07:00
blackst0ne c0e77f7c9c Resolve "Expand API: Render an arbitrary Markdown document" 2018-05-18 10:25:59 +00:00
Stan Hu 6b98033d91 Fix api_json.log not always reporting the right HTTP status code
As described in https://github.com/aserafin/grape_logging/issues/45, if
a Grape error is caught by the handlers and a different return code
is returned, then the api_json.log would have a 500 error code
instead of the right value. Inserting the GrapeLogging middleware
after the Grape middleware fixes this problem.

Seen in https://gitlab.com/gitlab-com/infrastructure/issues/4249
2018-05-17 23:51:54 -07:00
Nick Thomas 672733aa66
Add an API endpoint to download git repository snapshots 2018-04-19 17:25:01 +01:00
Kamil Trzciński 678620cce6 Add `direct_upload` setting for artifacts 2018-04-05 15:01:14 +02:00
Sean McGivern 1da5a103ac Merge branch 'jprovazn-api' into 'master'
Add discussion API

See merge request gitlab-org/gitlab-ce!17510
2018-03-07 13:37:50 +00:00
Jan Provaznik dcdfa04b32 Add discussion API
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
2018-03-07 12:27:50 +01:00
Felipe Artur e77c4e9efe Merge branch 'master' into 'issue_38337'
# Conflicts:
#   app/models/group.rb
#   db/schema.rb
2018-03-06 16:28:54 +00:00
Sean McGivern 39b393fa72 Merge branch '29130-api-project-export' into 'master'
Resolve "API endpoint for exporting project"

Closes #29130

See merge request gitlab-org/gitlab-ce!15860
2018-03-06 15:24:14 +00:00
Francisco Javier López 8fe880dc06 Projects and groups badges API 2018-03-05 17:51:40 +00:00
Felipe Artur dd071c4b6e Bring one group board to CE 2018-03-03 12:56:17 -03:00
Travis Miller c75187df8c Add project export API implementation 2018-02-28 20:47:36 -06:00
James Lopez 848f49801d
add entity and update spec 2018-02-13 15:25:47 +01:00
Jarka Kadlecová 7381944565 Support search in API 2018-02-06 16:02:02 +01:00
Nicolas MERELLI 81bbcfacb0 Add application create API 2018-01-24 09:42:04 +01:00
Stan Hu eaf9088ba8 Save user ID and username in Grape API log (api_json.log)
This will enable admins to identify who actually made the API request.

Relates to #36960
2018-01-08 21:23:24 -08:00
Felipe Artur 5e148d4e93 EE-BACKPORT group boards 2018-01-04 17:28:10 -02:00
Douwe Maan 20ac30a705 Merge branch '36099-api-responses-missing-x-content-type-options-header' into '10-1-stable'
Include X-Content-Type-Options (XCTO) header into API responses

See merge request gitlab/gitlabhq!2211

(cherry picked from commit 6c818e77f2)

e087e075 Include X-Content-Type-Options (XCTO) header into API responses
2017-11-08 20:11:18 -08:00
Douwe Maan a72d687931 Remove Session API 2017-11-02 11:39:01 +01:00
Travis Miller 8d1ab256bf Add pages domains API implementation 2017-10-22 08:04:43 -05:00
Guilherme Vieira 771b777ab5 Adds requirements that supports anything in sha params 2017-10-12 18:46:41 -03:00
Stan Hu b60cebb931 Exclude logging of API responses to prevent leakage of confidential data 2017-09-13 01:25:33 -07:00
Sean McGivern 7e19b5bfb6 Merge branch 'sh-add-grape-logging' into 'master'
Add JSON logger in `log/api_json.log` for Grape API endpoints

Closes #36189

See merge request !14102
2017-09-07 17:39:14 +00:00
Stan Hu 35dec2c3e8 Use a custom GrapeLogging formatter to get the timestamp 2017-09-07 07:48:13 -07:00
Stan Hu c304dfd4d6 Fix Rubocop failures in API logger 2017-09-07 07:02:46 -07:00
Grzegorz Bizon 8ed0a05107 Merge branch 'wiki_api' into 'master'
Add API support for wiki pages

Closes #12747

See merge request !13372
2017-09-07 10:38:03 +00:00
Stan Hu f7c8032e09 Add JSON logger in `log/api_json.log` for Grape API endpoints
Closes #36189
2017-09-06 23:09:27 -07:00
blackst0ne 2915bb2707 Add API support for wiki pages 2017-09-07 09:21:52 +11:00
Grzegorz Bizon 80b3dcc777 Extract job artifacts API code to a separate file 2017-09-06 11:20:12 +02:00
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