Class: StytchB2B::SCIM::Connection
- Inherits:
-
Object
- Object
- StytchB2B::SCIM::Connection
- Includes:
- Stytch::RequestHelper
- Defined in:
- lib/stytch/b2b_scim.rb
Defined Under Namespace
Classes: CreateRequestOptions, DeleteRequestOptions, GetGroupsRequestOptions, GetRequestOptions, RotateCancelRequestOptions, RotateCompleteRequestOptions, RotateStartRequestOptions, UpdateRequestOptions
Instance Method Summary collapse
-
#create(organization_id:, display_name: nil, identity_provider: nil, method_options: nil) ⇒ Object
Create a new SCIM Connection.
-
#delete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Deletes a SCIM Connection.
-
#get(organization_id:, method_options: nil) ⇒ Object
Get SCIM Connection.
-
#get_groups(organization_id:, connection_id:, cursor: nil, limit: nil, method_options: nil) ⇒ Object
Gets a paginated list of all SCIM Groups associated with a given Connection.
-
#initialize(connection) ⇒ Connection
constructor
A new instance of Connection.
-
#rotate_cancel(organization_id:, connection_id:, method_options: nil) ⇒ Object
Cancel a SCIM token rotation.
-
#rotate_complete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Completes a SCIM token rotation.
-
#rotate_start(organization_id:, connection_id:, method_options: nil) ⇒ Object
Start a SCIM token rotation.
-
#update(organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil) ⇒ Object
Update a SCIM Connection.
Methods included from Stytch::RequestHelper
#delete_request, #get_request, #post_request, #put_request, #request_with_query_params
Constructor Details
#initialize(connection) ⇒ Connection
Returns a new instance of Connection.
177 178 179 |
# File 'lib/stytch/b2b_scim.rb', line 177 def initialize(connection) @connection = connection end |
Instance Method Details
#create(organization_id:, display_name: nil, identity_provider: nil, method_options: nil) ⇒ Object
Create a new SCIM Connection.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - display_name
-
A human-readable display name for the connection. The type of this field is nilable
String
. - identity_provider
-
(no documentation yet) The type of this field is nilable
CreateRequestIdentityProvider
(string enum).
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
. - connection
-
The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable
SCIMConnectionWithToken
(object
).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::CreateRequestOptions
object which will modify the headers sent in the HTTP request.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/stytch/b2b_scim.rb', line 448 def create( organization_id:, display_name: nil, identity_provider: nil, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} request[:display_name] = display_name unless display_name.nil? request[:identity_provider] = identity_provider unless identity_provider.nil? post_request("/v1/b2b/scim/#{organization_id}/connection", request, headers) end |
#delete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Deletes a SCIM Connection.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - connection_id
-
The ID of the SCIM connection. The type of this field is
String
.
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - connection_id
-
The ‘connection_id` that was deleted as part of the delete request. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
.
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::DeleteRequestOptions
object which will modify the headers sent in the HTTP request.
256 257 258 259 260 261 262 263 264 |
# File 'lib/stytch/b2b_scim.rb', line 256 def delete( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? delete_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", headers) end |
#get(organization_id:, method_options: nil) ⇒ Object
Get SCIM Connection.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
.
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
. - connection
-
(no documentation yet) The type of this field is nilable
SCIMConnection
(object
).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::GetRequestOptions
object which will modify the headers sent in the HTTP request.
484 485 486 487 488 489 490 491 492 493 |
# File 'lib/stytch/b2b_scim.rb', line 484 def get( organization_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? query_params = {} request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connection", query_params) get_request(request, headers) end |
#get_groups(organization_id:, connection_id:, cursor: nil, limit: nil, method_options: nil) ⇒ Object
Gets a paginated list of all SCIM Groups associated with a given Connection.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - connection_id
-
The ID of the SCIM connection. The type of this field is
String
. - cursor
-
The ‘cursor` field allows you to paginate through your results. Each result array is limited to 1000 results. If your query returns more than 1000 results, you will need to paginate the responses using the `cursor`. If you receive a response that includes a non-null `next_cursor` in the `results_metadata` object, repeat the search call with the `next_cursor` value set to the `cursor` field to retrieve the next page of results. Continue to make search calls until the `next_cursor` in the response is null. The type of this field is nilable
String
. - limit
-
The number of search results to return per page. The default limit is 100. A maximum of 1000 results can be returned by a single search request. If the total size of your result set is greater than one page size, you must paginate the response. See the ‘cursor` field. The type of this field is nilable
Integer
.
Returns:
An object with the following fields:
- scim_groups
-
A list of SCIM Connection Groups belonging to the connection. The type of this field is list of
SCIMGroup
(object
). - status_code
-
(no documentation yet) The type of this field is
Integer
. - next_cursor
-
The ‘next_cursor` string is returned when your search result contains more than one page of results. This value is passed into your next search call in the `cursor` field. The type of this field is nilable
String
.
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::GetGroupsRequestOptions
object which will modify the headers sent in the HTTP request.
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/stytch/b2b_scim.rb', line 404 def get_groups( organization_id:, connection_id:, cursor: nil, limit: nil, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? query_params = { cursor: cursor, limit: limit } request = request_with_query_params("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", query_params) get_request(request, headers) end |
#rotate_cancel(organization_id:, connection_id:, method_options: nil) ⇒ Object
Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - connection_id
-
The ID of the SCIM connection. The type of this field is
String
.
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
. - connection
-
The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable
SCIMConnection
(object
).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::RotateCancelRequestOptions
object which will modify the headers sent in the HTTP request.
362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/stytch/b2b_scim.rb', line 362 def rotate_cancel( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/cancel", request, headers) end |
#rotate_complete(organization_id:, connection_id:, method_options: nil) ⇒ Object
Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to be the new token supplied in the [start SCIM token rotation](stytch.com/docs/b2b/api/scim-rotate-token-start) response.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - connection_id
-
The ID of the SCIM connection. The type of this field is
String
.
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
. - connection
-
The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable
SCIMConnection
(object
).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::RotateCompleteRequestOptions
object which will modify the headers sent in the HTTP request.
326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/stytch/b2b_scim.rb', line 326 def rotate_complete( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/complete", request, headers) end |
#rotate_start(organization_id:, connection_id:, method_options: nil) ⇒ Object
Start a SCIM token rotation.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - connection_id
-
The ID of the SCIM connection. The type of this field is
String
.
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
. - connection
-
The ‘SCIM Connection` object affected by this API call. See the [SCIM Connection Object](stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. The type of this field is nilable
SCIMConnectionWithNextToken
(object
).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::RotateStartRequestOptions
object which will modify the headers sent in the HTTP request.
290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/stytch/b2b_scim.rb', line 290 def rotate_start( organization_id:, connection_id:, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} post_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}/rotate/start", request, headers) end |
#update(organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil) ⇒ Object
Update a SCIM Connection.
Parameters:
- organization_id
-
Globally unique UUID that identifies a specific Organization. The ‘organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. The type of this field is
String
. - connection_id
-
The ID of the SCIM connection. The type of this field is
String
. - display_name
-
A human-readable display name for the connection. The type of this field is nilable
String
. - identity_provider
-
(no documentation yet) The type of this field is nilable
UpdateRequestIdentityProvider
(string enum). - scim_group_implicit_role_assignments
-
An array of SCIM group implicit role assignments. Each object in the array must contain a ‘group_id` and a `role_id`. The type of this field is nilable list of
SCIMGroupImplicitRoleAssignments
.
Returns:
An object with the following fields:
- request_id
-
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue. The type of this field is
String
. - status_code
-
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. The type of this field is
Integer
. - connection
-
The ‘SAML Connection` object affected by this API call. See the [SAML Connection Object](stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. The type of this field is nilable
SCIMConnection
(object
).
Method Options:
This method supports an optional StytchB2B::SCIM::Connection::UpdateRequestOptions
object which will modify the headers sent in the HTTP request.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/stytch/b2b_scim.rb', line 214 def update( organization_id:, connection_id:, display_name: nil, identity_provider: nil, scim_group_implicit_role_assignments: nil, method_options: nil ) headers = {} headers = headers.merge(.to_headers) unless .nil? request = {} request[:display_name] = display_name unless display_name.nil? request[:identity_provider] = identity_provider unless identity_provider.nil? request[:scim_group_implicit_role_assignments] = scim_group_implicit_role_assignments unless scim_group_implicit_role_assignments.nil? put_request("/v1/b2b/scim/#{organization_id}/connection/#{connection_id}", request, headers) end |