1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
# ErrorTrackingOpenAPI::MessagesApi
All URIs are relative to *https://localhost/errortracking/api/v1*
| Method | HTTP request | Description |
| ------ | ------------ | ----------- |
| [**list_messages**](MessagesApi.md#list_messages) | **GET** /projects/{projectId}/messages | List of messages |
## list_messages
> <Array<MessageEvent>> list_messages(project_id, opts)
List of messages
### Examples
```ruby
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<MessageEvent>>, Integer, Hash)> list_messages_with_http_info(project_id, opts)
```ruby
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
[**Array<MessageEvent>**](MessageEvent.md)
### Authorization
[internalToken](../README.md#internalToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: */*
|