mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-01 16:04:19 +00:00
2.2 KiB
2.2 KiB
ErrorTrackingOpenAPI::MessagesApi
All URIs are relative to https://localhost/errortracking/api/v1
Method | HTTP request | Description |
---|---|---|
list_messages | GET /projects/{projectId}/messages | List of messages |
list_messages
<Array> list_messages(project_id, opts)
List of messages
Examples
require 'time'
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::MessagesApi.new
project_id = 56 # Integer | ID of the project where the message was created
opts = {
limit: 56 # Integer | Number of entries to return
}
begin
# List of messages
result = api_instance.list_messages(project_id, opts)
p result
rescue ErrorTrackingOpenAPI::ApiError => e
puts "Error when calling MessagesApi->list_messages: #{e}"
end
Using the list_messages_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> list_messages_with_http_info(project_id, opts)
begin
# List of messages
data, status_code, headers = api_instance.list_messages_with_http_info(project_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<MessageEvent>>
rescue ErrorTrackingOpenAPI::ApiError => e
puts "Error when calling MessagesApi->list_messages_with_http_info: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
project_id | Integer | ID of the project where the message was created | |
limit | Integer | Number of entries to return | [optional][default to 20] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /