seatschart 0.3.0 → 0.4.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 +39 -6
- data/lib/seatschart/api/auth_api.rb +81 -4
- data/lib/seatschart/api/billing_api.rb +4 -0
- data/lib/seatschart/api/charts_api.rb +11 -11
- data/lib/seatschart/api/events_api.rb +20 -20
- data/lib/seatschart/api/public_api.rb +6 -6
- data/lib/seatschart/api/workspace_api.rb +1213 -47
- data/lib/seatschart/models/api_error.rb +4 -4
- data/lib/seatschart/models/delete_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +237 -0
- data/lib/seatschart/models/get_api_workspaces200_response_items_inner.rb +50 -4
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response.rb +239 -0
- data/lib/seatschart/models/get_api_workspaces_by_workspace_id_keys200_response_api_keys_inner.rb +321 -0
- data/lib/seatschart/models/get_api_workspaces_created_by_api_parameter.rb +103 -0
- data/lib/seatschart/models/get_api_workspaces_overview_created_by_api_parameter.rb +103 -0
- data/lib/seatschart/models/patch_api_events_by_event_id_request.rb +15 -15
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id200_response.rb +221 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_keys_by_key_id_request.rb +292 -0
- data/lib/seatschart/models/patch_api_workspaces_by_workspace_id_request.rb +288 -0
- data/lib/seatschart/models/post_api_auth_new_workspace_request.rb +294 -0
- data/lib/seatschart/models/post_api_workspaces200_response.rb +468 -0
- data/lib/seatschart/models/post_api_workspaces200_response_api_key.rb +332 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template.rb +260 -0
- data/lib/seatschart/models/post_api_workspaces200_response_template_webhooks_inner.rb +284 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete200_response.rb +319 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_actions_delete_request.rb +281 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_invitations_request.rb +300 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response.rb +237 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys201_response_api_key.rb +338 -0
- data/lib/seatschart/models/post_api_workspaces_by_workspace_id_keys_request.rb +299 -0
- data/lib/seatschart/models/post_api_workspaces_request.rb +100 -4
- data/lib/seatschart/models/post_api_workspaces_request_issue_key.rb +294 -0
- data/lib/seatschart/version.rb +1 -1
- data/lib/seatschart.rb +20 -1
- metadata +22 -3
- data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +0 -349
|
@@ -19,8 +19,8 @@ module SeatsChart
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Deactivate a workspace (legacy DELETE)
|
|
23
|
+
# Kept for compatibility: DELETE is exactly POST /workspaces/{workspaceId}/actions/deactivate (reversible with …/actions/activate). To delete a workspace for good from the product, use POST /workspaces/{workspaceId}/actions/delete. Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). `{workspaceId}` may also be the external id of a workspace you administer (one workspace per organizer).
|
|
24
24
|
# @param workspace_id [String]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -30,8 +30,8 @@ module SeatsChart
|
|
|
30
30
|
data
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
#
|
|
34
|
-
#
|
|
33
|
+
# Deactivate a workspace (legacy DELETE)
|
|
34
|
+
# Kept for compatibility: DELETE is exactly POST /workspaces/{workspaceId}/actions/deactivate (reversible with …/actions/activate). To delete a workspace for good from the product, use POST /workspaces/{workspaceId}/actions/delete. Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). `{workspaceId}` may also be the external id of a workspace you administer (one workspace per organizer).
|
|
35
35
|
# @param workspace_id [String]
|
|
36
36
|
# @param [Hash] opts the optional parameters
|
|
37
37
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -101,6 +101,266 @@ module SeatsChart
|
|
|
101
101
|
return data, status_code, headers
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
+
# Revoke a pending invitation of a workspace you administer
|
|
105
|
+
# Audited (`team.invitation_revoked`).
|
|
106
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
107
|
+
# @param invitation_id [String]
|
|
108
|
+
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
110
|
+
# @return [nil]
|
|
111
|
+
def delete_api_workspaces_by_workspace_id_invitations_by_invitation_id(workspace_id, invitation_id, opts = {})
|
|
112
|
+
delete_api_workspaces_by_workspace_id_invitations_by_invitation_id_with_http_info(workspace_id, invitation_id, opts)
|
|
113
|
+
nil
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Revoke a pending invitation of a workspace you administer
|
|
117
|
+
# Audited (`team.invitation_revoked`).
|
|
118
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
119
|
+
# @param invitation_id [String]
|
|
120
|
+
# @param [Hash] opts the optional parameters
|
|
121
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
122
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
123
|
+
def delete_api_workspaces_by_workspace_id_invitations_by_invitation_id_with_http_info(workspace_id, invitation_id, opts = {})
|
|
124
|
+
if @api_client.config.debugging
|
|
125
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id ...'
|
|
126
|
+
end
|
|
127
|
+
# verify the required parameter 'workspace_id' is set
|
|
128
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
129
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id"
|
|
130
|
+
end
|
|
131
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
132
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id, the character length must be smaller than or equal to 128.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
136
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id, the character length must be great than or equal to 1.'
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# verify the required parameter 'invitation_id' is set
|
|
140
|
+
if @api_client.config.client_side_validation && invitation_id.nil?
|
|
141
|
+
fail ArgumentError, "Missing the required parameter 'invitation_id' when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id"
|
|
142
|
+
end
|
|
143
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
144
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id, the character length must be smaller than or equal to 255.'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
148
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id, the character length must be great than or equal to 1.'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# resource path
|
|
152
|
+
local_var_path = '/api/workspaces/{workspaceId}/invitations/{invitationId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
|
|
153
|
+
|
|
154
|
+
# query parameters
|
|
155
|
+
query_params = opts[:query_params] || {}
|
|
156
|
+
|
|
157
|
+
# header parameters
|
|
158
|
+
header_params = opts[:header_params] || {}
|
|
159
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
160
|
+
|
|
161
|
+
# form parameters
|
|
162
|
+
form_params = opts[:form_params] || {}
|
|
163
|
+
|
|
164
|
+
# http body (model)
|
|
165
|
+
post_body = opts[:debug_body]
|
|
166
|
+
|
|
167
|
+
# return_type
|
|
168
|
+
return_type = opts[:debug_return_type]
|
|
169
|
+
|
|
170
|
+
# auth_names
|
|
171
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
172
|
+
|
|
173
|
+
new_options = opts.merge(
|
|
174
|
+
:operation => :"WorkspaceApi.delete_api_workspaces_by_workspace_id_invitations_by_invitation_id",
|
|
175
|
+
:header_params => header_params,
|
|
176
|
+
:query_params => query_params,
|
|
177
|
+
:form_params => form_params,
|
|
178
|
+
:body => post_body,
|
|
179
|
+
:auth_names => auth_names,
|
|
180
|
+
:return_type => return_type
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
184
|
+
if @api_client.config.debugging
|
|
185
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#delete_api_workspaces_by_workspace_id_invitations_by_invitation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
186
|
+
end
|
|
187
|
+
return data, status_code, headers
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Revoke a key of a workspace you administer
|
|
191
|
+
# The key stops working at once on every API instance (idempotent: `alreadyRevoked`). Workspace admin keys answer 403 `ERR_ADMIN_KEY_DASHBOARD_ONLY`. Audited (`api_key.revoked`).
|
|
192
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
193
|
+
# @param key_id [String]
|
|
194
|
+
# @param [Hash] opts the optional parameters
|
|
195
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
196
|
+
# @return [DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response]
|
|
197
|
+
def delete_api_workspaces_by_workspace_id_keys_by_key_id(workspace_id, key_id, opts = {})
|
|
198
|
+
data, _status_code, _headers = delete_api_workspaces_by_workspace_id_keys_by_key_id_with_http_info(workspace_id, key_id, opts)
|
|
199
|
+
data
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Revoke a key of a workspace you administer
|
|
203
|
+
# The key stops working at once on every API instance (idempotent: `alreadyRevoked`). Workspace admin keys answer 403 `ERR_ADMIN_KEY_DASHBOARD_ONLY`. Audited (`api_key.revoked`).
|
|
204
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
205
|
+
# @param key_id [String]
|
|
206
|
+
# @param [Hash] opts the optional parameters
|
|
207
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
208
|
+
# @return [Array<(DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response, Integer, Hash)>] DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response data, response status code and response headers
|
|
209
|
+
def delete_api_workspaces_by_workspace_id_keys_by_key_id_with_http_info(workspace_id, key_id, opts = {})
|
|
210
|
+
if @api_client.config.debugging
|
|
211
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id ...'
|
|
212
|
+
end
|
|
213
|
+
# verify the required parameter 'workspace_id' is set
|
|
214
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
215
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id"
|
|
216
|
+
end
|
|
217
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
218
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be smaller than or equal to 128.'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
222
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be great than or equal to 1.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# verify the required parameter 'key_id' is set
|
|
226
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
227
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id"
|
|
228
|
+
end
|
|
229
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
230
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be smaller than or equal to 255.'
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
234
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be great than or equal to 1.'
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# resource path
|
|
238
|
+
local_var_path = '/api/workspaces/{workspaceId}/keys/{keyId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
|
|
239
|
+
|
|
240
|
+
# query parameters
|
|
241
|
+
query_params = opts[:query_params] || {}
|
|
242
|
+
|
|
243
|
+
# header parameters
|
|
244
|
+
header_params = opts[:header_params] || {}
|
|
245
|
+
# HTTP header 'Accept' (if needed)
|
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
247
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
248
|
+
|
|
249
|
+
# form parameters
|
|
250
|
+
form_params = opts[:form_params] || {}
|
|
251
|
+
|
|
252
|
+
# http body (model)
|
|
253
|
+
post_body = opts[:debug_body]
|
|
254
|
+
|
|
255
|
+
# return_type
|
|
256
|
+
return_type = opts[:debug_return_type] || 'DeleteApiWorkspacesByWorkspaceIdKeysByKeyId200Response'
|
|
257
|
+
|
|
258
|
+
# auth_names
|
|
259
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
260
|
+
|
|
261
|
+
new_options = opts.merge(
|
|
262
|
+
:operation => :"WorkspaceApi.delete_api_workspaces_by_workspace_id_keys_by_key_id",
|
|
263
|
+
:header_params => header_params,
|
|
264
|
+
:query_params => query_params,
|
|
265
|
+
:form_params => form_params,
|
|
266
|
+
:body => post_body,
|
|
267
|
+
:auth_names => auth_names,
|
|
268
|
+
:return_type => return_type
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#delete_api_workspaces_by_workspace_id_keys_by_key_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
274
|
+
end
|
|
275
|
+
return data, status_code, headers
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Remove a member from a workspace you administer
|
|
279
|
+
# Revokes the member's dashboard sessions there at once (and in the workspace's sandboxes). The last admin and the caller itself cannot be removed (409). Audited (`team.member_removed`).
|
|
280
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
281
|
+
# @param user_id [String]
|
|
282
|
+
# @param [Hash] opts the optional parameters
|
|
283
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
284
|
+
# @return [nil]
|
|
285
|
+
def delete_api_workspaces_by_workspace_id_members_by_user_id(workspace_id, user_id, opts = {})
|
|
286
|
+
delete_api_workspaces_by_workspace_id_members_by_user_id_with_http_info(workspace_id, user_id, opts)
|
|
287
|
+
nil
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Remove a member from a workspace you administer
|
|
291
|
+
# Revokes the member's dashboard sessions there at once (and in the workspace's sandboxes). The last admin and the caller itself cannot be removed (409). Audited (`team.member_removed`).
|
|
292
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
293
|
+
# @param user_id [String]
|
|
294
|
+
# @param [Hash] opts the optional parameters
|
|
295
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
296
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
297
|
+
def delete_api_workspaces_by_workspace_id_members_by_user_id_with_http_info(workspace_id, user_id, opts = {})
|
|
298
|
+
if @api_client.config.debugging
|
|
299
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id ...'
|
|
300
|
+
end
|
|
301
|
+
# verify the required parameter 'workspace_id' is set
|
|
302
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
303
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id"
|
|
304
|
+
end
|
|
305
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
306
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id, the character length must be smaller than or equal to 128.'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
310
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id, the character length must be great than or equal to 1.'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# verify the required parameter 'user_id' is set
|
|
314
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
315
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id"
|
|
316
|
+
end
|
|
317
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
318
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id, the character length must be smaller than or equal to 255.'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
322
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id, the character length must be great than or equal to 1.'
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# resource path
|
|
326
|
+
local_var_path = '/api/workspaces/{workspaceId}/members/{userId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
|
|
327
|
+
|
|
328
|
+
# query parameters
|
|
329
|
+
query_params = opts[:query_params] || {}
|
|
330
|
+
|
|
331
|
+
# header parameters
|
|
332
|
+
header_params = opts[:header_params] || {}
|
|
333
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
334
|
+
|
|
335
|
+
# form parameters
|
|
336
|
+
form_params = opts[:form_params] || {}
|
|
337
|
+
|
|
338
|
+
# http body (model)
|
|
339
|
+
post_body = opts[:debug_body]
|
|
340
|
+
|
|
341
|
+
# return_type
|
|
342
|
+
return_type = opts[:debug_return_type]
|
|
343
|
+
|
|
344
|
+
# auth_names
|
|
345
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
346
|
+
|
|
347
|
+
new_options = opts.merge(
|
|
348
|
+
:operation => :"WorkspaceApi.delete_api_workspaces_by_workspace_id_members_by_user_id",
|
|
349
|
+
:header_params => header_params,
|
|
350
|
+
:query_params => query_params,
|
|
351
|
+
:form_params => form_params,
|
|
352
|
+
:body => post_body,
|
|
353
|
+
:auth_names => auth_names,
|
|
354
|
+
:return_type => return_type
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
358
|
+
if @api_client.config.debugging
|
|
359
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#delete_api_workspaces_by_workspace_id_members_by_user_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
360
|
+
end
|
|
361
|
+
return data, status_code, headers
|
|
362
|
+
end
|
|
363
|
+
|
|
104
364
|
# Get workspace profile for the authenticated tenant
|
|
105
365
|
# Includes `publicKey` (`pub_…`) for `?workspaceKey=` on the viewer. The public key is not authentication — Bearer JWT or embed token is still required. `kind` is `sandbox` for a sandbox (`isTest: true`, see `/sandboxes`), with its production workspace in `parentWorkspaceId` and its last reset in `lastResetAt`.
|
|
106
366
|
# @param [Hash] opts the optional parameters
|
|
@@ -444,6 +704,8 @@ module SeatsChart
|
|
|
444
704
|
# @param [Hash] opts the optional parameters
|
|
445
705
|
# @option opts [String] :filter Case-insensitive substring of the workspace name or id (seats.io `filter`).
|
|
446
706
|
# @option opts [String] :status `active` (seats.io listActive), `inactive` (deactivated; seats.io listInactive) or `all` (default).
|
|
707
|
+
# @option opts [String] :external_id Only the workspace with this external id (your organizer id; exact match).
|
|
708
|
+
# @option opts [GetApiWorkspacesCreatedByApiParameter] :created_by_api `true`: only workspaces provisioned by a workspace admin key; `false`: only the others.
|
|
447
709
|
# @return [GetApiWorkspaces200Response]
|
|
448
710
|
def get_api_workspaces(opts = {})
|
|
449
711
|
data, _status_code, _headers = get_api_workspaces_with_http_info(opts)
|
|
@@ -455,6 +717,8 @@ module SeatsChart
|
|
|
455
717
|
# @param [Hash] opts the optional parameters
|
|
456
718
|
# @option opts [String] :filter Case-insensitive substring of the workspace name or id (seats.io `filter`).
|
|
457
719
|
# @option opts [String] :status `active` (seats.io listActive), `inactive` (deactivated; seats.io listInactive) or `all` (default).
|
|
720
|
+
# @option opts [String] :external_id Only the workspace with this external id (your organizer id; exact match).
|
|
721
|
+
# @option opts [GetApiWorkspacesCreatedByApiParameter] :created_by_api `true`: only workspaces provisioned by a workspace admin key; `false`: only the others.
|
|
458
722
|
# @return [Array<(GetApiWorkspaces200Response, Integer, Hash)>] GetApiWorkspaces200Response data, response status code and response headers
|
|
459
723
|
def get_api_workspaces_with_http_info(opts = {})
|
|
460
724
|
if @api_client.config.debugging
|
|
@@ -472,6 +736,19 @@ module SeatsChart
|
|
|
472
736
|
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
473
737
|
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
474
738
|
end
|
|
739
|
+
if @api_client.config.client_side_validation && !opts[:'external_id'].nil? && opts[:'external_id'].to_s.length > 128
|
|
740
|
+
fail ArgumentError, 'invalid value for "opts[:"external_id"]" when calling WorkspaceApi.get_api_workspaces, the character length must be smaller than or equal to 128.'
|
|
741
|
+
end
|
|
742
|
+
|
|
743
|
+
if @api_client.config.client_side_validation && !opts[:'external_id'].nil? && opts[:'external_id'].to_s.length < 1
|
|
744
|
+
fail ArgumentError, 'invalid value for "opts[:"external_id"]" when calling WorkspaceApi.get_api_workspaces, the character length must be great than or equal to 1.'
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
pattern = Regexp.new(/^[A-Za-z0-9_.~-]{1,128}$/)
|
|
748
|
+
if @api_client.config.client_side_validation && !opts[:'external_id'].nil? && opts[:'external_id'] !~ pattern
|
|
749
|
+
fail ArgumentError, "invalid value for 'opts[:\"external_id\"]' when calling WorkspaceApi.get_api_workspaces, must conform to the pattern #{pattern}."
|
|
750
|
+
end
|
|
751
|
+
|
|
475
752
|
# resource path
|
|
476
753
|
local_var_path = '/api/workspaces'
|
|
477
754
|
|
|
@@ -479,6 +756,8 @@ module SeatsChart
|
|
|
479
756
|
query_params = opts[:query_params] || {}
|
|
480
757
|
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
|
481
758
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
759
|
+
query_params[:'externalId'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
|
760
|
+
query_params[:'createdByApi'] = opts[:'created_by_api'] if !opts[:'created_by_api'].nil?
|
|
482
761
|
|
|
483
762
|
# header parameters
|
|
484
763
|
header_params = opts[:header_params] || {}
|
|
@@ -514,6 +793,82 @@ module SeatsChart
|
|
|
514
793
|
return data, status_code, headers
|
|
515
794
|
end
|
|
516
795
|
|
|
796
|
+
# Get one of my workspaces by its external id
|
|
797
|
+
# The workspace whose `externalId` (your organizer id, set at `POST /workspaces` or with `PATCH /workspaces/{workspaceId}`) is this value, among the workspaces the caller is a member of (404 otherwise: the call never reveals other accounts' workspaces). Same item as `GET /workspaces`. Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`).
|
|
798
|
+
# @param external_id [String]
|
|
799
|
+
# @param [Hash] opts the optional parameters
|
|
800
|
+
# @return [GetApiWorkspaces200ResponseItemsInner]
|
|
801
|
+
def get_api_workspaces_by_external_id_by_external_id(external_id, opts = {})
|
|
802
|
+
data, _status_code, _headers = get_api_workspaces_by_external_id_by_external_id_with_http_info(external_id, opts)
|
|
803
|
+
data
|
|
804
|
+
end
|
|
805
|
+
|
|
806
|
+
# Get one of my workspaces by its external id
|
|
807
|
+
# The workspace whose `externalId` (your organizer id, set at `POST /workspaces` or with `PATCH /workspaces/{workspaceId}`) is this value, among the workspaces the caller is a member of (404 otherwise: the call never reveals other accounts' workspaces). Same item as `GET /workspaces`. Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`).
|
|
808
|
+
# @param external_id [String]
|
|
809
|
+
# @param [Hash] opts the optional parameters
|
|
810
|
+
# @return [Array<(GetApiWorkspaces200ResponseItemsInner, Integer, Hash)>] GetApiWorkspaces200ResponseItemsInner data, response status code and response headers
|
|
811
|
+
def get_api_workspaces_by_external_id_by_external_id_with_http_info(external_id, opts = {})
|
|
812
|
+
if @api_client.config.debugging
|
|
813
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.get_api_workspaces_by_external_id_by_external_id ...'
|
|
814
|
+
end
|
|
815
|
+
# verify the required parameter 'external_id' is set
|
|
816
|
+
if @api_client.config.client_side_validation && external_id.nil?
|
|
817
|
+
fail ArgumentError, "Missing the required parameter 'external_id' when calling WorkspaceApi.get_api_workspaces_by_external_id_by_external_id"
|
|
818
|
+
end
|
|
819
|
+
if @api_client.config.client_side_validation && external_id.to_s.length > 128
|
|
820
|
+
fail ArgumentError, 'invalid value for "external_id" when calling WorkspaceApi.get_api_workspaces_by_external_id_by_external_id, the character length must be smaller than or equal to 128.'
|
|
821
|
+
end
|
|
822
|
+
|
|
823
|
+
if @api_client.config.client_side_validation && external_id.to_s.length < 1
|
|
824
|
+
fail ArgumentError, 'invalid value for "external_id" when calling WorkspaceApi.get_api_workspaces_by_external_id_by_external_id, the character length must be great than or equal to 1.'
|
|
825
|
+
end
|
|
826
|
+
|
|
827
|
+
pattern = Regexp.new(/^[A-Za-z0-9_.~-]{1,128}$/)
|
|
828
|
+
if @api_client.config.client_side_validation && external_id !~ pattern
|
|
829
|
+
fail ArgumentError, "invalid value for 'external_id' when calling WorkspaceApi.get_api_workspaces_by_external_id_by_external_id, must conform to the pattern #{pattern}."
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
# resource path
|
|
833
|
+
local_var_path = '/api/workspaces/by-external-id/{externalId}'.sub('{' + 'externalId' + '}', CGI.escape(external_id.to_s))
|
|
834
|
+
|
|
835
|
+
# query parameters
|
|
836
|
+
query_params = opts[:query_params] || {}
|
|
837
|
+
|
|
838
|
+
# header parameters
|
|
839
|
+
header_params = opts[:header_params] || {}
|
|
840
|
+
# HTTP header 'Accept' (if needed)
|
|
841
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
842
|
+
|
|
843
|
+
# form parameters
|
|
844
|
+
form_params = opts[:form_params] || {}
|
|
845
|
+
|
|
846
|
+
# http body (model)
|
|
847
|
+
post_body = opts[:debug_body]
|
|
848
|
+
|
|
849
|
+
# return_type
|
|
850
|
+
return_type = opts[:debug_return_type] || 'GetApiWorkspaces200ResponseItemsInner'
|
|
851
|
+
|
|
852
|
+
# auth_names
|
|
853
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
854
|
+
|
|
855
|
+
new_options = opts.merge(
|
|
856
|
+
:operation => :"WorkspaceApi.get_api_workspaces_by_external_id_by_external_id",
|
|
857
|
+
:header_params => header_params,
|
|
858
|
+
:query_params => query_params,
|
|
859
|
+
:form_params => form_params,
|
|
860
|
+
:body => post_body,
|
|
861
|
+
:auth_names => auth_names,
|
|
862
|
+
:return_type => return_type
|
|
863
|
+
)
|
|
864
|
+
|
|
865
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
866
|
+
if @api_client.config.debugging
|
|
867
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#get_api_workspaces_by_external_id_by_external_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
868
|
+
end
|
|
869
|
+
return data, status_code, headers
|
|
870
|
+
end
|
|
871
|
+
|
|
517
872
|
# Get one of my workspaces
|
|
518
873
|
# Same item as GET /workspaces for one workspace the caller is a member of (404 otherwise). Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`).
|
|
519
874
|
# @param workspace_id [String]
|
|
@@ -585,22 +940,367 @@ module SeatsChart
|
|
|
585
940
|
return data, status_code, headers
|
|
586
941
|
end
|
|
587
942
|
|
|
588
|
-
#
|
|
589
|
-
# @param
|
|
943
|
+
# List the pending invitations of a workspace you administer
|
|
944
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
590
945
|
# @param [Hash] opts the optional parameters
|
|
591
|
-
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
592
946
|
# @return [nil]
|
|
593
|
-
def
|
|
594
|
-
|
|
947
|
+
def get_api_workspaces_by_workspace_id_invitations(workspace_id, opts = {})
|
|
948
|
+
get_api_workspaces_by_workspace_id_invitations_with_http_info(workspace_id, opts)
|
|
595
949
|
nil
|
|
596
950
|
end
|
|
597
951
|
|
|
598
|
-
#
|
|
599
|
-
# @param
|
|
952
|
+
# List the pending invitations of a workspace you administer
|
|
953
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
600
954
|
# @param [Hash] opts the optional parameters
|
|
601
|
-
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
602
955
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
603
|
-
def
|
|
956
|
+
def get_api_workspaces_by_workspace_id_invitations_with_http_info(workspace_id, opts = {})
|
|
957
|
+
if @api_client.config.debugging
|
|
958
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.get_api_workspaces_by_workspace_id_invitations ...'
|
|
959
|
+
end
|
|
960
|
+
# verify the required parameter 'workspace_id' is set
|
|
961
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
962
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.get_api_workspaces_by_workspace_id_invitations"
|
|
963
|
+
end
|
|
964
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
965
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.get_api_workspaces_by_workspace_id_invitations, the character length must be smaller than or equal to 128.'
|
|
966
|
+
end
|
|
967
|
+
|
|
968
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
969
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.get_api_workspaces_by_workspace_id_invitations, the character length must be great than or equal to 1.'
|
|
970
|
+
end
|
|
971
|
+
|
|
972
|
+
# resource path
|
|
973
|
+
local_var_path = '/api/workspaces/{workspaceId}/invitations'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
974
|
+
|
|
975
|
+
# query parameters
|
|
976
|
+
query_params = opts[:query_params] || {}
|
|
977
|
+
|
|
978
|
+
# header parameters
|
|
979
|
+
header_params = opts[:header_params] || {}
|
|
980
|
+
|
|
981
|
+
# form parameters
|
|
982
|
+
form_params = opts[:form_params] || {}
|
|
983
|
+
|
|
984
|
+
# http body (model)
|
|
985
|
+
post_body = opts[:debug_body]
|
|
986
|
+
|
|
987
|
+
# return_type
|
|
988
|
+
return_type = opts[:debug_return_type]
|
|
989
|
+
|
|
990
|
+
# auth_names
|
|
991
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
992
|
+
|
|
993
|
+
new_options = opts.merge(
|
|
994
|
+
:operation => :"WorkspaceApi.get_api_workspaces_by_workspace_id_invitations",
|
|
995
|
+
:header_params => header_params,
|
|
996
|
+
:query_params => query_params,
|
|
997
|
+
:form_params => form_params,
|
|
998
|
+
:body => post_body,
|
|
999
|
+
:auth_names => auth_names,
|
|
1000
|
+
:return_type => return_type
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1004
|
+
if @api_client.config.debugging
|
|
1005
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#get_api_workspaces_by_workspace_id_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1006
|
+
end
|
|
1007
|
+
return data, status_code, headers
|
|
1008
|
+
end
|
|
1009
|
+
|
|
1010
|
+
# List the API keys of a workspace you administer
|
|
1011
|
+
# Live keys of the workspace (prefix fingerprint only, never a secret), newest first. Dashboard session or a **workspace admin API key**; the caller (for a key: the admin it is bound to, re-checked on every call) must administer the workspace: 404 otherwise, also for another account's workspace.
|
|
1012
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
1013
|
+
# @param [Hash] opts the optional parameters
|
|
1014
|
+
# @return [GetApiWorkspacesByWorkspaceIdKeys200Response]
|
|
1015
|
+
def get_api_workspaces_by_workspace_id_keys(workspace_id, opts = {})
|
|
1016
|
+
data, _status_code, _headers = get_api_workspaces_by_workspace_id_keys_with_http_info(workspace_id, opts)
|
|
1017
|
+
data
|
|
1018
|
+
end
|
|
1019
|
+
|
|
1020
|
+
# List the API keys of a workspace you administer
|
|
1021
|
+
# Live keys of the workspace (prefix fingerprint only, never a secret), newest first. Dashboard session or a **workspace admin API key**; the caller (for a key: the admin it is bound to, re-checked on every call) must administer the workspace: 404 otherwise, also for another account's workspace.
|
|
1022
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
1023
|
+
# @param [Hash] opts the optional parameters
|
|
1024
|
+
# @return [Array<(GetApiWorkspacesByWorkspaceIdKeys200Response, Integer, Hash)>] GetApiWorkspacesByWorkspaceIdKeys200Response data, response status code and response headers
|
|
1025
|
+
def get_api_workspaces_by_workspace_id_keys_with_http_info(workspace_id, opts = {})
|
|
1026
|
+
if @api_client.config.debugging
|
|
1027
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.get_api_workspaces_by_workspace_id_keys ...'
|
|
1028
|
+
end
|
|
1029
|
+
# verify the required parameter 'workspace_id' is set
|
|
1030
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1031
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.get_api_workspaces_by_workspace_id_keys"
|
|
1032
|
+
end
|
|
1033
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
1034
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.get_api_workspaces_by_workspace_id_keys, the character length must be smaller than or equal to 128.'
|
|
1035
|
+
end
|
|
1036
|
+
|
|
1037
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
1038
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.get_api_workspaces_by_workspace_id_keys, the character length must be great than or equal to 1.'
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
# resource path
|
|
1042
|
+
local_var_path = '/api/workspaces/{workspaceId}/keys'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
1043
|
+
|
|
1044
|
+
# query parameters
|
|
1045
|
+
query_params = opts[:query_params] || {}
|
|
1046
|
+
|
|
1047
|
+
# header parameters
|
|
1048
|
+
header_params = opts[:header_params] || {}
|
|
1049
|
+
# HTTP header 'Accept' (if needed)
|
|
1050
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
1051
|
+
|
|
1052
|
+
# form parameters
|
|
1053
|
+
form_params = opts[:form_params] || {}
|
|
1054
|
+
|
|
1055
|
+
# http body (model)
|
|
1056
|
+
post_body = opts[:debug_body]
|
|
1057
|
+
|
|
1058
|
+
# return_type
|
|
1059
|
+
return_type = opts[:debug_return_type] || 'GetApiWorkspacesByWorkspaceIdKeys200Response'
|
|
1060
|
+
|
|
1061
|
+
# auth_names
|
|
1062
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
1063
|
+
|
|
1064
|
+
new_options = opts.merge(
|
|
1065
|
+
:operation => :"WorkspaceApi.get_api_workspaces_by_workspace_id_keys",
|
|
1066
|
+
:header_params => header_params,
|
|
1067
|
+
:query_params => query_params,
|
|
1068
|
+
:form_params => form_params,
|
|
1069
|
+
:body => post_body,
|
|
1070
|
+
:auth_names => auth_names,
|
|
1071
|
+
:return_type => return_type
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1075
|
+
if @api_client.config.debugging
|
|
1076
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#get_api_workspaces_by_workspace_id_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1077
|
+
end
|
|
1078
|
+
return data, status_code, headers
|
|
1079
|
+
end
|
|
1080
|
+
|
|
1081
|
+
# List the members of a workspace you administer
|
|
1082
|
+
# Dashboard members with role, join date and `twoFactorEnabled`. Dashboard session or a workspace admin API key.
|
|
1083
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
1084
|
+
# @param [Hash] opts the optional parameters
|
|
1085
|
+
# @return [nil]
|
|
1086
|
+
def get_api_workspaces_by_workspace_id_members(workspace_id, opts = {})
|
|
1087
|
+
get_api_workspaces_by_workspace_id_members_with_http_info(workspace_id, opts)
|
|
1088
|
+
nil
|
|
1089
|
+
end
|
|
1090
|
+
|
|
1091
|
+
# List the members of a workspace you administer
|
|
1092
|
+
# Dashboard members with role, join date and `twoFactorEnabled`. Dashboard session or a workspace admin API key.
|
|
1093
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
1094
|
+
# @param [Hash] opts the optional parameters
|
|
1095
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1096
|
+
def get_api_workspaces_by_workspace_id_members_with_http_info(workspace_id, opts = {})
|
|
1097
|
+
if @api_client.config.debugging
|
|
1098
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.get_api_workspaces_by_workspace_id_members ...'
|
|
1099
|
+
end
|
|
1100
|
+
# verify the required parameter 'workspace_id' is set
|
|
1101
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1102
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.get_api_workspaces_by_workspace_id_members"
|
|
1103
|
+
end
|
|
1104
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
1105
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.get_api_workspaces_by_workspace_id_members, the character length must be smaller than or equal to 128.'
|
|
1106
|
+
end
|
|
1107
|
+
|
|
1108
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
1109
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.get_api_workspaces_by_workspace_id_members, the character length must be great than or equal to 1.'
|
|
1110
|
+
end
|
|
1111
|
+
|
|
1112
|
+
# resource path
|
|
1113
|
+
local_var_path = '/api/workspaces/{workspaceId}/members'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
1114
|
+
|
|
1115
|
+
# query parameters
|
|
1116
|
+
query_params = opts[:query_params] || {}
|
|
1117
|
+
|
|
1118
|
+
# header parameters
|
|
1119
|
+
header_params = opts[:header_params] || {}
|
|
1120
|
+
|
|
1121
|
+
# form parameters
|
|
1122
|
+
form_params = opts[:form_params] || {}
|
|
1123
|
+
|
|
1124
|
+
# http body (model)
|
|
1125
|
+
post_body = opts[:debug_body]
|
|
1126
|
+
|
|
1127
|
+
# return_type
|
|
1128
|
+
return_type = opts[:debug_return_type]
|
|
1129
|
+
|
|
1130
|
+
# auth_names
|
|
1131
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
1132
|
+
|
|
1133
|
+
new_options = opts.merge(
|
|
1134
|
+
:operation => :"WorkspaceApi.get_api_workspaces_by_workspace_id_members",
|
|
1135
|
+
:header_params => header_params,
|
|
1136
|
+
:query_params => query_params,
|
|
1137
|
+
:form_params => form_params,
|
|
1138
|
+
:body => post_body,
|
|
1139
|
+
:auth_names => auth_names,
|
|
1140
|
+
:return_type => return_type
|
|
1141
|
+
)
|
|
1142
|
+
|
|
1143
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1144
|
+
if @api_client.config.debugging
|
|
1145
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#get_api_workspaces_by_workspace_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1146
|
+
end
|
|
1147
|
+
return data, status_code, headers
|
|
1148
|
+
end
|
|
1149
|
+
|
|
1150
|
+
# Consolidated overview of the organizer workspaces you administer
|
|
1151
|
+
# One call for the platform view: every production workspace the caller administers (for a workspace admin key: its admin), newest first, with charts (not archived), events, seats `sold` / `held` / `available` (numbered seats for sale plus general admission places; held = numbered seats under a hold now, read from Redis for current and upcoming events), `revenue` and the used objects of `month`, plus `totals` over every workspace matching the filters (not only this page). `revenue.cents` is the catalog price of the sold seats and is known only when the workspace takes prices from SeatsChart (`pricingSource: seatschart_catalog`); with partner or synced pricing the platform owns the amounts (`known: false`, `cents: null`; `totals.revenue.complete` says whether every workspace was known). Sold and available come from PostgreSQL, holds from Redis. Filters: `externalId`, `status`, `createdByApi`, creation date range `createdFrom` / `createdTo`. Paginated with `limit` / `nextCursor`. Dashboard session or a workspace admin API key.
|
|
1152
|
+
# @param [Hash] opts the optional parameters
|
|
1153
|
+
# @option opts [String] :external_id Only this organizer.
|
|
1154
|
+
# @option opts [String] :status Default `all`.
|
|
1155
|
+
# @option opts [GetApiWorkspacesOverviewCreatedByApiParameter] :created_by_api `true`: only workspaces provisioned by a workspace admin key.
|
|
1156
|
+
# @option opts [String] :created_from Workspaces created at or after this date / date-time (ISO 8601).
|
|
1157
|
+
# @option opts [String] :created_to Workspaces created at or before this date (whole UTC day) / date-time.
|
|
1158
|
+
# @option opts [String] :month Usage month `YYYY-MM` (default: the current UTC month).
|
|
1159
|
+
# @option opts [Float] :limit Page size (1..200, default 50).
|
|
1160
|
+
# @option opts [String] :cursor Opaque `nextCursor` of the previous page.
|
|
1161
|
+
# @return [nil]
|
|
1162
|
+
def get_api_workspaces_overview(opts = {})
|
|
1163
|
+
get_api_workspaces_overview_with_http_info(opts)
|
|
1164
|
+
nil
|
|
1165
|
+
end
|
|
1166
|
+
|
|
1167
|
+
# Consolidated overview of the organizer workspaces you administer
|
|
1168
|
+
# One call for the platform view: every production workspace the caller administers (for a workspace admin key: its admin), newest first, with charts (not archived), events, seats `sold` / `held` / `available` (numbered seats for sale plus general admission places; held = numbered seats under a hold now, read from Redis for current and upcoming events), `revenue` and the used objects of `month`, plus `totals` over every workspace matching the filters (not only this page). `revenue.cents` is the catalog price of the sold seats and is known only when the workspace takes prices from SeatsChart (`pricingSource: seatschart_catalog`); with partner or synced pricing the platform owns the amounts (`known: false`, `cents: null`; `totals.revenue.complete` says whether every workspace was known). Sold and available come from PostgreSQL, holds from Redis. Filters: `externalId`, `status`, `createdByApi`, creation date range `createdFrom` / `createdTo`. Paginated with `limit` / `nextCursor`. Dashboard session or a workspace admin API key.
|
|
1169
|
+
# @param [Hash] opts the optional parameters
|
|
1170
|
+
# @option opts [String] :external_id Only this organizer.
|
|
1171
|
+
# @option opts [String] :status Default `all`.
|
|
1172
|
+
# @option opts [GetApiWorkspacesOverviewCreatedByApiParameter] :created_by_api `true`: only workspaces provisioned by a workspace admin key.
|
|
1173
|
+
# @option opts [String] :created_from Workspaces created at or after this date / date-time (ISO 8601).
|
|
1174
|
+
# @option opts [String] :created_to Workspaces created at or before this date (whole UTC day) / date-time.
|
|
1175
|
+
# @option opts [String] :month Usage month `YYYY-MM` (default: the current UTC month).
|
|
1176
|
+
# @option opts [Float] :limit Page size (1..200, default 50).
|
|
1177
|
+
# @option opts [String] :cursor Opaque `nextCursor` of the previous page.
|
|
1178
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1179
|
+
def get_api_workspaces_overview_with_http_info(opts = {})
|
|
1180
|
+
if @api_client.config.debugging
|
|
1181
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.get_api_workspaces_overview ...'
|
|
1182
|
+
end
|
|
1183
|
+
if @api_client.config.client_side_validation && !opts[:'external_id'].nil? && opts[:'external_id'].to_s.length > 128
|
|
1184
|
+
fail ArgumentError, 'invalid value for "opts[:"external_id"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be smaller than or equal to 128.'
|
|
1185
|
+
end
|
|
1186
|
+
|
|
1187
|
+
if @api_client.config.client_side_validation && !opts[:'external_id'].nil? && opts[:'external_id'].to_s.length < 1
|
|
1188
|
+
fail ArgumentError, 'invalid value for "opts[:"external_id"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be great than or equal to 1.'
|
|
1189
|
+
end
|
|
1190
|
+
|
|
1191
|
+
pattern = Regexp.new(/^[A-Za-z0-9_.~-]{1,128}$/)
|
|
1192
|
+
if @api_client.config.client_side_validation && !opts[:'external_id'].nil? && opts[:'external_id'] !~ pattern
|
|
1193
|
+
fail ArgumentError, "invalid value for 'opts[:\"external_id\"]' when calling WorkspaceApi.get_api_workspaces_overview, must conform to the pattern #{pattern}."
|
|
1194
|
+
end
|
|
1195
|
+
|
|
1196
|
+
allowable_values = ["active", "inactive", "all"]
|
|
1197
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
1198
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
1199
|
+
end
|
|
1200
|
+
if @api_client.config.client_side_validation && !opts[:'created_from'].nil? && opts[:'created_from'].to_s.length > 40
|
|
1201
|
+
fail ArgumentError, 'invalid value for "opts[:"created_from"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be smaller than or equal to 40.'
|
|
1202
|
+
end
|
|
1203
|
+
|
|
1204
|
+
if @api_client.config.client_side_validation && !opts[:'created_from'].nil? && opts[:'created_from'].to_s.length < 10
|
|
1205
|
+
fail ArgumentError, 'invalid value for "opts[:"created_from"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be great than or equal to 10.'
|
|
1206
|
+
end
|
|
1207
|
+
|
|
1208
|
+
if @api_client.config.client_side_validation && !opts[:'created_to'].nil? && opts[:'created_to'].to_s.length > 40
|
|
1209
|
+
fail ArgumentError, 'invalid value for "opts[:"created_to"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be smaller than or equal to 40.'
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
if @api_client.config.client_side_validation && !opts[:'created_to'].nil? && opts[:'created_to'].to_s.length < 10
|
|
1213
|
+
fail ArgumentError, 'invalid value for "opts[:"created_to"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be great than or equal to 10.'
|
|
1214
|
+
end
|
|
1215
|
+
|
|
1216
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
1217
|
+
if @api_client.config.client_side_validation && !opts[:'month'].nil? && opts[:'month'] !~ pattern
|
|
1218
|
+
fail ArgumentError, "invalid value for 'opts[:\"month\"]' when calling WorkspaceApi.get_api_workspaces_overview, must conform to the pattern #{pattern}."
|
|
1219
|
+
end
|
|
1220
|
+
|
|
1221
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1222
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WorkspaceApi.get_api_workspaces_overview, must be smaller than or equal to 200.'
|
|
1223
|
+
end
|
|
1224
|
+
|
|
1225
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1226
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WorkspaceApi.get_api_workspaces_overview, must be greater than or equal to 1.'
|
|
1227
|
+
end
|
|
1228
|
+
|
|
1229
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 64
|
|
1230
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be smaller than or equal to 64.'
|
|
1231
|
+
end
|
|
1232
|
+
|
|
1233
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
|
|
1234
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling WorkspaceApi.get_api_workspaces_overview, the character length must be great than or equal to 1.'
|
|
1235
|
+
end
|
|
1236
|
+
|
|
1237
|
+
pattern = Regexp.new(/^[A-Za-z0-9_-]+$/)
|
|
1238
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'] !~ pattern
|
|
1239
|
+
fail ArgumentError, "invalid value for 'opts[:\"cursor\"]' when calling WorkspaceApi.get_api_workspaces_overview, must conform to the pattern #{pattern}."
|
|
1240
|
+
end
|
|
1241
|
+
|
|
1242
|
+
# resource path
|
|
1243
|
+
local_var_path = '/api/workspaces/overview'
|
|
1244
|
+
|
|
1245
|
+
# query parameters
|
|
1246
|
+
query_params = opts[:query_params] || {}
|
|
1247
|
+
query_params[:'externalId'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
|
1248
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
1249
|
+
query_params[:'createdByApi'] = opts[:'created_by_api'] if !opts[:'created_by_api'].nil?
|
|
1250
|
+
query_params[:'createdFrom'] = opts[:'created_from'] if !opts[:'created_from'].nil?
|
|
1251
|
+
query_params[:'createdTo'] = opts[:'created_to'] if !opts[:'created_to'].nil?
|
|
1252
|
+
query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil?
|
|
1253
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1254
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1255
|
+
|
|
1256
|
+
# header parameters
|
|
1257
|
+
header_params = opts[:header_params] || {}
|
|
1258
|
+
|
|
1259
|
+
# form parameters
|
|
1260
|
+
form_params = opts[:form_params] || {}
|
|
1261
|
+
|
|
1262
|
+
# http body (model)
|
|
1263
|
+
post_body = opts[:debug_body]
|
|
1264
|
+
|
|
1265
|
+
# return_type
|
|
1266
|
+
return_type = opts[:debug_return_type]
|
|
1267
|
+
|
|
1268
|
+
# auth_names
|
|
1269
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
1270
|
+
|
|
1271
|
+
new_options = opts.merge(
|
|
1272
|
+
:operation => :"WorkspaceApi.get_api_workspaces_overview",
|
|
1273
|
+
:header_params => header_params,
|
|
1274
|
+
:query_params => query_params,
|
|
1275
|
+
:form_params => form_params,
|
|
1276
|
+
:body => post_body,
|
|
1277
|
+
:auth_names => auth_names,
|
|
1278
|
+
:return_type => return_type
|
|
1279
|
+
)
|
|
1280
|
+
|
|
1281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1282
|
+
if @api_client.config.debugging
|
|
1283
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#get_api_workspaces_overview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1284
|
+
end
|
|
1285
|
+
return data, status_code, headers
|
|
1286
|
+
end
|
|
1287
|
+
|
|
1288
|
+
# Update workspace display name
|
|
1289
|
+
# @param patch_api_workspace_request [PatchApiWorkspaceRequest]
|
|
1290
|
+
# @param [Hash] opts the optional parameters
|
|
1291
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1292
|
+
# @return [nil]
|
|
1293
|
+
def patch_api_workspace(patch_api_workspace_request, opts = {})
|
|
1294
|
+
patch_api_workspace_with_http_info(patch_api_workspace_request, opts)
|
|
1295
|
+
nil
|
|
1296
|
+
end
|
|
1297
|
+
|
|
1298
|
+
# Update workspace display name
|
|
1299
|
+
# @param patch_api_workspace_request [PatchApiWorkspaceRequest]
|
|
1300
|
+
# @param [Hash] opts the optional parameters
|
|
1301
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1302
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1303
|
+
def patch_api_workspace_with_http_info(patch_api_workspace_request, opts = {})
|
|
604
1304
|
if @api_client.config.debugging
|
|
605
1305
|
@api_client.config.logger.debug 'Calling API: WorkspaceApi.patch_api_workspace ...'
|
|
606
1306
|
end
|
|
@@ -968,26 +1668,26 @@ module SeatsChart
|
|
|
968
1668
|
return data, status_code, headers
|
|
969
1669
|
end
|
|
970
1670
|
|
|
971
|
-
# Rename one of my workspaces
|
|
972
|
-
# Sets `displayName` (1–512 characters)
|
|
1671
|
+
# Rename one of my workspaces or change its external id
|
|
1672
|
+
# Sets `displayName` (1–512 characters) and/or `externalId`. The caller (for a workspace admin key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent; written to the audit log (`workspace.rename`, `workspace.external_id.update`). A changed external id takes effect at once for `X-Workspace-Key` on every API instance (the old value stops resolving).
|
|
973
1673
|
# @param workspace_id [String]
|
|
974
|
-
# @param
|
|
1674
|
+
# @param patch_api_workspaces_by_workspace_id_request [PatchApiWorkspacesByWorkspaceIdRequest]
|
|
975
1675
|
# @param [Hash] opts the optional parameters
|
|
976
1676
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
977
1677
|
# @return [GetApiWorkspaces200ResponseItemsInner]
|
|
978
|
-
def patch_api_workspaces_by_workspace_id(workspace_id,
|
|
979
|
-
data, _status_code, _headers = patch_api_workspaces_by_workspace_id_with_http_info(workspace_id,
|
|
1678
|
+
def patch_api_workspaces_by_workspace_id(workspace_id, patch_api_workspaces_by_workspace_id_request, opts = {})
|
|
1679
|
+
data, _status_code, _headers = patch_api_workspaces_by_workspace_id_with_http_info(workspace_id, patch_api_workspaces_by_workspace_id_request, opts)
|
|
980
1680
|
data
|
|
981
1681
|
end
|
|
982
1682
|
|
|
983
|
-
# Rename one of my workspaces
|
|
984
|
-
# Sets `displayName` (1–512 characters)
|
|
1683
|
+
# Rename one of my workspaces or change its external id
|
|
1684
|
+
# Sets `displayName` (1–512 characters) and/or `externalId`. The caller (for a workspace admin key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent; written to the audit log (`workspace.rename`, `workspace.external_id.update`). A changed external id takes effect at once for `X-Workspace-Key` on every API instance (the old value stops resolving).
|
|
985
1685
|
# @param workspace_id [String]
|
|
986
|
-
# @param
|
|
1686
|
+
# @param patch_api_workspaces_by_workspace_id_request [PatchApiWorkspacesByWorkspaceIdRequest]
|
|
987
1687
|
# @param [Hash] opts the optional parameters
|
|
988
1688
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
989
1689
|
# @return [Array<(GetApiWorkspaces200ResponseItemsInner, Integer, Hash)>] GetApiWorkspaces200ResponseItemsInner data, response status code and response headers
|
|
990
|
-
def patch_api_workspaces_by_workspace_id_with_http_info(workspace_id,
|
|
1690
|
+
def patch_api_workspaces_by_workspace_id_with_http_info(workspace_id, patch_api_workspaces_by_workspace_id_request, opts = {})
|
|
991
1691
|
if @api_client.config.debugging
|
|
992
1692
|
@api_client.config.logger.debug 'Calling API: WorkspaceApi.patch_api_workspaces_by_workspace_id ...'
|
|
993
1693
|
end
|
|
@@ -1003,9 +1703,9 @@ module SeatsChart
|
|
|
1003
1703
|
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.patch_api_workspaces_by_workspace_id, the character length must be great than or equal to 1.'
|
|
1004
1704
|
end
|
|
1005
1705
|
|
|
1006
|
-
# verify the required parameter '
|
|
1007
|
-
if @api_client.config.client_side_validation &&
|
|
1008
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1706
|
+
# verify the required parameter 'patch_api_workspaces_by_workspace_id_request' is set
|
|
1707
|
+
if @api_client.config.client_side_validation && patch_api_workspaces_by_workspace_id_request.nil?
|
|
1708
|
+
fail ArgumentError, "Missing the required parameter 'patch_api_workspaces_by_workspace_id_request' when calling WorkspaceApi.patch_api_workspaces_by_workspace_id"
|
|
1009
1709
|
end
|
|
1010
1710
|
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
1011
1711
|
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.patch_api_workspaces_by_workspace_id, the character length must be smaller than or equal to 255.'
|
|
@@ -1036,7 +1736,7 @@ module SeatsChart
|
|
|
1036
1736
|
form_params = opts[:form_params] || {}
|
|
1037
1737
|
|
|
1038
1738
|
# http body (model)
|
|
1039
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
1739
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_api_workspaces_by_workspace_id_request)
|
|
1040
1740
|
|
|
1041
1741
|
# return_type
|
|
1042
1742
|
return_type = opts[:debug_return_type] || 'GetApiWorkspaces200ResponseItemsInner'
|
|
@@ -1061,18 +1761,117 @@ module SeatsChart
|
|
|
1061
1761
|
return data, status_code, headers
|
|
1062
1762
|
end
|
|
1063
1763
|
|
|
1064
|
-
#
|
|
1065
|
-
#
|
|
1764
|
+
# Rename a key of a workspace you administer or change its scopes
|
|
1765
|
+
# Takes effect on the next request (the auth cache entry is dropped); the secret is unchanged. Workspace admin keys answer 403 `ERR_ADMIN_KEY_DASHBOARD_ONLY`. Audited (`api_key.updated`).
|
|
1766
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
1767
|
+
# @param key_id [String]
|
|
1768
|
+
# @param patch_api_workspaces_by_workspace_id_keys_by_key_id_request [PatchApiWorkspacesByWorkspaceIdKeysByKeyIdRequest]
|
|
1066
1769
|
# @param [Hash] opts the optional parameters
|
|
1067
1770
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1068
|
-
# @return [
|
|
1069
|
-
def
|
|
1070
|
-
|
|
1071
|
-
|
|
1771
|
+
# @return [PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response]
|
|
1772
|
+
def patch_api_workspaces_by_workspace_id_keys_by_key_id(workspace_id, key_id, patch_api_workspaces_by_workspace_id_keys_by_key_id_request, opts = {})
|
|
1773
|
+
data, _status_code, _headers = patch_api_workspaces_by_workspace_id_keys_by_key_id_with_http_info(workspace_id, key_id, patch_api_workspaces_by_workspace_id_keys_by_key_id_request, opts)
|
|
1774
|
+
data
|
|
1072
1775
|
end
|
|
1073
1776
|
|
|
1074
|
-
#
|
|
1075
|
-
#
|
|
1777
|
+
# Rename a key of a workspace you administer or change its scopes
|
|
1778
|
+
# Takes effect on the next request (the auth cache entry is dropped); the secret is unchanged. Workspace admin keys answer 403 `ERR_ADMIN_KEY_DASHBOARD_ONLY`. Audited (`api_key.updated`).
|
|
1779
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
1780
|
+
# @param key_id [String]
|
|
1781
|
+
# @param patch_api_workspaces_by_workspace_id_keys_by_key_id_request [PatchApiWorkspacesByWorkspaceIdKeysByKeyIdRequest]
|
|
1782
|
+
# @param [Hash] opts the optional parameters
|
|
1783
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1784
|
+
# @return [Array<(PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response, Integer, Hash)>] PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response data, response status code and response headers
|
|
1785
|
+
def patch_api_workspaces_by_workspace_id_keys_by_key_id_with_http_info(workspace_id, key_id, patch_api_workspaces_by_workspace_id_keys_by_key_id_request, opts = {})
|
|
1786
|
+
if @api_client.config.debugging
|
|
1787
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id ...'
|
|
1788
|
+
end
|
|
1789
|
+
# verify the required parameter 'workspace_id' is set
|
|
1790
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
1791
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id"
|
|
1792
|
+
end
|
|
1793
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
1794
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be smaller than or equal to 128.'
|
|
1795
|
+
end
|
|
1796
|
+
|
|
1797
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
1798
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be great than or equal to 1.'
|
|
1799
|
+
end
|
|
1800
|
+
|
|
1801
|
+
# verify the required parameter 'key_id' is set
|
|
1802
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
1803
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id"
|
|
1804
|
+
end
|
|
1805
|
+
# verify the required parameter 'patch_api_workspaces_by_workspace_id_keys_by_key_id_request' is set
|
|
1806
|
+
if @api_client.config.client_side_validation && patch_api_workspaces_by_workspace_id_keys_by_key_id_request.nil?
|
|
1807
|
+
fail ArgumentError, "Missing the required parameter 'patch_api_workspaces_by_workspace_id_keys_by_key_id_request' when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id"
|
|
1808
|
+
end
|
|
1809
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
1810
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be smaller than or equal to 255.'
|
|
1811
|
+
end
|
|
1812
|
+
|
|
1813
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
1814
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id, the character length must be great than or equal to 1.'
|
|
1815
|
+
end
|
|
1816
|
+
|
|
1817
|
+
# resource path
|
|
1818
|
+
local_var_path = '/api/workspaces/{workspaceId}/keys/{keyId}'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
|
|
1819
|
+
|
|
1820
|
+
# query parameters
|
|
1821
|
+
query_params = opts[:query_params] || {}
|
|
1822
|
+
|
|
1823
|
+
# header parameters
|
|
1824
|
+
header_params = opts[:header_params] || {}
|
|
1825
|
+
# HTTP header 'Accept' (if needed)
|
|
1826
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
1827
|
+
# HTTP header 'Content-Type'
|
|
1828
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
1829
|
+
if !content_type.nil?
|
|
1830
|
+
header_params['Content-Type'] = content_type
|
|
1831
|
+
end
|
|
1832
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
1833
|
+
|
|
1834
|
+
# form parameters
|
|
1835
|
+
form_params = opts[:form_params] || {}
|
|
1836
|
+
|
|
1837
|
+
# http body (model)
|
|
1838
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_api_workspaces_by_workspace_id_keys_by_key_id_request)
|
|
1839
|
+
|
|
1840
|
+
# return_type
|
|
1841
|
+
return_type = opts[:debug_return_type] || 'PatchApiWorkspacesByWorkspaceIdKeysByKeyId200Response'
|
|
1842
|
+
|
|
1843
|
+
# auth_names
|
|
1844
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
1845
|
+
|
|
1846
|
+
new_options = opts.merge(
|
|
1847
|
+
:operation => :"WorkspaceApi.patch_api_workspaces_by_workspace_id_keys_by_key_id",
|
|
1848
|
+
:header_params => header_params,
|
|
1849
|
+
:query_params => query_params,
|
|
1850
|
+
:form_params => form_params,
|
|
1851
|
+
:body => post_body,
|
|
1852
|
+
:auth_names => auth_names,
|
|
1853
|
+
:return_type => return_type
|
|
1854
|
+
)
|
|
1855
|
+
|
|
1856
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
1857
|
+
if @api_client.config.debugging
|
|
1858
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#patch_api_workspaces_by_workspace_id_keys_by_key_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1859
|
+
end
|
|
1860
|
+
return data, status_code, headers
|
|
1861
|
+
end
|
|
1862
|
+
|
|
1863
|
+
# Rotate the public workspace key
|
|
1864
|
+
# Issues a new `pub_…` key. Requires workspace_admin. The public key is not authentication — rotating it does not invalidate JWTs or API keys.
|
|
1865
|
+
# @param [Hash] opts the optional parameters
|
|
1866
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1867
|
+
# @return [nil]
|
|
1868
|
+
def post_api_workspace_public_key_rotate(opts = {})
|
|
1869
|
+
post_api_workspace_public_key_rotate_with_http_info(opts)
|
|
1870
|
+
nil
|
|
1871
|
+
end
|
|
1872
|
+
|
|
1873
|
+
# Rotate the public workspace key
|
|
1874
|
+
# Issues a new `pub_…` key. Requires workspace_admin. The public key is not authentication — rotating it does not invalidate JWTs or API keys.
|
|
1076
1875
|
# @param [Hash] opts the optional parameters
|
|
1077
1876
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1078
1877
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -1127,23 +1926,23 @@ module SeatsChart
|
|
|
1127
1926
|
return data, status_code, headers
|
|
1128
1927
|
end
|
|
1129
1928
|
|
|
1130
|
-
# Create an
|
|
1131
|
-
# Provisions a
|
|
1929
|
+
# Create a workspace (provision an organizer)
|
|
1930
|
+
# Provisions a workspace and admin membership for the caller: a dashboard admin session, or a **full-access workspace admin API key** (`POST /api/keys` with `workspaceAdmin: true`), whose bound admin becomes the admin of the new workspace. Other API keys: 403 `ERR_PARTNER_SCOPE`. **Ticketing platforms (one workspace per organizer):** send `externalId` (your organizer id), `templateWorkspaceId` (a workspace whose integration settings, embed domains and webhooks to copy) and `issueKey` (mint the organizer's API key in the same call). A workspace created by a workspace admin key is marked `createdByApi`, starts on the platform account plan (`default_plan_id` of the admin, e.g. Ultra On-Demand) and is billed to the platform: its members never see checkout or upgrade prompts. Without a template it starts with partner pricing and the platform defaults. Then call any partner route in it with the same admin key and `X-Workspace-Key: <workspaceId or externalId>`. **Idempotency:** send `Idempotency-Key` (1–255 characters): the same key and body within 24 hours returns the first result with `idempotentReplay: true` and every secret `null` (secrets are never stored; rotate the key if the first response was lost). The same key with another body: 422 `idempotency_key_reused`; while the first call still runs: 409. `isTest: true` creates a test workspace linked to the current production workspace (`parentWorkspaceId`), optionally copying its charts (`copyCharts`). Written to the audit log of the current workspace (`workspace.create` / `workspace.create_test`) and, for a production workspace, of the new one. Returns a new `publicKey`: not a secret and not a Bearer substitute.
|
|
1132
1931
|
# @param post_api_workspaces_request [PostApiWorkspacesRequest]
|
|
1133
1932
|
# @param [Hash] opts the optional parameters
|
|
1134
1933
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1135
|
-
# @return [
|
|
1934
|
+
# @return [PostApiWorkspaces200Response]
|
|
1136
1935
|
def post_api_workspaces(post_api_workspaces_request, opts = {})
|
|
1137
|
-
post_api_workspaces_with_http_info(post_api_workspaces_request, opts)
|
|
1138
|
-
|
|
1936
|
+
data, _status_code, _headers = post_api_workspaces_with_http_info(post_api_workspaces_request, opts)
|
|
1937
|
+
data
|
|
1139
1938
|
end
|
|
1140
1939
|
|
|
1141
|
-
# Create an
|
|
1142
|
-
# Provisions a
|
|
1940
|
+
# Create a workspace (provision an organizer)
|
|
1941
|
+
# Provisions a workspace and admin membership for the caller: a dashboard admin session, or a **full-access workspace admin API key** (`POST /api/keys` with `workspaceAdmin: true`), whose bound admin becomes the admin of the new workspace. Other API keys: 403 `ERR_PARTNER_SCOPE`. **Ticketing platforms (one workspace per organizer):** send `externalId` (your organizer id), `templateWorkspaceId` (a workspace whose integration settings, embed domains and webhooks to copy) and `issueKey` (mint the organizer's API key in the same call). A workspace created by a workspace admin key is marked `createdByApi`, starts on the platform account plan (`default_plan_id` of the admin, e.g. Ultra On-Demand) and is billed to the platform: its members never see checkout or upgrade prompts. Without a template it starts with partner pricing and the platform defaults. Then call any partner route in it with the same admin key and `X-Workspace-Key: <workspaceId or externalId>`. **Idempotency:** send `Idempotency-Key` (1–255 characters): the same key and body within 24 hours returns the first result with `idempotentReplay: true` and every secret `null` (secrets are never stored; rotate the key if the first response was lost). The same key with another body: 422 `idempotency_key_reused`; while the first call still runs: 409. `isTest: true` creates a test workspace linked to the current production workspace (`parentWorkspaceId`), optionally copying its charts (`copyCharts`). Written to the audit log of the current workspace (`workspace.create` / `workspace.create_test`) and, for a production workspace, of the new one. Returns a new `publicKey`: not a secret and not a Bearer substitute.
|
|
1143
1942
|
# @param post_api_workspaces_request [PostApiWorkspacesRequest]
|
|
1144
1943
|
# @param [Hash] opts the optional parameters
|
|
1145
1944
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
1146
|
-
# @return [Array<(
|
|
1945
|
+
# @return [Array<(PostApiWorkspaces200Response, Integer, Hash)>] PostApiWorkspaces200Response data, response status code and response headers
|
|
1147
1946
|
def post_api_workspaces_with_http_info(post_api_workspaces_request, opts = {})
|
|
1148
1947
|
if @api_client.config.debugging
|
|
1149
1948
|
@api_client.config.logger.debug 'Calling API: WorkspaceApi.post_api_workspaces ...'
|
|
@@ -1168,6 +1967,8 @@ module SeatsChart
|
|
|
1168
1967
|
|
|
1169
1968
|
# header parameters
|
|
1170
1969
|
header_params = opts[:header_params] || {}
|
|
1970
|
+
# HTTP header 'Accept' (if needed)
|
|
1971
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
1171
1972
|
# HTTP header 'Content-Type'
|
|
1172
1973
|
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
1173
1974
|
if !content_type.nil?
|
|
@@ -1182,7 +1983,7 @@ module SeatsChart
|
|
|
1182
1983
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_workspaces_request)
|
|
1183
1984
|
|
|
1184
1985
|
# return_type
|
|
1185
|
-
return_type = opts[:debug_return_type]
|
|
1986
|
+
return_type = opts[:debug_return_type] || 'PostApiWorkspaces200Response'
|
|
1186
1987
|
|
|
1187
1988
|
# auth_names
|
|
1188
1989
|
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
@@ -1205,7 +2006,7 @@ module SeatsChart
|
|
|
1205
2006
|
end
|
|
1206
2007
|
|
|
1207
2008
|
# Reactivate a workspace
|
|
1208
|
-
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`).
|
|
2009
|
+
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). `{workspaceId}` may also be the external id of a workspace you administer (one workspace per organizer).
|
|
1209
2010
|
# @param workspace_id [String]
|
|
1210
2011
|
# @param [Hash] opts the optional parameters
|
|
1211
2012
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -1216,7 +2017,7 @@ module SeatsChart
|
|
|
1216
2017
|
end
|
|
1217
2018
|
|
|
1218
2019
|
# Reactivate a workspace
|
|
1219
|
-
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`).
|
|
2020
|
+
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). `{workspaceId}` may also be the external id of a workspace you administer (one workspace per organizer).
|
|
1220
2021
|
# @param workspace_id [String]
|
|
1221
2022
|
# @param [Hash] opts the optional parameters
|
|
1222
2023
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -1287,7 +2088,7 @@ module SeatsChart
|
|
|
1287
2088
|
end
|
|
1288
2089
|
|
|
1289
2090
|
# Deactivate a workspace
|
|
1290
|
-
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). You cannot deactivate your last active workspace (409 `last_active_workspace`).
|
|
2091
|
+
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). `{workspaceId}` may also be the external id of a workspace you administer (one workspace per organizer). You cannot deactivate your last active workspace (409 `last_active_workspace`).
|
|
1291
2092
|
# @param workspace_id [String]
|
|
1292
2093
|
# @param [Hash] opts the optional parameters
|
|
1293
2094
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -1298,7 +2099,7 @@ module SeatsChart
|
|
|
1298
2099
|
end
|
|
1299
2100
|
|
|
1300
2101
|
# Deactivate a workspace
|
|
1301
|
-
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). You cannot deactivate your last active workspace (409 `last_active_workspace`).
|
|
2102
|
+
# Dashboard session or a **workspace admin API key** (other API keys: 403 `ERR_PARTNER_SCOPE`); the caller (for a key: the admin it is bound to) must be an **admin** of the target workspace (403 otherwise, 404 when not a member). Idempotent. A deactivated workspace keeps all its data; its API keys, viewer/embed JWTs and public CDN reads are refused with 403 `workspace_deactivated` (effective at once on every API instance through a Redis invalidation message, 5 seconds at most if it is lost), while dashboard members can still sign in so an admin can reactivate it. An admin key cannot deactivate its own workspace (409 `own_workspace`). `{workspaceId}` may also be the external id of a workspace you administer (one workspace per organizer). You cannot deactivate your last active workspace (409 `last_active_workspace`).
|
|
1302
2103
|
# @param workspace_id [String]
|
|
1303
2104
|
# @param [Hash] opts the optional parameters
|
|
1304
2105
|
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
@@ -1368,6 +2169,99 @@ module SeatsChart
|
|
|
1368
2169
|
return data, status_code, headers
|
|
1369
2170
|
end
|
|
1370
2171
|
|
|
2172
|
+
# Delete a workspace
|
|
2173
|
+
# Soft delete: the workspace and every chart, event, order and audit entry stay in the database, but it leaves every list and switcher (including GET /workspaces), its members lose access, and its API keys, embed and viewer tokens and public reads are refused like a deactivated workspace (403 `workspace_deactivated`, at once on every API instance); `X-Workspace-Key` calls to it answer 404. Its sandboxes are deleted with it. It cannot be reactivated from the product (restoring is a support request). Dashboard session, or a **workspace admin API key** (offboarding an organizer; it cannot delete its own workspace: 409 `own_workspace`); other API keys: 403 `ERR_PARTNER_SCOPE`. The caller must be an **admin** of the workspace (403 `ERR_FORBIDDEN_ROLE`; 404 when not a member or already deleted). Send `confirmName` (the workspace name) or `confirmWorkspaceId` (its id); a mismatch answers 400 `confirmation_mismatch`. Refused while a paid subscription is active (409 `subscription_active`: cancel it in Billing first), for your only remaining workspace (409 `last_workspace`) and for a sandbox (409 `sandbox_workspace`). When it is the workspace of the calling session, `switchTo` names the workspace to switch to. Written to the audit log (`workspace.delete`) of the deleted workspace and of the one the session switches to.
|
|
2174
|
+
# @param workspace_id [String]
|
|
2175
|
+
# @param post_api_workspaces_by_workspace_id_actions_delete_request [PostApiWorkspacesByWorkspaceIdActionsDeleteRequest]
|
|
2176
|
+
# @param [Hash] opts the optional parameters
|
|
2177
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2178
|
+
# @return [PostApiWorkspacesByWorkspaceIdActionsDelete200Response]
|
|
2179
|
+
def post_api_workspaces_by_workspace_id_actions_delete(workspace_id, post_api_workspaces_by_workspace_id_actions_delete_request, opts = {})
|
|
2180
|
+
data, _status_code, _headers = post_api_workspaces_by_workspace_id_actions_delete_with_http_info(workspace_id, post_api_workspaces_by_workspace_id_actions_delete_request, opts)
|
|
2181
|
+
data
|
|
2182
|
+
end
|
|
2183
|
+
|
|
2184
|
+
# Delete a workspace
|
|
2185
|
+
# Soft delete: the workspace and every chart, event, order and audit entry stay in the database, but it leaves every list and switcher (including GET /workspaces), its members lose access, and its API keys, embed and viewer tokens and public reads are refused like a deactivated workspace (403 `workspace_deactivated`, at once on every API instance); `X-Workspace-Key` calls to it answer 404. Its sandboxes are deleted with it. It cannot be reactivated from the product (restoring is a support request). Dashboard session, or a **workspace admin API key** (offboarding an organizer; it cannot delete its own workspace: 409 `own_workspace`); other API keys: 403 `ERR_PARTNER_SCOPE`. The caller must be an **admin** of the workspace (403 `ERR_FORBIDDEN_ROLE`; 404 when not a member or already deleted). Send `confirmName` (the workspace name) or `confirmWorkspaceId` (its id); a mismatch answers 400 `confirmation_mismatch`. Refused while a paid subscription is active (409 `subscription_active`: cancel it in Billing first), for your only remaining workspace (409 `last_workspace`) and for a sandbox (409 `sandbox_workspace`). When it is the workspace of the calling session, `switchTo` names the workspace to switch to. Written to the audit log (`workspace.delete`) of the deleted workspace and of the one the session switches to.
|
|
2186
|
+
# @param workspace_id [String]
|
|
2187
|
+
# @param post_api_workspaces_by_workspace_id_actions_delete_request [PostApiWorkspacesByWorkspaceIdActionsDeleteRequest]
|
|
2188
|
+
# @param [Hash] opts the optional parameters
|
|
2189
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2190
|
+
# @return [Array<(PostApiWorkspacesByWorkspaceIdActionsDelete200Response, Integer, Hash)>] PostApiWorkspacesByWorkspaceIdActionsDelete200Response data, response status code and response headers
|
|
2191
|
+
def post_api_workspaces_by_workspace_id_actions_delete_with_http_info(workspace_id, post_api_workspaces_by_workspace_id_actions_delete_request, opts = {})
|
|
2192
|
+
if @api_client.config.debugging
|
|
2193
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete ...'
|
|
2194
|
+
end
|
|
2195
|
+
# verify the required parameter 'workspace_id' is set
|
|
2196
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
2197
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete"
|
|
2198
|
+
end
|
|
2199
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
2200
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete, the character length must be smaller than or equal to 128.'
|
|
2201
|
+
end
|
|
2202
|
+
|
|
2203
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
2204
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete, the character length must be great than or equal to 1.'
|
|
2205
|
+
end
|
|
2206
|
+
|
|
2207
|
+
# verify the required parameter 'post_api_workspaces_by_workspace_id_actions_delete_request' is set
|
|
2208
|
+
if @api_client.config.client_side_validation && post_api_workspaces_by_workspace_id_actions_delete_request.nil?
|
|
2209
|
+
fail ArgumentError, "Missing the required parameter 'post_api_workspaces_by_workspace_id_actions_delete_request' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete"
|
|
2210
|
+
end
|
|
2211
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
2212
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete, the character length must be smaller than or equal to 255.'
|
|
2213
|
+
end
|
|
2214
|
+
|
|
2215
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
2216
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete, the character length must be great than or equal to 1.'
|
|
2217
|
+
end
|
|
2218
|
+
|
|
2219
|
+
# resource path
|
|
2220
|
+
local_var_path = '/api/workspaces/{workspaceId}/actions/delete'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
2221
|
+
|
|
2222
|
+
# query parameters
|
|
2223
|
+
query_params = opts[:query_params] || {}
|
|
2224
|
+
|
|
2225
|
+
# header parameters
|
|
2226
|
+
header_params = opts[:header_params] || {}
|
|
2227
|
+
# HTTP header 'Accept' (if needed)
|
|
2228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
2229
|
+
# HTTP header 'Content-Type'
|
|
2230
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
2231
|
+
if !content_type.nil?
|
|
2232
|
+
header_params['Content-Type'] = content_type
|
|
2233
|
+
end
|
|
2234
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2235
|
+
|
|
2236
|
+
# form parameters
|
|
2237
|
+
form_params = opts[:form_params] || {}
|
|
2238
|
+
|
|
2239
|
+
# http body (model)
|
|
2240
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_workspaces_by_workspace_id_actions_delete_request)
|
|
2241
|
+
|
|
2242
|
+
# return_type
|
|
2243
|
+
return_type = opts[:debug_return_type] || 'PostApiWorkspacesByWorkspaceIdActionsDelete200Response'
|
|
2244
|
+
|
|
2245
|
+
# auth_names
|
|
2246
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
2247
|
+
|
|
2248
|
+
new_options = opts.merge(
|
|
2249
|
+
:operation => :"WorkspaceApi.post_api_workspaces_by_workspace_id_actions_delete",
|
|
2250
|
+
:header_params => header_params,
|
|
2251
|
+
:query_params => query_params,
|
|
2252
|
+
:form_params => form_params,
|
|
2253
|
+
:body => post_body,
|
|
2254
|
+
:auth_names => auth_names,
|
|
2255
|
+
:return_type => return_type
|
|
2256
|
+
)
|
|
2257
|
+
|
|
2258
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2259
|
+
if @api_client.config.debugging
|
|
2260
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#post_api_workspaces_by_workspace_id_actions_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2261
|
+
end
|
|
2262
|
+
return data, status_code, headers
|
|
2263
|
+
end
|
|
2264
|
+
|
|
1371
2265
|
# Set my default workspace
|
|
1372
2266
|
# Makes this workspace the default of the calling user (for a **workspace admin API key**: of the admin it is bound to): dashboard sign-in opens it, and `GET /workspaces` marks it `isDefault`. Any role may set a workspace it is a member of (404 otherwise); a deactivated workspace cannot be the default (409 `workspace_deactivated`). Idempotent; written to the audit log of that workspace (`workspace.set_default`). Other API keys: 403 `ERR_PARTNER_SCOPE`.
|
|
1373
2267
|
# @param workspace_id [String]
|
|
@@ -1450,6 +2344,278 @@ module SeatsChart
|
|
|
1450
2344
|
return data, status_code, headers
|
|
1451
2345
|
end
|
|
1452
2346
|
|
|
2347
|
+
# Invite a person to a workspace you administer
|
|
2348
|
+
# Gives an organizer's team access to the SeatsChart dashboard of this workspace only (optional per organizer). Same invitation flow and e-mail as the dashboard: a pending invitation (7 days) and a one-time `inviteToken` for the accept link (`/accept-invite?token=…`), returned once so you may send your own e-mail. Accepting creates or joins the account and opens this workspace; the person sees only the workspaces they are a member of. 409 when already a member or invited. Audited (`team.invitation_created`).
|
|
2349
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
2350
|
+
# @param post_api_workspaces_by_workspace_id_invitations_request [PostApiWorkspacesByWorkspaceIdInvitationsRequest]
|
|
2351
|
+
# @param [Hash] opts the optional parameters
|
|
2352
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2353
|
+
# @return [nil]
|
|
2354
|
+
def post_api_workspaces_by_workspace_id_invitations(workspace_id, post_api_workspaces_by_workspace_id_invitations_request, opts = {})
|
|
2355
|
+
post_api_workspaces_by_workspace_id_invitations_with_http_info(workspace_id, post_api_workspaces_by_workspace_id_invitations_request, opts)
|
|
2356
|
+
nil
|
|
2357
|
+
end
|
|
2358
|
+
|
|
2359
|
+
# Invite a person to a workspace you administer
|
|
2360
|
+
# Gives an organizer's team access to the SeatsChart dashboard of this workspace only (optional per organizer). Same invitation flow and e-mail as the dashboard: a pending invitation (7 days) and a one-time `inviteToken` for the accept link (`/accept-invite?token=…`), returned once so you may send your own e-mail. Accepting creates or joins the account and opens this workspace; the person sees only the workspaces they are a member of. 409 when already a member or invited. Audited (`team.invitation_created`).
|
|
2361
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
2362
|
+
# @param post_api_workspaces_by_workspace_id_invitations_request [PostApiWorkspacesByWorkspaceIdInvitationsRequest]
|
|
2363
|
+
# @param [Hash] opts the optional parameters
|
|
2364
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2365
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2366
|
+
def post_api_workspaces_by_workspace_id_invitations_with_http_info(workspace_id, post_api_workspaces_by_workspace_id_invitations_request, opts = {})
|
|
2367
|
+
if @api_client.config.debugging
|
|
2368
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.post_api_workspaces_by_workspace_id_invitations ...'
|
|
2369
|
+
end
|
|
2370
|
+
# verify the required parameter 'workspace_id' is set
|
|
2371
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
2372
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_invitations"
|
|
2373
|
+
end
|
|
2374
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
2375
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_invitations, the character length must be smaller than or equal to 128.'
|
|
2376
|
+
end
|
|
2377
|
+
|
|
2378
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
2379
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_invitations, the character length must be great than or equal to 1.'
|
|
2380
|
+
end
|
|
2381
|
+
|
|
2382
|
+
# verify the required parameter 'post_api_workspaces_by_workspace_id_invitations_request' is set
|
|
2383
|
+
if @api_client.config.client_side_validation && post_api_workspaces_by_workspace_id_invitations_request.nil?
|
|
2384
|
+
fail ArgumentError, "Missing the required parameter 'post_api_workspaces_by_workspace_id_invitations_request' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_invitations"
|
|
2385
|
+
end
|
|
2386
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
2387
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_invitations, the character length must be smaller than or equal to 255.'
|
|
2388
|
+
end
|
|
2389
|
+
|
|
2390
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
2391
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_invitations, the character length must be great than or equal to 1.'
|
|
2392
|
+
end
|
|
2393
|
+
|
|
2394
|
+
# resource path
|
|
2395
|
+
local_var_path = '/api/workspaces/{workspaceId}/invitations'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
2396
|
+
|
|
2397
|
+
# query parameters
|
|
2398
|
+
query_params = opts[:query_params] || {}
|
|
2399
|
+
|
|
2400
|
+
# header parameters
|
|
2401
|
+
header_params = opts[:header_params] || {}
|
|
2402
|
+
# HTTP header 'Content-Type'
|
|
2403
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
2404
|
+
if !content_type.nil?
|
|
2405
|
+
header_params['Content-Type'] = content_type
|
|
2406
|
+
end
|
|
2407
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2408
|
+
|
|
2409
|
+
# form parameters
|
|
2410
|
+
form_params = opts[:form_params] || {}
|
|
2411
|
+
|
|
2412
|
+
# http body (model)
|
|
2413
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_workspaces_by_workspace_id_invitations_request)
|
|
2414
|
+
|
|
2415
|
+
# return_type
|
|
2416
|
+
return_type = opts[:debug_return_type]
|
|
2417
|
+
|
|
2418
|
+
# auth_names
|
|
2419
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
2420
|
+
|
|
2421
|
+
new_options = opts.merge(
|
|
2422
|
+
:operation => :"WorkspaceApi.post_api_workspaces_by_workspace_id_invitations",
|
|
2423
|
+
:header_params => header_params,
|
|
2424
|
+
:query_params => query_params,
|
|
2425
|
+
:form_params => form_params,
|
|
2426
|
+
:body => post_body,
|
|
2427
|
+
:auth_names => auth_names,
|
|
2428
|
+
:return_type => return_type
|
|
2429
|
+
)
|
|
2430
|
+
|
|
2431
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2432
|
+
if @api_client.config.debugging
|
|
2433
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#post_api_workspaces_by_workspace_id_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2434
|
+
end
|
|
2435
|
+
return data, status_code, headers
|
|
2436
|
+
end
|
|
2437
|
+
|
|
2438
|
+
# Mint an API key in a workspace you administer
|
|
2439
|
+
# An ordinary `sk_live_` key of the workspace (full access by default, or the `scopes` given); the `secret` is returned once and stored as a SHA-256 hash only. Never a workspace admin key (those are minted in the dashboard). Audited in the workspace (`api_key.created`, `via: admin_key` for a workspace admin key). A sandbox answers 409 `sandbox_workspace`.
|
|
2440
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
2441
|
+
# @param post_api_workspaces_by_workspace_id_keys_request [PostApiWorkspacesByWorkspaceIdKeysRequest]
|
|
2442
|
+
# @param [Hash] opts the optional parameters
|
|
2443
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2444
|
+
# @return [PostApiWorkspacesByWorkspaceIdKeys201Response]
|
|
2445
|
+
def post_api_workspaces_by_workspace_id_keys(workspace_id, post_api_workspaces_by_workspace_id_keys_request, opts = {})
|
|
2446
|
+
data, _status_code, _headers = post_api_workspaces_by_workspace_id_keys_with_http_info(workspace_id, post_api_workspaces_by_workspace_id_keys_request, opts)
|
|
2447
|
+
data
|
|
2448
|
+
end
|
|
2449
|
+
|
|
2450
|
+
# Mint an API key in a workspace you administer
|
|
2451
|
+
# An ordinary `sk_live_` key of the workspace (full access by default, or the `scopes` given); the `secret` is returned once and stored as a SHA-256 hash only. Never a workspace admin key (those are minted in the dashboard). Audited in the workspace (`api_key.created`, `via: admin_key` for a workspace admin key). A sandbox answers 409 `sandbox_workspace`.
|
|
2452
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
2453
|
+
# @param post_api_workspaces_by_workspace_id_keys_request [PostApiWorkspacesByWorkspaceIdKeysRequest]
|
|
2454
|
+
# @param [Hash] opts the optional parameters
|
|
2455
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2456
|
+
# @return [Array<(PostApiWorkspacesByWorkspaceIdKeys201Response, Integer, Hash)>] PostApiWorkspacesByWorkspaceIdKeys201Response data, response status code and response headers
|
|
2457
|
+
def post_api_workspaces_by_workspace_id_keys_with_http_info(workspace_id, post_api_workspaces_by_workspace_id_keys_request, opts = {})
|
|
2458
|
+
if @api_client.config.debugging
|
|
2459
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.post_api_workspaces_by_workspace_id_keys ...'
|
|
2460
|
+
end
|
|
2461
|
+
# verify the required parameter 'workspace_id' is set
|
|
2462
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
2463
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys"
|
|
2464
|
+
end
|
|
2465
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
2466
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys, the character length must be smaller than or equal to 128.'
|
|
2467
|
+
end
|
|
2468
|
+
|
|
2469
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
2470
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys, the character length must be great than or equal to 1.'
|
|
2471
|
+
end
|
|
2472
|
+
|
|
2473
|
+
# verify the required parameter 'post_api_workspaces_by_workspace_id_keys_request' is set
|
|
2474
|
+
if @api_client.config.client_side_validation && post_api_workspaces_by_workspace_id_keys_request.nil?
|
|
2475
|
+
fail ArgumentError, "Missing the required parameter 'post_api_workspaces_by_workspace_id_keys_request' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys"
|
|
2476
|
+
end
|
|
2477
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
2478
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys, the character length must be smaller than or equal to 255.'
|
|
2479
|
+
end
|
|
2480
|
+
|
|
2481
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
2482
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys, the character length must be great than or equal to 1.'
|
|
2483
|
+
end
|
|
2484
|
+
|
|
2485
|
+
# resource path
|
|
2486
|
+
local_var_path = '/api/workspaces/{workspaceId}/keys'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s))
|
|
2487
|
+
|
|
2488
|
+
# query parameters
|
|
2489
|
+
query_params = opts[:query_params] || {}
|
|
2490
|
+
|
|
2491
|
+
# header parameters
|
|
2492
|
+
header_params = opts[:header_params] || {}
|
|
2493
|
+
# HTTP header 'Accept' (if needed)
|
|
2494
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
2495
|
+
# HTTP header 'Content-Type'
|
|
2496
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data', 'text/plain'])
|
|
2497
|
+
if !content_type.nil?
|
|
2498
|
+
header_params['Content-Type'] = content_type
|
|
2499
|
+
end
|
|
2500
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2501
|
+
|
|
2502
|
+
# form parameters
|
|
2503
|
+
form_params = opts[:form_params] || {}
|
|
2504
|
+
|
|
2505
|
+
# http body (model)
|
|
2506
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_api_workspaces_by_workspace_id_keys_request)
|
|
2507
|
+
|
|
2508
|
+
# return_type
|
|
2509
|
+
return_type = opts[:debug_return_type] || 'PostApiWorkspacesByWorkspaceIdKeys201Response'
|
|
2510
|
+
|
|
2511
|
+
# auth_names
|
|
2512
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
2513
|
+
|
|
2514
|
+
new_options = opts.merge(
|
|
2515
|
+
:operation => :"WorkspaceApi.post_api_workspaces_by_workspace_id_keys",
|
|
2516
|
+
:header_params => header_params,
|
|
2517
|
+
:query_params => query_params,
|
|
2518
|
+
:form_params => form_params,
|
|
2519
|
+
:body => post_body,
|
|
2520
|
+
:auth_names => auth_names,
|
|
2521
|
+
:return_type => return_type
|
|
2522
|
+
)
|
|
2523
|
+
|
|
2524
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2525
|
+
if @api_client.config.debugging
|
|
2526
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#post_api_workspaces_by_workspace_id_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2527
|
+
end
|
|
2528
|
+
return data, status_code, headers
|
|
2529
|
+
end
|
|
2530
|
+
|
|
2531
|
+
# Rotate the secret of a key of a workspace you administer
|
|
2532
|
+
# Issues a new secret for the same key (same id, name and scopes) and returns it once; the old secret stops working at once on every API instance. Workspace admin keys answer 403 `ERR_ADMIN_KEY_DASHBOARD_ONLY`. Audited (`api_key.rotated`).
|
|
2533
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
2534
|
+
# @param key_id [String]
|
|
2535
|
+
# @param [Hash] opts the optional parameters
|
|
2536
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2537
|
+
# @return [PostApiWorkspacesByWorkspaceIdKeys201Response]
|
|
2538
|
+
def post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate(workspace_id, key_id, opts = {})
|
|
2539
|
+
data, _status_code, _headers = post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate_with_http_info(workspace_id, key_id, opts)
|
|
2540
|
+
data
|
|
2541
|
+
end
|
|
2542
|
+
|
|
2543
|
+
# Rotate the secret of a key of a workspace you administer
|
|
2544
|
+
# Issues a new secret for the same key (same id, name and scopes) and returns it once; the old secret stops working at once on every API instance. Workspace admin keys answer 403 `ERR_ADMIN_KEY_DASHBOARD_ONLY`. Audited (`api_key.rotated`).
|
|
2545
|
+
# @param workspace_id [String] Workspace id or its external id.
|
|
2546
|
+
# @param key_id [String]
|
|
2547
|
+
# @param [Hash] opts the optional parameters
|
|
2548
|
+
# @option opts [String] :idempotency_key Required on transactional routes. Reuse the same key for every retry of one logical operation; the API replays the stored outcome.
|
|
2549
|
+
# @return [Array<(PostApiWorkspacesByWorkspaceIdKeys201Response, Integer, Hash)>] PostApiWorkspacesByWorkspaceIdKeys201Response data, response status code and response headers
|
|
2550
|
+
def post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate_with_http_info(workspace_id, key_id, opts = {})
|
|
2551
|
+
if @api_client.config.debugging
|
|
2552
|
+
@api_client.config.logger.debug 'Calling API: WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate ...'
|
|
2553
|
+
end
|
|
2554
|
+
# verify the required parameter 'workspace_id' is set
|
|
2555
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
2556
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate"
|
|
2557
|
+
end
|
|
2558
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length > 128
|
|
2559
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate, the character length must be smaller than or equal to 128.'
|
|
2560
|
+
end
|
|
2561
|
+
|
|
2562
|
+
if @api_client.config.client_side_validation && workspace_id.to_s.length < 1
|
|
2563
|
+
fail ArgumentError, 'invalid value for "workspace_id" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate, the character length must be great than or equal to 1.'
|
|
2564
|
+
end
|
|
2565
|
+
|
|
2566
|
+
# verify the required parameter 'key_id' is set
|
|
2567
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
2568
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate"
|
|
2569
|
+
end
|
|
2570
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
2571
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate, the character length must be smaller than or equal to 255.'
|
|
2572
|
+
end
|
|
2573
|
+
|
|
2574
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length < 1
|
|
2575
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate, the character length must be great than or equal to 1.'
|
|
2576
|
+
end
|
|
2577
|
+
|
|
2578
|
+
# resource path
|
|
2579
|
+
local_var_path = '/api/workspaces/{workspaceId}/keys/{keyId}/actions/rotate'.sub('{' + 'workspaceId' + '}', CGI.escape(workspace_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
|
|
2580
|
+
|
|
2581
|
+
# query parameters
|
|
2582
|
+
query_params = opts[:query_params] || {}
|
|
2583
|
+
|
|
2584
|
+
# header parameters
|
|
2585
|
+
header_params = opts[:header_params] || {}
|
|
2586
|
+
# HTTP header 'Accept' (if needed)
|
|
2587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'multipart/form-data', 'text/plain']) unless header_params['Accept']
|
|
2588
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2589
|
+
|
|
2590
|
+
# form parameters
|
|
2591
|
+
form_params = opts[:form_params] || {}
|
|
2592
|
+
|
|
2593
|
+
# http body (model)
|
|
2594
|
+
post_body = opts[:debug_body]
|
|
2595
|
+
|
|
2596
|
+
# return_type
|
|
2597
|
+
return_type = opts[:debug_return_type] || 'PostApiWorkspacesByWorkspaceIdKeys201Response'
|
|
2598
|
+
|
|
2599
|
+
# auth_names
|
|
2600
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
|
2601
|
+
|
|
2602
|
+
new_options = opts.merge(
|
|
2603
|
+
:operation => :"WorkspaceApi.post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate",
|
|
2604
|
+
:header_params => header_params,
|
|
2605
|
+
:query_params => query_params,
|
|
2606
|
+
:form_params => form_params,
|
|
2607
|
+
:body => post_body,
|
|
2608
|
+
:auth_names => auth_names,
|
|
2609
|
+
:return_type => return_type
|
|
2610
|
+
)
|
|
2611
|
+
|
|
2612
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2613
|
+
if @api_client.config.debugging
|
|
2614
|
+
@api_client.config.logger.debug "API called: WorkspaceApi#post_api_workspaces_by_workspace_id_keys_by_key_id_actions_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2615
|
+
end
|
|
2616
|
+
return data, status_code, headers
|
|
2617
|
+
end
|
|
2618
|
+
|
|
1453
2619
|
# Publish selected extraData keys to buyers (or stop)
|
|
1454
2620
|
# Workspace admins only (dashboard session). Replaces the setting; takes effect within seconds on every API instance (tenant config cache invalidation) and on CDN copies of the public read (max-age 5 s). Audited (`workspace.buyer_extra_data.update`). Object `extraData` is private by default (server, Event Manager, reports). With `enabled` and a non-empty `keys` allow-list (at most 16 keys of letters, digits, `_`, `-`, `.` and `:`), only those keys, with scalar values (strings up to 256 characters, numbers, booleans, null), are published for this workspace's events by `GET /api/public/{publicKey}/events/{eventId}/extra-data` and read by the renderer (rules `match.extraData`, templates `{extraData.key}`, host objects). Never part of the compact state. `resalePriceCents` is never published. The key list is kept while disabled.
|
|
1455
2621
|
# @param put_api_workspace_buyer_extra_data_request [PutApiWorkspaceBuyerExtraDataRequest]
|