Class: OryHydraClient::EnginesApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EnginesApi

Returns a new instance of EnginesApi.



19
20
21
# File 'lib/ory-keto-client/api/engines_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-keto-client/api/engines_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_ory_access_control_policy_role_members(flavor, id, opts = {}) ⇒ OryAccessControlPolicyRole

Add a member to an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be "regex", "glob", and "exact".

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Options Hash (opts):

Returns:



29
30
31
32
# File 'lib/ory-keto-client/api/engines_api.rb', line 29

def add_ory_access_control_policy_role_members(flavor, id, opts = {})
  data, _status_code, _headers = add_ory_access_control_policy_role_members_with_http_info(flavor, id, opts)
  data
end

#add_ory_access_control_policy_role_members_with_http_info(flavor, id, opts = {}) ⇒ Array<(OryAccessControlPolicyRole, Integer, Hash)>

Add a member to an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    OryAccessControlPolicyRole data, response status code and response headers



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
89
90
91
92
# File 'lib/ory-keto-client/api/engines_api.rb', line 41

def add_ory_access_control_policy_role_members_with_http_info(flavor, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.add_ory_access_control_policy_role_members ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.add_ory_access_control_policy_role_members"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EnginesApi.add_ory_access_control_policy_role_members"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/roles/{id}/members'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s)).sub('{' + 'id' + '}', CGI.escape(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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'OryAccessControlPolicyRole' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#add_ory_access_control_policy_role_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_ory_access_control_policy(flavor, id, opts = {}) ⇒ nil

Delete an ORY Access Control Policy

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:

  • (nil)


99
100
101
102
# File 'lib/ory-keto-client/api/engines_api.rb', line 99

def delete_ory_access_control_policy(flavor, id, opts = {})
  delete_ory_access_control_policy_with_http_info(flavor, id, opts)
  nil
end

#delete_ory_access_control_policy_role(flavor, id, opts = {}) ⇒ nil

Delete an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:

  • (nil)


166
167
168
169
# File 'lib/ory-keto-client/api/engines_api.rb', line 166

def delete_ory_access_control_policy_role(flavor, id, opts = {})
  delete_ory_access_control_policy_role_with_http_info(flavor, id, opts)
  nil
end

#delete_ory_access_control_policy_role_with_http_info(flavor, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
223
224
225
226
# File 'lib/ory-keto-client/api/engines_api.rb', line 177

def delete_ory_access_control_policy_role_with_http_info(flavor, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.delete_ory_access_control_policy_role ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.delete_ory_access_control_policy_role"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EnginesApi.delete_ory_access_control_policy_role"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/roles/{id}'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s)).sub('{' + 'id' + '}', CGI.escape(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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#delete_ory_access_control_policy_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_ory_access_control_policy_with_http_info(flavor, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an ORY Access Control Policy

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
153
154
155
156
157
158
# File 'lib/ory-keto-client/api/engines_api.rb', line 109

def delete_ory_access_control_policy_with_http_info(flavor, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.delete_ory_access_control_policy ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.delete_ory_access_control_policy"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EnginesApi.delete_ory_access_control_policy"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/policies/{id}'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s)).sub('{' + 'id' + '}', CGI.escape(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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#delete_ory_access_control_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#do_ory_access_control_policies_allow(flavor, opts = {}) ⇒ AuthorizationResult

Check if a request is allowed Use this endpoint to check if a request is allowed or not. If the request is allowed, a 200 response with ‘"allowed":"true"` will be sent. If the request is denied, a 403 response with `"allowed":"false"` will be sent instead.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

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

    the optional parameters

Options Hash (opts):

Returns:



234
235
236
237
# File 'lib/ory-keto-client/api/engines_api.rb', line 234

def do_ory_access_control_policies_allow(flavor, opts = {})
  data, _status_code, _headers = do_ory_access_control_policies_allow_with_http_info(flavor, opts)
  data
end

#do_ory_access_control_policies_allow_with_http_info(flavor, opts = {}) ⇒ Array<(AuthorizationResult, Integer, Hash)>

Check if a request is allowed Use this endpoint to check if a request is allowed or not. If the request is allowed, a 200 response with &#x60;&quot;allowed&quot;:&quot;true&quot;&#x60; will be sent. If the request is denied, a 403 response with &#x60;&quot;allowed&quot;:&quot;false&quot;&#x60; will be sent instead.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    AuthorizationResult data, response status code and response headers



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
290
291
292
# File 'lib/ory-keto-client/api/engines_api.rb', line 245

def do_ory_access_control_policies_allow_with_http_info(flavor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.do_ory_access_control_policies_allow ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.do_ory_access_control_policies_allow"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/allowed'.sub('{' + 'flavor' + '}', CGI.escape(flavor.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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'AuthorizationResult' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#do_ory_access_control_policies_allow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_ory_access_control_policy(flavor, id, opts = {}) ⇒ OryAccessControlPolicy

Get an ORY Access Control Policy

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:



299
300
301
302
# File 'lib/ory-keto-client/api/engines_api.rb', line 299

def get_ory_access_control_policy(flavor, id, opts = {})
  data, _status_code, _headers = get_ory_access_control_policy_with_http_info(flavor, id, opts)
  data
end

#get_ory_access_control_policy_role(flavor, id, opts = {}) ⇒ OryAccessControlPolicyRole

Get an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:



366
367
368
369
# File 'lib/ory-keto-client/api/engines_api.rb', line 366

def get_ory_access_control_policy_role(flavor, id, opts = {})
  data, _status_code, _headers = get_ory_access_control_policy_role_with_http_info(flavor, id, opts)
  data
end

#get_ory_access_control_policy_role_with_http_info(flavor, id, opts = {}) ⇒ Array<(OryAccessControlPolicyRole, Integer, Hash)>

Get an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:

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

    OryAccessControlPolicyRole data, response status code and response headers



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
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/ory-keto-client/api/engines_api.rb', line 377

def get_ory_access_control_policy_role_with_http_info(flavor, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.get_ory_access_control_policy_role ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.get_ory_access_control_policy_role"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EnginesApi.get_ory_access_control_policy_role"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/roles/{id}'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s)).sub('{' + 'id' + '}', CGI.escape(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[:body] 

  # return_type
  return_type = opts[:return_type] || 'OryAccessControlPolicyRole' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#get_ory_access_control_policy_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_ory_access_control_policy_with_http_info(flavor, id, opts = {}) ⇒ Array<(OryAccessControlPolicy, Integer, Hash)>

Get an ORY Access Control Policy

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

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

    the optional parameters

Returns:

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

    OryAccessControlPolicy data, response status code and response headers



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-keto-client/api/engines_api.rb', line 309

def get_ory_access_control_policy_with_http_info(flavor, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.get_ory_access_control_policy ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.get_ory_access_control_policy"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EnginesApi.get_ory_access_control_policy"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/policies/{id}'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s)).sub('{' + 'id' + '}', CGI.escape(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[:body] 

  # return_type
  return_type = opts[:return_type] || 'OryAccessControlPolicy' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#get_ory_access_control_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_ory_access_control_policies(flavor, opts = {}) ⇒ Array<OryAccessControlPolicy>

List ORY Access Control Policies

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum amount of policies returned.

  • :offset (Integer)

    The offset from where to start looking.

  • :subject (String)

    The subject for whom the policies are to be listed.

  • :resource (String)

    The resource for which the policies are to be listed.

  • :action (String)

    The action for which policies are to be listed.

Returns:



437
438
439
440
# File 'lib/ory-keto-client/api/engines_api.rb', line 437

def list_ory_access_control_policies(flavor, opts = {})
  data, _status_code, _headers = list_ory_access_control_policies_with_http_info(flavor, opts)
  data
end

#list_ory_access_control_policies_with_http_info(flavor, opts = {}) ⇒ Array<(Array<OryAccessControlPolicy>, Integer, Hash)>

List ORY Access Control Policies

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum amount of policies returned.

  • :offset (Integer)

    The offset from where to start looking.

  • :subject (String)

    The subject for whom the policies are to be listed.

  • :resource (String)

    The resource for which the policies are to be listed.

  • :action (String)

    The action for which policies are to be listed.

Returns:

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

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



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
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/ory-keto-client/api/engines_api.rb', line 451

def list_ory_access_control_policies_with_http_info(flavor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.list_ory_access_control_policies ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.list_ory_access_control_policies"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/policies'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
  query_params[:'resource'] = opts[:'resource'] if !opts[:'resource'].nil?
  query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil?

  # 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[:body] 

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

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#list_ory_access_control_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_ory_access_control_policy_roles(flavor, opts = {}) ⇒ Array<OryAccessControlPolicyRole>

List ORY Access Control Policy Roles Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum amount of policies returned.

  • :offset (Integer)

    The offset from where to start looking.

  • :member (String)

    The member for which the roles are to be listed.

Returns:



511
512
513
514
# File 'lib/ory-keto-client/api/engines_api.rb', line 511

def list_ory_access_control_policy_roles(flavor, opts = {})
  data, _status_code, _headers = list_ory_access_control_policy_roles_with_http_info(flavor, opts)
  data
end

#list_ory_access_control_policy_roles_with_http_info(flavor, opts = {}) ⇒ Array<(Array<OryAccessControlPolicyRole>, Integer, Hash)>

List ORY Access Control Policy Roles Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum amount of policies returned.

  • :offset (Integer)

    The offset from where to start looking.

  • :member (String)

    The member for which the roles are to be listed.

Returns:

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

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



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/ory-keto-client/api/engines_api.rb', line 524

def list_ory_access_control_policy_roles_with_http_info(flavor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.list_ory_access_control_policy_roles ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.list_ory_access_control_policy_roles"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/roles'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'member'] = opts[:'member'] if !opts[:'member'].nil?

  # 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[:body] 

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

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#list_ory_access_control_policy_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_ory_access_control_policy_role_members(flavor, id, member, opts = {}) ⇒ nil

Remove a member from an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

  • member (String)

    The member to be removed.

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

    the optional parameters

Returns:

  • (nil)


581
582
583
584
# File 'lib/ory-keto-client/api/engines_api.rb', line 581

def remove_ory_access_control_policy_role_members(flavor, id, member, opts = {})
  remove_ory_access_control_policy_role_members_with_http_info(flavor, id, member, opts)
  nil
end

#remove_ory_access_control_policy_role_members_with_http_info(flavor, id, member, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove a member from an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

  • id (String)

    The ID of the ORY Access Control Policy Role.

  • member (String)

    The member to be removed.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
# File 'lib/ory-keto-client/api/engines_api.rb', line 593

def remove_ory_access_control_policy_role_members_with_http_info(flavor, id, member, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.remove_ory_access_control_policy_role_members ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.remove_ory_access_control_policy_role_members"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling EnginesApi.remove_ory_access_control_policy_role_members"
  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 EnginesApi.remove_ory_access_control_policy_role_members"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/roles/{id}/members/{member}'.sub('{' + 'flavor' + '}', CGI.escape(flavor.to_s)).sub('{' + 'id' + '}', CGI.escape(id.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[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#remove_ory_access_control_policy_role_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upsert_ory_access_control_policy(flavor, opts = {}) ⇒ OryAccessControlPolicy

Upsert an ORY Access Control Policy

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

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

    the optional parameters

Options Hash (opts):

Returns:



653
654
655
656
# File 'lib/ory-keto-client/api/engines_api.rb', line 653

def upsert_ory_access_control_policy(flavor, opts = {})
  data, _status_code, _headers = upsert_ory_access_control_policy_with_http_info(flavor, opts)
  data
end

#upsert_ory_access_control_policy_role(flavor, opts = {}) ⇒ OryAccessControlPolicyRole

Upsert an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

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

    the optional parameters

Options Hash (opts):

Returns:



718
719
720
721
# File 'lib/ory-keto-client/api/engines_api.rb', line 718

def upsert_ory_access_control_policy_role(flavor, opts = {})
  data, _status_code, _headers = upsert_ory_access_control_policy_role_with_http_info(flavor, opts)
  data
end

#upsert_ory_access_control_policy_role_with_http_info(flavor, opts = {}) ⇒ Array<(OryAccessControlPolicyRole, Integer, Hash)>

Upsert an ORY Access Control Policy Role Roles group several subjects into one. Rules can be assigned to ORY Access Control Policy (OACP) by using the Role ID as subject in the OACP.

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    OryAccessControlPolicyRole data, response status code and response headers



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
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
# File 'lib/ory-keto-client/api/engines_api.rb', line 729

def upsert_ory_access_control_policy_role_with_http_info(flavor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.upsert_ory_access_control_policy_role ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.upsert_ory_access_control_policy_role"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/roles'.sub('{' + 'flavor' + '}', CGI.escape(flavor.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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'OryAccessControlPolicyRole' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#upsert_ory_access_control_policy_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upsert_ory_access_control_policy_with_http_info(flavor, opts = {}) ⇒ Array<(OryAccessControlPolicy, Integer, Hash)>

Upsert an ORY Access Control Policy

Parameters:

  • flavor (String)

    The ORY Access Control Policy flavor. Can be &quot;regex&quot;, &quot;glob&quot;, and &quot;exact&quot;.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    OryAccessControlPolicy data, response status code and response headers



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
703
704
705
706
707
708
709
710
# File 'lib/ory-keto-client/api/engines_api.rb', line 663

def upsert_ory_access_control_policy_with_http_info(flavor, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: EnginesApi.upsert_ory_access_control_policy ...'
  end
  # verify the required parameter 'flavor' is set
  if @api_client.config.client_side_validation && flavor.nil?
    fail ArgumentError, "Missing the required parameter 'flavor' when calling EnginesApi.upsert_ory_access_control_policy"
  end
  # resource path
  local_var_path = '/engines/acp/ory/{flavor}/policies'.sub('{' + 'flavor' + '}', CGI.escape(flavor.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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'OryAccessControlPolicy' 

  # auth_names
  auth_names = opts[:auth_names] || []

  new_options = opts.merge(
    :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: EnginesApi#upsert_ory_access_control_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end