Back to Gitlabhq

Generated by `rake gems:error_tracking_open_api:generate` on 2023-07-13

gems/error_tracking_open_api/README.md

18.11.25.5 KB
Original Source

Generated by rake gems:error_tracking_open_api:generate on 2023-07-13

See https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/development/rake_tasks.md#update-openapi-client-for-error-tracking-feature

error_tracking_open_api

ErrorTrackingOpenAPI - the Ruby gem for the Error Tracking REST API

This schema describes the API endpoints for the error tracking feature

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

shell
gem build error_tracking_open_api.gemspec

Then either install the gem locally:

shell
gem install ./error_tracking_open_api-1.0.0.gem

(for development, run gem install --dev ./error_tracking_open_api-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'error_tracking_open_api', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'error_tracking_open_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

shell
ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

ruby
# Load the gem
require 'error_tracking_open_api'

# Setup authorization
ErrorTrackingOpenAPI.configure do |config|
  # Configure API key authorization: internalToken
  config.api_key['internalToken'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['internalToken'] = 'Bearer'
end

api_instance = ErrorTrackingOpenAPI::ErrorsApi.new
project_id = 56 # Integer | ID of the project where the error was created
fingerprint = 56 # Integer | ID of the error that needs to be updated deleted

begin
  #Get information about the error
  result = api_instance.get_error(project_id, fingerprint)
  p result
rescue ErrorTrackingOpenAPI::ApiError => e
  puts "Exception when calling ErrorsApi->get_error: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://localhost/errortracking/api/v1

ClassMethodHTTP requestDescription
ErrorTrackingOpenAPI::ErrorsApiget_errorGET /projects/{projectId}/errors/{fingerprint}Get information about the error
ErrorTrackingOpenAPI::ErrorsApilist_errorsGET /projects/{projectId}/errorsList of errors
ErrorTrackingOpenAPI::ErrorsApilist_eventsGET /projects/{projectId}/errors/{fingerprint}/eventsGet information about the events related to the error
ErrorTrackingOpenAPI::ErrorsApiupdate_errorPUT /projects/{projectId}/errors/{fingerprint}Update the status of the error
ErrorTrackingOpenAPI::ErrorsV2Apiget_stats_v2GET /api/0/organizations/{groupId}/stats_v2Stats of events received for the group
ErrorTrackingOpenAPI::ErrorsV2Apilist_errors_v2GET /api/0/organizations/{groupId}/issues/List of errors(V2)
ErrorTrackingOpenAPI::ErrorsV2Apilist_projectsGET /api/0/organizations/{groupId}/projects/List of projects
ErrorTrackingOpenAPI::EventsApilist_eventsGET /projects/{projectId}/errors/{fingerprint}/eventsGet information about the events related to the error
ErrorTrackingOpenAPI::EventsApiprojects_api_project_id_envelope_postPOST /projects/api/{projectId}/envelopeIngestion endpoint for error events sent from client SDKs
ErrorTrackingOpenAPI::EventsApiprojects_api_project_id_store_postPOST /projects/api/{projectId}/storeIngestion endpoint for error events sent from client SDKs
ErrorTrackingOpenAPI::MessagesApilist_messagesGET /projects/{projectId}/messagesList of messages
ErrorTrackingOpenAPI::ProjectsApidelete_projectDELETE /projects/{id}Deletes all project related data. Mostly for testing purposes and later for production to clean updeleted projects.

Documentation for Models

Documentation for Authorization

internalToken

  • Type: API key
  • API key parameter name: Gitlab-Error-Tracking-Token
  • Location: HTTP header