Class: OryClient::ProjectApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-client/api/project_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProjectApi

Returns a new instance of ProjectApi.



19
20
21
# File 'lib/ory-client/api/project_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ory-client/api/project_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_organization(project_id, opts = {}) ⇒ Organization

Create a B2B SSO Organization

Parameters:

  • project_id (String)

    Project ID The project's ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



27
28
29
30
# File 'lib/ory-client/api/project_api.rb', line 27

def create_organization(project_id, opts = {})
  data, _status_code, _headers = create_organization_with_http_info(project_id, opts)
  data
end

#create_organization_with_http_info(project_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>

Create a B2B SSO Organization

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Organization, Integer, Hash)>)

    Organization data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/ory-client/api/project_api.rb', line 37

def create_organization_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.create_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'organization_body'])

  # return_type
  return_type = opts[:debug_return_type] || 'Organization'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.create_organization",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project(opts = {}) ⇒ Project

Create a Project Creates a new project.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



95
96
97
98
# File 'lib/ory-client/api/project_api.rb', line 95

def create_project(opts = {})
  data, _status_code, _headers = create_project_with_http_info(opts)
  data
end

#create_project_api_key(project, opts = {}) ⇒ ProjectApiKey

Create project API token Create an API token for a project.

Parameters:

  • project (String)

    The Project ID or Project slug

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



160
161
162
163
# File 'lib/ory-client/api/project_api.rb', line 160

def create_project_api_key(project, opts = {})
  data, _status_code, _headers = create_project_api_key_with_http_info(project, opts)
  data
end

#create_project_api_key_with_http_info(project, opts = {}) ⇒ Array<(ProjectApiKey, Integer, Hash)>

Create project API token Create an API token for a project.

Parameters:

  • project (String)

    The Project ID or Project slug

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(ProjectApiKey, Integer, Hash)>)

    ProjectApiKey data, response status code and response headers



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/ory-client/api/project_api.rb', line 171

def create_project_api_key_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_project_api_key ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.create_project_api_key"
  end
  # resource path
  local_var_path = '/projects/{project}/tokens'.sub('{' + 'project' + '}', CGI.escape(project.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_project_api_key_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'ProjectApiKey'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.create_project_api_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#create_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>

Create a Project Creates a new project.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Project, Integer, Hash)>)

    Project data, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/ory-client/api/project_api.rb', line 105

def create_project_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...'
  end
  # resource path
  local_var_path = '/projects'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_project_body'])

  # return_type
  return_type = opts[:debug_return_type] || 'Project'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.create_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_organization(project_id, organization_id, opts = {}) ⇒ nil

Delete a B2B SSO Organization for a project.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


229
230
231
232
# File 'lib/ory-client/api/project_api.rb', line 229

def delete_organization(project_id, organization_id, opts = {})
  delete_organization_with_http_info(project_id, organization_id, opts)
  nil
end

#delete_organization_with_http_info(project_id, organization_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a B2B SSO Organization for a project.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/ory-client/api/project_api.rb', line 239

