Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/error_tracking/project_settings.rb')
-rw-r--r--lib/api/error_tracking/project_settings.rb30
1 files changed, 23 insertions, 7 deletions
diff --git a/lib/api/error_tracking/project_settings.rb b/lib/api/error_tracking/project_settings.rb
index fefc2098137..ec1d6a8b87f 100644
--- a/lib/api/error_tracking/project_settings.rb
+++ b/lib/api/error_tracking/project_settings.rb
@@ -4,6 +4,8 @@ module API
class ErrorTracking::ProjectSettings < ::API::Base
before { authenticate! }
+ ERROR_TRACKING_PROJECT_SETTINGS_TAGS = %w[error_tracking_project_settings].freeze
+
feature_category :error_tracking
urgency :low
@@ -14,7 +16,8 @@ module API
end
params do
- requires :id, type: String, desc: 'The ID of a project'
+ requires :id, types: [String, Integer],
+ desc: 'The ID or URL-encoded path of the project owned by the authenticated user'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
@@ -24,22 +27,35 @@ module API
not_found!('Error Tracking Setting') unless project_setting
end
- desc 'Get error tracking settings for the project' do
- detail 'This feature was introduced in GitLab 12.7.'
+ desc 'Get Error Tracking settings' do
+ detail 'Get error tracking settings for the project. This feature was introduced in GitLab 12.7.'
success Entities::ErrorTracking::ProjectSetting
+ tags ERROR_TRACKING_PROJECT_SETTINGS_TAGS
end
get ':id/error_tracking/settings' do
present project_setting, with: Entities::ErrorTracking::ProjectSetting
end
- desc 'Enable or disable error tracking settings for the project' do
- detail 'This feature was introduced in GitLab 12.8.'
+ desc 'Enable or disable the Error Tracking project settings' do
+ detail 'The API allows you to enable or disable the Error Tracking settings for a project.'\
+ 'Only for users with the Maintainer role for the project.'
success Entities::ErrorTracking::ProjectSetting
+ failure [
+ { code: 400, message: 'Bad request' },
+ { code: 401, message: 'Unauthorized' },
+ { code: 404, message: 'Not found' }
+ ]
+ tags ERROR_TRACKING_PROJECT_SETTINGS_TAGS
end
params do
- requires :active, type: Boolean, desc: 'Specifying whether to enable or disable error tracking settings', allow_blank: false
- optional :integrated, type: Boolean, desc: 'Specifying whether to enable or disable integrated error tracking'
+ requires :active,
+ type: Boolean,
+ desc: 'Pass true to enable the already configured Error Tracking settings or false to disable it.',
+ allow_blank: false
+ optional :integrated,
+ type: Boolean,
+ desc: 'Pass true to enable the integrated Error Tracking backend. Available in GitLab 14.2 and later.'
end
patch ':id/error_tracking/settings/' do