nodeum_sdk 1.86.0 → 1.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +32 -4
- data/docs/ByDateFacet.md +4 -4
- data/docs/ByMetadataBucket.md +17 -0
- data/docs/ByMetadataBucketAllOf.md +17 -0
- data/docs/ByMetadataFacet.md +17 -0
- data/docs/ByMetadataFacetAllOf.md +17 -0
- data/docs/ByMetadataKeyBucket.md +17 -0
- data/docs/ByMetadataKeyBucketAllOf.md +17 -0
- data/docs/ByMetadataKeyBuckets.md +17 -0
- data/docs/ByMetadataValueBuckets.md +17 -0
- data/docs/ByPrimaryStorageFacet.md +4 -4
- data/docs/ByPrimaryTypeFacet.md +4 -4
- data/docs/BySecondaryStorageFacet.md +4 -4
- data/docs/BySizeFacet.md +4 -4
- data/docs/ByTaskMetadataFacet.md +17 -0
- data/docs/ByTaskMetadataFacetAllOf.md +17 -0
- data/docs/ByTypeFacetBucket.md +1 -1
- data/docs/CloudBucket.md +3 -1
- data/docs/CloudBucketsApi.md +61 -0
- data/docs/CloudConnector.md +3 -1
- data/docs/DefaultFacet.md +1 -1
- data/docs/FileFacet.md +3 -3
- data/docs/FileFacetAllOf.md +3 -3
- data/docs/FileMetadataDefinition.md +16 -0
- data/docs/FileMetadataDefinitionCollection.md +19 -0
- data/docs/MetadataApi.md +252 -0
- data/docs/MetadataDefinition.md +27 -0
- data/docs/StatisticsApi.md +136 -0
- data/docs/StorageCloudBucketFacets.md +1 -1
- data/docs/StorageFacet.md +1 -1
- data/docs/StorageNasShareFacets.md +1 -1
- data/docs/StoragePoolFacets.md +1 -1
- data/docs/StorageTapeFacets.md +1 -1
- data/docs/SystemGroup.md +3 -3
- data/docs/SystemUser.md +4 -4
- data/docs/TaskFacet.md +11 -7
- data/docs/TaskFacetAllOf.md +11 -7
- data/docs/TaskFacetBucket.md +12 -8
- data/docs/TaskFacetMetadataBucket.md +35 -0
- data/docs/TaskFacetMetadataKeyBucket.md +17 -0
- data/docs/TaskFacetMetadataKeyBucketAllOf.md +17 -0
- data/docs/TaskFacetMetadataKeyBuckets.md +17 -0
- data/docs/TaskFacetMetadataValueBuckets.md +17 -0
- data/docs/TaskMetadataDefinition.md +25 -0
- data/docs/TaskMetadataDefinitionAllOf.md +25 -0
- data/docs/TaskMetadataDefinitionCollection.md +19 -0
- data/lib/nodeum_sdk.rb +22 -0
- data/lib/nodeum_sdk/api/cloud_buckets_api.rb +71 -0
- data/lib/nodeum_sdk/api/metadata_api.rb +270 -0
- data/lib/nodeum_sdk/api/statistics_api.rb +151 -0
- data/lib/nodeum_sdk/models/by_metadata_bucket.rb +218 -0
- data/lib/nodeum_sdk/models/by_metadata_bucket_all_of.rb +206 -0
- data/lib/nodeum_sdk/models/by_metadata_facet.rb +218 -0
- data/lib/nodeum_sdk/models/by_metadata_facet_all_of.rb +206 -0
- data/lib/nodeum_sdk/models/by_metadata_key_bucket.rb +218 -0
- data/lib/nodeum_sdk/models/by_metadata_key_bucket_all_of.rb +206 -0
- data/lib/nodeum_sdk/models/by_metadata_key_buckets.rb +208 -0
- data/lib/nodeum_sdk/models/by_metadata_value_buckets.rb +208 -0
- data/lib/nodeum_sdk/models/by_task_metadata_facet.rb +218 -0
- data/lib/nodeum_sdk/models/by_task_metadata_facet_all_of.rb +206 -0
- data/lib/nodeum_sdk/models/cloud_bucket.rb +14 -4
- data/lib/nodeum_sdk/models/cloud_connector.rb +16 -6
- data/lib/nodeum_sdk/models/file_metadata_definition.rb +230 -0
- data/lib/nodeum_sdk/models/file_metadata_definition_collection.rb +217 -0
- data/lib/nodeum_sdk/models/metadata_definition.rb +285 -0
- data/lib/nodeum_sdk/models/task_facet.rb +22 -4
- data/lib/nodeum_sdk/models/task_facet_all_of.rb +22 -4
- data/lib/nodeum_sdk/models/task_facet_bucket.rb +22 -4
- data/lib/nodeum_sdk/models/task_facet_metadata_bucket.rb +295 -0
- data/lib/nodeum_sdk/models/task_facet_metadata_key_bucket.rb +218 -0
- data/lib/nodeum_sdk/models/task_facet_metadata_key_bucket_all_of.rb +206 -0
- data/lib/nodeum_sdk/models/task_facet_metadata_key_buckets.rb +208 -0
- data/lib/nodeum_sdk/models/task_facet_metadata_value_buckets.rb +208 -0
- data/lib/nodeum_sdk/models/task_metadata_definition.rb +288 -0
- data/lib/nodeum_sdk/models/task_metadata_definition_all_of.rb +276 -0
- data/lib/nodeum_sdk/models/task_metadata_definition_collection.rb +217 -0
- data/lib/nodeum_sdk/version.rb +1 -1
- data/spec/api/metadata_api_spec.rb +85 -0
- data/spec/models/by_metadata_bucket_all_of_spec.rb +41 -0
- data/spec/models/by_metadata_bucket_spec.rb +41 -0
- data/spec/models/by_metadata_facet_all_of_spec.rb +41 -0
- data/spec/models/by_metadata_facet_spec.rb +41 -0
- data/spec/models/by_metadata_key_bucket_all_of_spec.rb +41 -0
- data/spec/models/by_metadata_key_bucket_spec.rb +41 -0
- data/spec/models/by_metadata_key_buckets_spec.rb +41 -0
- data/spec/models/by_metadata_value_buckets_spec.rb +41 -0
- data/spec/models/by_task_metadata_facet_all_of_spec.rb +41 -0
- data/spec/models/by_task_metadata_facet_spec.rb +41 -0
- data/spec/models/file_metadata_definition_collection_spec.rb +47 -0
- data/spec/models/file_metadata_definition_spec.rb +35 -0
- data/spec/models/metadata_definition_spec.rb +75 -0
- data/spec/models/task_facet_metadata_bucket_spec.rb +95 -0
- data/spec/models/task_facet_metadata_key_bucket_all_of_spec.rb +41 -0
- data/spec/models/task_facet_metadata_key_bucket_spec.rb +41 -0
- data/spec/models/task_facet_metadata_key_buckets_spec.rb +41 -0
- data/spec/models/task_facet_metadata_value_buckets_spec.rb +41 -0
- data/spec/models/task_metadata_definition_all_of_spec.rb +69 -0
- data/spec/models/task_metadata_definition_collection_spec.rb +47 -0
- data/spec/models/task_metadata_definition_spec.rb +69 -0
- metadata +245 -157
@@ -0,0 +1,270 @@
|
|
1
|
+
=begin
|
2
|
+
#Nodeum API
|
3
|
+
|
4
|
+
#The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http://nodeumhostname/api/ The current production version of the API is v1. **REST** The Nodeum API is a RESTful API. This means that the API is designed to allow you to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE. **JSON** The Nodeum API speaks exclusively in JSON. This means that you should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by the API. **Authentication** All API calls require user-password authentication. **Cross-Origin Resource Sharing** The Nodeum API supports CORS for communicating from Javascript for these endpoints. You will need to specify an Origin URI when creating your application to allow for CORS to be whitelisted for your domain. **Pagination** Some endpoints such as File Listing return a potentially lengthy array of objects. In order to keep the response sizes manageable the API will take advantage of pagination. Pagination is a mechanism for returning a subset of the results for a request and allowing for subsequent requests to “page” through the rest of the results until the end is reached. Paginated endpoints follow a standard interface that accepts two query parameters, limit and offset, and return a payload that follows a standard form. These parameters names and their behavior are borrowed from SQL LIMIT and OFFSET keywords. **Versioning** The Nodeum API is constantly being worked on to add features, make improvements, and fix bugs. This means that you should expect changes to be introduced and documented. However, there are some changes or additions that are considered backwards-compatible and your applications should be flexible enough to handle them. These include: - Adding new endpoints to the API - Adding new attributes to the response of an existing endpoint - Changing the order of attributes of responses (JSON by definition is an object of unordered key/value pairs) **Filter parameters** When browsing a list of items, multiple filter parameters may be applied. Some operators can be added to the value as a prefix: - `=` value is equal. Default operator, may be omitted - `!=` value is different - `>` greater than - `>=` greater than or equal - `<` lower than - `>=` lower than or equal - `><` included in list, items should be separated by `|` - `!><` not included in list, items should be separated by `|` - `~` pattern matching, may include `%` (any characters) and `_` (one character) - `!~` pattern not matching, may include `%` (any characters) and `_` (one character)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.1.0
|
7
|
+
Contact: info@nodeum.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Nodeum
|
16
|
+
class MetadataApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List file metadata definitions
|
23
|
+
# **API Key Scope**: file_metadata_definitions / index
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Integer] :limit The number of items to display for pagination.
|
26
|
+
# @option opts [Integer] :offset The number of items to skip for pagination.
|
27
|
+
# @return [FileMetadataDefinitionCollection]
|
28
|
+
def index_file_metadata_definitions(opts = {})
|
29
|
+
data, _status_code, _headers = index_file_metadata_definitions_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# List file metadata definitions
|
34
|
+
# **API Key Scope**: file_metadata_definitions / index
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [Integer] :limit The number of items to display for pagination.
|
37
|
+
# @option opts [Integer] :offset The number of items to skip for pagination.
|
38
|
+
# @return [Array<(FileMetadataDefinitionCollection, Integer, Hash)>] FileMetadataDefinitionCollection data, response status code and response headers
|
39
|
+
def index_file_metadata_definitions_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: MetadataApi.index_file_metadata_definitions ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/file_metadata_definitions'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
49
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'FileMetadataDefinitionCollection'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: MetadataApi#index_file_metadata_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# List task metadata definitions
|
85
|
+
# **API Key Scope**: task_metadata_definitions / index
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [Integer] :limit The number of items to display for pagination.
|
88
|
+
# @option opts [Integer] :offset The number of items to skip for pagination.
|
89
|
+
# @return [TaskMetadataDefinitionCollection]
|
90
|
+
def index_task_metadata_definitions(opts = {})
|
91
|
+
data, _status_code, _headers = index_task_metadata_definitions_with_http_info(opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# List task metadata definitions
|
96
|
+
# **API Key Scope**: task_metadata_definitions / index
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [Integer] :limit The number of items to display for pagination.
|
99
|
+
# @option opts [Integer] :offset The number of items to skip for pagination.
|
100
|
+
# @return [Array<(TaskMetadataDefinitionCollection, Integer, Hash)>] TaskMetadataDefinitionCollection data, response status code and response headers
|
101
|
+
def index_task_metadata_definitions_with_http_info(opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: MetadataApi.index_task_metadata_definitions ...'
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/task_metadata_definitions'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
111
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body]
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'TaskMetadataDefinitionCollection'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: MetadataApi#index_task_metadata_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# Displays a specific task metadata definition.
|
147
|
+
# **API Key Scope**: file_metadata_definitions / show
|
148
|
+
# @param metadata_definition_id [String] Numeric ID or key of a metadata definition
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [FileMetadataDefinition]
|
151
|
+
def show_file_metadata_definition(metadata_definition_id, opts = {})
|
152
|
+
data, _status_code, _headers = show_file_metadata_definition_with_http_info(metadata_definition_id, opts)
|
153
|
+
data
|
154
|
+
end
|
155
|
+
|
156
|
+
# Displays a specific task metadata definition.
|
157
|
+
# **API Key Scope**: file_metadata_definitions / show
|
158
|
+
# @param metadata_definition_id [String] Numeric ID or key of a metadata definition
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Array<(FileMetadataDefinition, Integer, Hash)>] FileMetadataDefinition data, response status code and response headers
|
161
|
+
def show_file_metadata_definition_with_http_info(metadata_definition_id, opts = {})
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug 'Calling API: MetadataApi.show_file_metadata_definition ...'
|
164
|
+
end
|
165
|
+
# verify the required parameter 'metadata_definition_id' is set
|
166
|
+
if @api_client.config.client_side_validation && metadata_definition_id.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'metadata_definition_id' when calling MetadataApi.show_file_metadata_definition"
|
168
|
+
end
|
169
|
+
# resource path
|
170
|
+
local_var_path = '/file_metadata_definitions/{metadata_definition_id}'.sub('{' + 'metadata_definition_id' + '}', CGI.escape(metadata_definition_id.to_s))
|
171
|
+
|
172
|
+
# query parameters
|
173
|
+
query_params = opts[:query_params] || {}
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = opts[:header_params] || {}
|
177
|
+
# HTTP header 'Accept' (if needed)
|
178
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = opts[:form_params] || {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = opts[:body]
|
185
|
+
|
186
|
+
# return_type
|
187
|
+
return_type = opts[:return_type] || 'FileMetadataDefinition'
|
188
|
+
|
189
|
+
# auth_names
|
190
|
+
auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']
|
191
|
+
|
192
|
+
new_options = opts.merge(
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names,
|
198
|
+
:return_type => return_type
|
199
|
+
)
|
200
|
+
|
201
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug "API called: MetadataApi#show_file_metadata_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
|
+
end
|
205
|
+
return data, status_code, headers
|
206
|
+
end
|
207
|
+
|
208
|
+
# Displays a specific task metadata definition.
|
209
|
+
# **API Key Scope**: task_metadata_definitions / show
|
210
|
+
# @param metadata_definition_id [String] Numeric ID or key of a metadata definition
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [TaskMetadataDefinition]
|
213
|
+
def show_task_metadata_definition(metadata_definition_id, opts = {})
|
214
|
+
data, _status_code, _headers = show_task_metadata_definition_with_http_info(metadata_definition_id, opts)
|
215
|
+
data
|
216
|
+
end
|
217
|
+
|
218
|
+
# Displays a specific task metadata definition.
|
219
|
+
# **API Key Scope**: task_metadata_definitions / show
|
220
|
+
# @param metadata_definition_id [String] Numeric ID or key of a metadata definition
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @return [Array<(TaskMetadataDefinition, Integer, Hash)>] TaskMetadataDefinition data, response status code and response headers
|
223
|
+
def show_task_metadata_definition_with_http_info(metadata_definition_id, opts = {})
|
224
|
+
if @api_client.config.debugging
|
225
|
+
@api_client.config.logger.debug 'Calling API: MetadataApi.show_task_metadata_definition ...'
|
226
|
+
end
|
227
|
+
# verify the required parameter 'metadata_definition_id' is set
|
228
|
+
if @api_client.config.client_side_validation && metadata_definition_id.nil?
|
229
|
+
fail ArgumentError, "Missing the required parameter 'metadata_definition_id' when calling MetadataApi.show_task_metadata_definition"
|
230
|
+
end
|
231
|
+
# resource path
|
232
|
+
local_var_path = '/task_metadata_definitions/{metadata_definition_id}'.sub('{' + 'metadata_definition_id' + '}', CGI.escape(metadata_definition_id.to_s))
|
233
|
+
|
234
|
+
# query parameters
|
235
|
+
query_params = opts[:query_params] || {}
|
236
|
+
|
237
|
+
# header parameters
|
238
|
+
header_params = opts[:header_params] || {}
|
239
|
+
# HTTP header 'Accept' (if needed)
|
240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
241
|
+
|
242
|
+
# form parameters
|
243
|
+
form_params = opts[:form_params] || {}
|
244
|
+
|
245
|
+
# http body (model)
|
246
|
+
post_body = opts[:body]
|
247
|
+
|
248
|
+
# return_type
|
249
|
+
return_type = opts[:return_type] || 'TaskMetadataDefinition'
|
250
|
+
|
251
|
+
# auth_names
|
252
|
+
auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']
|
253
|
+
|
254
|
+
new_options = opts.merge(
|
255
|
+
:header_params => header_params,
|
256
|
+
:query_params => query_params,
|
257
|
+
:form_params => form_params,
|
258
|
+
:body => post_body,
|
259
|
+
:auth_names => auth_names,
|
260
|
+
:return_type => return_type
|
261
|
+
)
|
262
|
+
|
263
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
264
|
+
if @api_client.config.debugging
|
265
|
+
@api_client.config.logger.debug "API called: MetadataApi#show_task_metadata_definition\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
266
|
+
end
|
267
|
+
return data, status_code, headers
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
@@ -246,6 +246,85 @@ module Nodeum
|
|
246
246
|
return data, status_code, headers
|
247
247
|
end
|
248
248
|
|
249
|
+
# Get statistics about files, grouped by metadata
|
250
|
+
# **API Key Scope**: statistics / by_metadata
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @option opts [String] :q Solr query
|
253
|
+
# @option opts [Array<String>] :fq Solr filter query Multiple query can be separated by `|`.
|
254
|
+
# @option opts [String] :date_attr Type of date to facet on
|
255
|
+
# @option opts [String] :sort Sort results of facet (default to 'count')
|
256
|
+
# @option opts [Integer] :limit Limit results of facet (default to 10)
|
257
|
+
# @return [ByMetadataFacet]
|
258
|
+
def statistics_by_metadata(opts = {})
|
259
|
+
data, _status_code, _headers = statistics_by_metadata_with_http_info(opts)
|
260
|
+
data
|
261
|
+
end
|
262
|
+
|
263
|
+
# Get statistics about files, grouped by metadata
|
264
|
+
# **API Key Scope**: statistics / by_metadata
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @option opts [String] :q Solr query
|
267
|
+
# @option opts [Array<String>] :fq Solr filter query Multiple query can be separated by `|`.
|
268
|
+
# @option opts [String] :date_attr Type of date to facet on
|
269
|
+
# @option opts [String] :sort Sort results of facet
|
270
|
+
# @option opts [Integer] :limit Limit results of facet
|
271
|
+
# @return [Array<(ByMetadataFacet, Integer, Hash)>] ByMetadataFacet data, response status code and response headers
|
272
|
+
def statistics_by_metadata_with_http_info(opts = {})
|
273
|
+
if @api_client.config.debugging
|
274
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_by_metadata ...'
|
275
|
+
end
|
276
|
+
allowable_values = ["file_change_dt", "file_modification_dt", "file_access_dt"]
|
277
|
+
if @api_client.config.client_side_validation && opts[:'date_attr'] && !allowable_values.include?(opts[:'date_attr'])
|
278
|
+
fail ArgumentError, "invalid value for \"date_attr\", must be one of #{allowable_values}"
|
279
|
+
end
|
280
|
+
allowable_values = ["count", "files_count", "file_size_sum", "cost"]
|
281
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
282
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
283
|
+
end
|
284
|
+
# resource path
|
285
|
+
local_var_path = '/statistics/by_metadata'
|
286
|
+
|
287
|
+
# query parameters
|
288
|
+
query_params = opts[:query_params] || {}
|
289
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
290
|
+
query_params[:'fq'] = @api_client.build_collection_param(opts[:'fq'], :pipe) if !opts[:'fq'].nil?
|
291
|
+
query_params[:'date_attr'] = opts[:'date_attr'] if !opts[:'date_attr'].nil?
|
292
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
293
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
294
|
+
|
295
|
+
# header parameters
|
296
|
+
header_params = opts[:header_params] || {}
|
297
|
+
# HTTP header 'Accept' (if needed)
|
298
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
299
|
+
|
300
|
+
# form parameters
|
301
|
+
form_params = opts[:form_params] || {}
|
302
|
+
|
303
|
+
# http body (model)
|
304
|
+
post_body = opts[:body]
|
305
|
+
|
306
|
+
# return_type
|
307
|
+
return_type = opts[:return_type] || 'ByMetadataFacet'
|
308
|
+
|
309
|
+
# auth_names
|
310
|
+
auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']
|
311
|
+
|
312
|
+
new_options = opts.merge(
|
313
|
+
:header_params => header_params,
|
314
|
+
:query_params => query_params,
|
315
|
+
:form_params => form_params,
|
316
|
+
:body => post_body,
|
317
|
+
:auth_names => auth_names,
|
318
|
+
:return_type => return_type
|
319
|
+
)
|
320
|
+
|
321
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
322
|
+
if @api_client.config.debugging
|
323
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_by_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
324
|
+
end
|
325
|
+
return data, status_code, headers
|
326
|
+
end
|
327
|
+
|
249
328
|
# Get statistics about files, grouped by primary Cloud
|
250
329
|
# **API Key Scope**: statistics / by_primary_cloud
|
251
330
|
# @param [Hash] opts the optional parameters
|
@@ -1088,6 +1167,78 @@ module Nodeum
|
|
1088
1167
|
return data, status_code, headers
|
1089
1168
|
end
|
1090
1169
|
|
1170
|
+
# Get statistics about tasks executions, grouped by metadata
|
1171
|
+
# **API Key Scope**: statistics / task_by_metadata
|
1172
|
+
# @param [Hash] opts the optional parameters
|
1173
|
+
# @option opts [String] :q Solr query
|
1174
|
+
# @option opts [Array<String>] :fq Solr filter query Multiple query can be separated by `|`.
|
1175
|
+
# @option opts [String] :sort Sort results of facet on task (default to 'count')
|
1176
|
+
# @option opts [Integer] :limit Limit results of facet (default to 10)
|
1177
|
+
# @return [ByTaskMetadataFacet]
|
1178
|
+
def statistics_task_by_metadata(opts = {})
|
1179
|
+
data, _status_code, _headers = statistics_task_by_metadata_with_http_info(opts)
|
1180
|
+
data
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
# Get statistics about tasks executions, grouped by metadata
|
1184
|
+
# **API Key Scope**: statistics / task_by_metadata
|
1185
|
+
# @param [Hash] opts the optional parameters
|
1186
|
+
# @option opts [String] :q Solr query
|
1187
|
+
# @option opts [Array<String>] :fq Solr filter query Multiple query can be separated by `|`.
|
1188
|
+
# @option opts [String] :sort Sort results of facet on task
|
1189
|
+
# @option opts [Integer] :limit Limit results of facet
|
1190
|
+
# @return [Array<(ByTaskMetadataFacet, Integer, Hash)>] ByTaskMetadataFacet data, response status code and response headers
|
1191
|
+
def statistics_task_by_metadata_with_http_info(opts = {})
|
1192
|
+
if @api_client.config.debugging
|
1193
|
+
@api_client.config.logger.debug 'Calling API: StatisticsApi.statistics_task_by_metadata ...'
|
1194
|
+
end
|
1195
|
+
allowable_values = ["count", "tasks_count", "to_process_size_sum", "processed_size_sum", "to_process_files_sum", "processed_files_sum", "finalized_files_sum", "bandwidth_avg", "bandwidth_count"]
|
1196
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
1197
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
1198
|
+
end
|
1199
|
+
# resource path
|
1200
|
+
local_var_path = '/statistics/task_by_metadata'
|
1201
|
+
|
1202
|
+
# query parameters
|
1203
|
+
query_params = opts[:query_params] || {}
|
1204
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
1205
|
+
query_params[:'fq'] = @api_client.build_collection_param(opts[:'fq'], :pipe) if !opts[:'fq'].nil?
|
1206
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1207
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1208
|
+
|
1209
|
+
# header parameters
|
1210
|
+
header_params = opts[:header_params] || {}
|
1211
|
+
# HTTP header 'Accept' (if needed)
|
1212
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1213
|
+
|
1214
|
+
# form parameters
|
1215
|
+
form_params = opts[:form_params] || {}
|
1216
|
+
|
1217
|
+
# http body (model)
|
1218
|
+
post_body = opts[:body]
|
1219
|
+
|
1220
|
+
# return_type
|
1221
|
+
return_type = opts[:return_type] || 'ByTaskMetadataFacet'
|
1222
|
+
|
1223
|
+
# auth_names
|
1224
|
+
auth_names = opts[:auth_names] || ['BasicAuth', 'BearerAuth']
|
1225
|
+
|
1226
|
+
new_options = opts.merge(
|
1227
|
+
:header_params => header_params,
|
1228
|
+
:query_params => query_params,
|
1229
|
+
:form_params => form_params,
|
1230
|
+
:body => post_body,
|
1231
|
+
:auth_names => auth_names,
|
1232
|
+
:return_type => return_type
|
1233
|
+
)
|
1234
|
+
|
1235
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1236
|
+
if @api_client.config.debugging
|
1237
|
+
@api_client.config.logger.debug "API called: StatisticsApi#statistics_task_by_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1238
|
+
end
|
1239
|
+
return data, status_code, headers
|
1240
|
+
end
|
1241
|
+
|
1091
1242
|
# Get statistics about tasks executions, grouped by status
|
1092
1243
|
# **API Key Scope**: statistics / task_by_status
|
1093
1244
|
# @param [Hash] opts the optional parameters
|
@@ -0,0 +1,218 @@
|
|
1
|
+
=begin
|
2
|
+
#Nodeum API
|
3
|
+
|
4
|
+
#The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http://nodeumhostname/api/ The current production version of the API is v1. **REST** The Nodeum API is a RESTful API. This means that the API is designed to allow you to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE. **JSON** The Nodeum API speaks exclusively in JSON. This means that you should always set the Content-Type header to application/json to ensure that your requests are properly accepted and processed by the API. **Authentication** All API calls require user-password authentication. **Cross-Origin Resource Sharing** The Nodeum API supports CORS for communicating from Javascript for these endpoints. You will need to specify an Origin URI when creating your application to allow for CORS to be whitelisted for your domain. **Pagination** Some endpoints such as File Listing return a potentially lengthy array of objects. In order to keep the response sizes manageable the API will take advantage of pagination. Pagination is a mechanism for returning a subset of the results for a request and allowing for subsequent requests to “page” through the rest of the results until the end is reached. Paginated endpoints follow a standard interface that accepts two query parameters, limit and offset, and return a payload that follows a standard form. These parameters names and their behavior are borrowed from SQL LIMIT and OFFSET keywords. **Versioning** The Nodeum API is constantly being worked on to add features, make improvements, and fix bugs. This means that you should expect changes to be introduced and documented. However, there are some changes or additions that are considered backwards-compatible and your applications should be flexible enough to handle them. These include: - Adding new endpoints to the API - Adding new attributes to the response of an existing endpoint - Changing the order of attributes of responses (JSON by definition is an object of unordered key/value pairs) **Filter parameters** When browsing a list of items, multiple filter parameters may be applied. Some operators can be added to the value as a prefix: - `=` value is equal. Default operator, may be omitted - `!=` value is different - `>` greater than - `>=` greater than or equal - `<` lower than - `>=` lower than or equal - `><` included in list, items should be separated by `|` - `!><` not included in list, items should be separated by `|` - `~` pattern matching, may include `%` (any characters) and `_` (one character) - `!~` pattern not matching, may include `%` (any characters) and `_` (one character)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.1.0
|
7
|
+
Contact: info@nodeum.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Nodeum
|
16
|
+
class ByMetadataBucket < ByDateFacet
|
17
|
+
attr_accessor :val
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'val' => :'val'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'val' => :'String'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of class defined in allOf (OpenAPI v3)
|
40
|
+
def self.openapi_all_of
|
41
|
+
[
|
42
|
+
:'ByDateFacet',
|
43
|
+
:'ByMetadataBucketAllOf'
|
44
|
+
]
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Nodeum::ByMetadataBucket` initialize method"
|
52
|
+
end
|
53
|
+
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Nodeum::ByMetadataBucket`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
59
|
+
h[k.to_sym] = v
|
60
|
+
}
|
61
|
+
|
62
|
+
# call parent's initialize
|
63
|
+
super(attributes)
|
64
|
+
|
65
|
+
if attributes.key?(:'val')
|
66
|
+
self.val = attributes[:'val']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = super
|
74
|
+
invalid_properties
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
def valid?
|
80
|
+
true && super
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
val == o.val && super(o)
|
89
|
+
end
|
90
|
+
|
91
|
+
# @see the `==` method
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def eql?(o)
|
94
|
+
self == o
|
95
|
+
end
|
96
|
+
|
97
|
+
# Calculates hash code according to all attributes.
|
98
|
+
# @return [Integer] Hash code
|
99
|
+
def hash
|
100
|
+
[val].hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# Builds the object from hash
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
# @return [Object] Returns the model itself
|
106
|
+
def self.build_from_hash(attributes)
|
107
|
+
new.build_from_hash(attributes)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
super(attributes)
|
116
|
+
self.class.openapi_types.each_pair do |key, type|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :DateTime
|
138
|
+
DateTime.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :Boolean
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
Nodeum.const_get(type).build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = super
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
if value.nil?
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
193
|
+
end
|
194
|
+
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|