def delete_organization_with_http_info(project_id, organization_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.delete_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.delete_organization"
  end
  # verify the required parameter 'organization_id' is set
  if @api_client.config.client_side_validation && organization_id.nil?
    fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProjectApi.delete_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations/{organization_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.delete_organization",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#delete_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_project_api_key(project, token_id, opts = {}) ⇒ nil

Delete project API token Deletes an API token and immediately removes it.

Parameters:

  • project (String)

    The Project ID or Project slug

  • token_id (String)

    The Token ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


297
298
299
300
# File 'lib/ory-client/api/project_api.rb', line 297

def delete_project_api_key(project, token_id, opts = {})
  delete_project_api_key_with_http_info(project, token_id, opts)
  nil
end

#delete_project_api_key_with_http_info(project, token_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete project API token Deletes an API token and immediately removes it.

Parameters:

  • project (String)

    The Project ID or Project slug

  • token_id (String)

    The Token ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/ory-client/api/project_api.rb', line 308

def delete_project_api_key_with_http_info(project, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.delete_project_api_key ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.delete_project_api_key"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling ProjectApi.delete_project_api_key"
  end
  # resource path
  local_var_path = '/projects/{project}/tokens/{token_id}'.sub('{' + 'project' + '}', CGI.escape(project.to_s)).sub('{' + 'token_id' + '}', CGI.escape(token_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.delete_project_api_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#delete_project_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_active_project_in_console(opts = {}) ⇒ ActiveProjectInConsole

Returns the Ory Network Project selected in the Ory Network Console Use this API to get your active project in the Ory Network Console UI.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



364
365
366
367
# File 'lib/ory-client/api/project_api.rb', line 364

def get_active_project_in_console(opts = {})
  data, _status_code, _headers = get_active_project_in_console_with_http_info(opts)
  data
end

#get_active_project_in_console_with_http_info(opts = {}) ⇒ Array<(ActiveProjectInConsole, Integer, Hash)>

Returns the Ory Network Project selected in the Ory Network Console Use this API to get your active project in the Ory Network Console UI.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ActiveProjectInConsole, Integer, Hash)>)

    ActiveProjectInConsole data, response status code and response headers



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/ory-client/api/project_api.rb', line 373

def get_active_project_in_console_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.get_active_project_in_console ...'
  end
  # resource path
  local_var_path = '/console/active/project'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ActiveProjectInConsole'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.get_active_project_in_console",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_active_project_in_console\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_organization(project_id, organization_id, opts = {}) ⇒ GetOrganizationResponse

Returns a B2B SSO Organization for a project by it’s ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



422
423
424
425
# File 'lib/ory-client/api/project_api.rb', line 422

def get_organization(project_id, organization_id, opts = {})
  data, _status_code, _headers = get_organization_with_http_info(project_id, organization_id, opts)
  data
end

#get_organization_with_http_info(project_id, organization_id, opts = {}) ⇒ Array<(GetOrganizationResponse, Integer, Hash)>

Returns a B2B SSO Organization for a project by it&#39;s ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetOrganizationResponse, Integer, Hash)>)

    GetOrganizationResponse data, response status code and response headers



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/ory-client/api/project_api.rb', line 432

def get_organization_with_http_info(project_id, organization_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.get_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_organization"
  end
  # verify the required parameter 'organization_id' is set
  if @api_client.config.client_side_validation && organization_id.nil?
    fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProjectApi.get_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations/{organization_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetOrganizationResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.get_organization",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project(project_id, opts = {}) ⇒ Project

Get a Project Get a projects you have access to by its ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



489
490
491
492
# File 'lib/ory-client/api/project_api.rb', line 489

def get_project(project_id, opts = {})
  data, _status_code, _headers = get_project_with_http_info(project_id, opts)
  data
end

#get_project_members(project, opts = {}) ⇒ Array<ProjectMember>

Get all members associated with this project This endpoint requires the user to be a member of the project with the role ‘OWNER` or `DEVELOPER`.

Parameters:

  • project (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



552
553
554
555
# File 'lib/ory-client/api/project_api.rb', line 552

def get_project_members(project, opts = {})
  data, _status_code, _headers = get_project_members_with_http_info(project, opts)
  data
end

#get_project_members_with_http_info(project, opts = {}) ⇒ Array<(Array<ProjectMember>, Integer, Hash)>

Get all members associated with this project This endpoint requires the user to be a member of the project with the role &#x60;OWNER&#x60; or &#x60;DEVELOPER&#x60;.

Parameters:

  • project (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<ProjectMember>, Integer, Hash)>)

    Array<ProjectMember> data, response status code and response headers



562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# File 'lib/ory-client/api/project_api.rb', line 562

def get_project_members_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.get_project_members ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.get_project_members"
  end
  # resource path
  local_var_path = '/projects/{project}/members'.sub('{' + 'project' + '}', CGI.escape(project.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ProjectMember>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.get_project_members",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_project_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project_metrics(project_id, event_type, resolution, from, to, opts = {}) ⇒ GetProjectMetricsResponse

Retrieves project metrics for the specified event type and time range

Parameters:

  • project_id (String)

    Project ID

  • event_type (String)

    The event type to query for

  • resolution (String)

    The resolution of the buckets The minimum resolution is 1 minute.

  • from (Time)

    The start RFC3339 date of the time window

  • to (Time)

    The end RFC3339 date of the time window

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



618
619
620
621
# File 'lib/ory-client/api/project_api.rb', line 618

def get_project_metrics(project_id, event_type, resolution, from, to, opts = {})
  data, _status_code, _headers = get_project_metrics_with_http_info(project_id, event_type, resolution, from, to, opts)
  data
end

#get_project_metrics_with_http_info(project_id, event_type, resolution, from, to, opts = {}) ⇒ Array<(GetProjectMetricsResponse, Integer, Hash)>

Retrieves project metrics for the specified event type and time range

Parameters:

  • project_id (String)

    Project ID

  • event_type (String)

    The event type to query for

  • resolution (String)

    The resolution of the buckets The minimum resolution is 1 minute.

  • from (Time)

    The start RFC3339 date of the time window

  • to (Time)

    The end RFC3339 date of the time window

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetProjectMetricsResponse, Integer, Hash)>)

    GetProjectMetricsResponse data, response status code and response headers



631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
# File 'lib/ory-client/api/project_api.rb', line 631

def get_project_metrics_with_http_info(project_id, event_type, resolution, from, to, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.get_project_metrics ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_project_metrics"
  end
  # verify the required parameter 'event_type' is set
  if @api_client.config.client_side_validation && event_type.nil?
    fail ArgumentError, "Missing the required parameter 'event_type' when calling ProjectApi.get_project_metrics"
  end
  # verify the required parameter 'resolution' is set
  if @api_client.config.client_side_validation && resolution.nil?
    fail ArgumentError, "Missing the required parameter 'resolution' when calling ProjectApi.get_project_metrics"
  end
  pattern = Regexp.new(/^[0-9]+(m|h|d|M|y)$/)
  if @api_client.config.client_side_validation && resolution !~ pattern
    fail ArgumentError, "invalid value for 'resolution' when calling ProjectApi.get_project_metrics, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'from' is set
  if @api_client.config.client_side_validation && from.nil?
    fail ArgumentError, "Missing the required parameter 'from' when calling ProjectApi.get_project_metrics"
  end
  # verify the required parameter 'to' is set
  if @api_client.config.client_side_validation && to.nil?
    fail ArgumentError, "Missing the required parameter 'to' when calling ProjectApi.get_project_metrics"
  end
  # resource path
  local_var_path = '/projects/{project_id}/metrics'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'event_type'] = event_type
  query_params[:'resolution'] = resolution
  query_params[:'from'] = from
  query_params[:'to'] = to

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetProjectMetricsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.get_project_metrics",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_project_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_project_with_http_info(project_id, opts = {}) ⇒ Array<(Project, Integer, Hash)>

Get a Project Get a projects you have access to by its ID.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Project, Integer, Hash)>)

    Project data, response status code and response headers



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# File 'lib/ory-client/api/project_api.rb', line 499

def get_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.get_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.get_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Project'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.get_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_organizations(project_id, opts = {}) ⇒ ListOrganizationsResponse

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



707
708
709
710
# File 'lib/ory-client/api/project_api.rb', line 707

def list_organizations(project_id, opts = {})
  data, _status_code, _headers = list_organizations_with_http_info(project_id, opts)
  data
end

#list_organizations_with_http_info(project_id, opts = {}) ⇒ Array<(ListOrganizationsResponse, Integer, Hash)>

Returns ListOrganizationsResponse data, response status code and response headers.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListOrganizationsResponse, Integer, Hash)>)

    ListOrganizationsResponse data, response status code and response headers



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
# File 'lib/ory-client/api/project_api.rb', line 715

def list_organizations_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.list_organizations ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.list_organizations"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListOrganizationsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.list_organizations",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_project_api_keys(project, opts = {}) ⇒ Array<ProjectApiKey>

List a project’s API Tokens A list of all the project’s API tokens.

Parameters:

  • project (String)

    The Project ID or Project slug

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



768
769
770
771
# File 'lib/ory-client/api/project_api.rb', line 768

def list_project_api_keys(project, opts = {})
  data, _status_code, _headers = list_project_api_keys_with_http_info(project, opts)
  data
end

#list_project_api_keys_with_http_info(project, opts = {}) ⇒ Array<(Array<ProjectApiKey>, Integer, Hash)>

List a project&#39;s API Tokens A list of all the project&#39;s API tokens.

Parameters:

  • project (String)

    The Project ID or Project slug

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<ProjectApiKey>, Integer, Hash)>)

    Array<ProjectApiKey> data, response status code and response headers



778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
# File 'lib/ory-client/api/project_api.rb', line 778

def list_project_api_keys_with_http_info(project, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.list_project_api_keys ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.list_project_api_keys"
  end
  # resource path
  local_var_path = '/projects/{project}/tokens'.sub('{' + 'project' + '}', CGI.escape(project.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ProjectApiKey>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.list_project_api_keys",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#list_project_api_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_projects(opts = {}) ⇒ Array<ProjectMetadata>

List All Projects Lists all projects you have access to.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



830
831
832
833
# File 'lib/ory-client/api/project_api.rb', line 830

def list_projects(opts = {})
  data, _status_code, _headers = list_projects_with_http_info(opts)
  data
end

#list_projects_with_http_info(opts = {}) ⇒ Array<(Array<ProjectMetadata>, Integer, Hash)>

List All Projects Lists all projects you have access to.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<ProjectMetadata>, Integer, Hash)>)

    Array<ProjectMetadata> data, response status code and response headers



839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
# File 'lib/ory-client/api/project_api.rb', line 839

def list_projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.list_projects ...'
  end
  # resource path
  local_var_path = '/projects'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<ProjectMetadata>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.list_projects",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#list_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_project(project_id, opts = {}) ⇒ SuccessfulProjectUpdate

Patch an Ory Network Project Configuration Deprecated: Use the ‘patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Network project configuration keys for Ory’s services (identity, permission, …). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the ‘version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



889
890
891
892
# File 'lib/ory-client/api/project_api.rb', line 889

def patch_project(project_id, opts = {})
  data, _status_code, _headers = patch_project_with_http_info(project_id, opts)
  data
end

#patch_project_with_http_info(project_id, opts = {}) ⇒ Array<(SuccessfulProjectUpdate, Integer, Hash)>

Patch an Ory Network Project Configuration Deprecated: Use the &#x60;patchProjectWithRevision&#x60; endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Network project configuration keys for Ory&#39;s services (identity, permission, …). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(SuccessfulProjectUpdate, Integer, Hash)>)

    SuccessfulProjectUpdate data, response status code and response headers



900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/ory-client/api/project_api.rb', line 900

def patch_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.patch_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.patch_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_patch'])

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessfulProjectUpdate'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.patch_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#patch_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#purge_project(project_id, opts = {}) ⇒ nil

Irrecoverably purge a project !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


958
959
960
961
# File 'lib/ory-client/api/project_api.rb', line 958

def purge_project(project_id, opts = {})
  purge_project_with_http_info(project_id, opts)
  nil
end

#purge_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Irrecoverably purge a project !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/ory-client/api/project_api.rb', line 968

def purge_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.purge_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.purge_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.purge_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#purge_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_project_member(project, member, opts = {}) ⇒ nil

Remove a member associated with this project This also sets their invite status to ‘REMOVED`. This endpoint requires the user to be a member of the project with the role `OWNER`.

Parameters:

  • project (String)
  • member (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1022
1023
1024
1025
# File 'lib/ory-client/api/project_api.rb', line 1022

def remove_project_member(project, member, opts = {})
  remove_project_member_with_http_info(project, member, opts)
  nil
end

#remove_project_member_with_http_info(project, member, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove a member associated with this project This also sets their invite status to &#x60;REMOVED&#x60;. This endpoint requires the user to be a member of the project with the role &#x60;OWNER&#x60;.

Parameters:

  • project (String)
  • member (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
# File 'lib/ory-client/api/project_api.rb', line 1033

def remove_project_member_with_http_info(project, member, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.remove_project_member ...'
  end
  # verify the required parameter 'project' is set
  if @api_client.config.client_side_validation && project.nil?
    fail ArgumentError, "Missing the required parameter 'project' when calling ProjectApi.remove_project_member"
  end
  # verify the required parameter 'member' is set
  if @api_client.config.client_side_validation && member.nil?
    fail ArgumentError, "Missing the required parameter 'member' when calling ProjectApi.remove_project_member"
  end
  # resource path
  local_var_path = '/projects/{project}/members/{member}'.sub('{' + 'project' + '}', CGI.escape(project.to_s)).sub('{' + 'member' + '}', CGI.escape(member.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.remove_project_member",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#remove_project_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_active_project_in_console(opts = {}) ⇒ nil

Sets the Ory Network Project active in the Ory Network Console Use this API to set your active project in the Ory Network Console UI.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1090
1091
1092
1093
# File 'lib/ory-client/api/project_api.rb', line 1090

def set_active_project_in_console(opts = {})
  set_active_project_in_console_with_http_info(opts)
  nil
end

#set_active_project_in_console_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Sets the Ory Network Project active in the Ory Network Console Use this API to set your active project in the Ory Network Console UI.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/ory-client/api/project_api.rb', line 1100

def set_active_project_in_console_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.set_active_project_in_console ...'
  end
  # resource path
  local_var_path = '/console/active/project'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_active_project_in_console_body'])

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.set_active_project_in_console",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#set_active_project_in_console\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_project(project_id, opts = {}) ⇒ SuccessfulProjectUpdate

Update an Ory Network Project Configuration This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, …). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the ‘version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed. Be aware that updating any service’s configuration will completely override your current configuration for that service!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1155
1156
1157
1158
# File 'lib/ory-client/api/project_api.rb', line 1155

def set_project(project_id, opts = {})
  data, _status_code, _headers = set_project_with_http_info(project_id, opts)
  data
end

#set_project_with_http_info(project_id, opts = {}) ⇒ Array<(SuccessfulProjectUpdate, Integer, Hash)>

Update an Ory Network Project Configuration This endpoints allows you to update the Ory Network project configuration for individual services (identity, permission, …). The configuration is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to the Ory Network, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed. Be aware that updating any service&#39;s configuration will completely override your current configuration for that service!

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(SuccessfulProjectUpdate, Integer, Hash)>)

    SuccessfulProjectUpdate data, response status code and response headers



1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
# File 'lib/ory-client/api/project_api.rb', line 1166

def set_project_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.set_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.set_project"
  end
  # resource path
  local_var_path = '/projects/{project_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_project'])

  # return_type
  return_type = opts[:debug_return_type] || 'SuccessfulProjectUpdate'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.set_project",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#set_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_organization(project_id, organization_id, opts = {}) ⇒ Organization

Update a B2B SSO Organization for a project.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1225
1226
1227
1228
# File 'lib/ory-client/api/project_api.rb', line 1225

def update_organization(project_id, organization_id, opts = {})
  data, _status_code, _headers = update_organization_with_http_info(project_id, organization_id, opts)
  data
end

#update_organization_with_http_info(project_id, organization_id, opts = {}) ⇒ Array<(Organization, Integer, Hash)>

Update a B2B SSO Organization for a project.

Parameters:

  • project_id (String)

    Project ID The project&#39;s ID.

  • organization_id (String)

    Organization ID The Organization&#39;s ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(Organization, Integer, Hash)>)

    Organization data, response status code and response headers



1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
# File 'lib/ory-client/api/project_api.rb', line 1236

def update_organization_with_http_info(project_id, organization_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProjectApi.update_organization ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectApi.update_organization"
  end
  # verify the required parameter 'organization_id' is set
  if @api_client.config.client_side_validation && organization_id.nil?
    fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProjectApi.update_organization"
  end
  # resource path
  local_var_path = '/projects/{project_id}/organizations/{organization_id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'organization_id' + '}', CGI.escape(organization_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'organization_body'])

  # return_type
  return_type = opts[:debug_return_type] || 'Organization'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']

  new_options = opts.merge(
    :operation => :"ProjectApi.update_organization",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectApi#update_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end