Skip to content

Latest commit

 

History

History
124 lines (83 loc) · 5.4 KB

File metadata and controls

124 lines (83 loc) · 5.4 KB

BlocklistIdentifiers

Overview

Available Operations

  • list - List all identifiers on the block-list
  • create - Add identifier to the block-list
  • delete - Delete identifier from block-list

list

Get a list of all identifiers which are not allowed to access an instance

Example Usage

require 'clerk_sdk_ruby'

Models = ::Clerk::Models
s = ::Clerk::OpenAPIClient.new(
  bearer_auth: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.blocklist_identifiers.list

unless res.blocklist_identifiers.nil?
  # handle response
end

Response

Crystalline::Nilable.new(Models::Operations::ListBlocklistIdentifiersResponse)

Errors

Error Type Status Code Content Type
Models::Errors::ClerkErrors 401, 402 application/json
Errors::APIError 4XX, 5XX */*

create

Create an identifier that is blocked from accessing an instance

Example Usage

require 'clerk_sdk_ruby'

Models = ::Clerk::Models
s = ::Clerk::OpenAPIClient.new(
  bearer_auth: '<YOUR_BEARER_TOKEN_HERE>'
)

req = Models::Operations::CreateBlocklistIdentifierRequest.new(
  identifier: 'example@example.com'
)
res = s.blocklist_identifiers.create(request: req)

unless res.blocklist_identifier.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request Models::Operations::CreateBlocklistIdentifierRequest ✔️ The request object to use for the request.

Response

Crystalline::Nilable.new(Models::Operations::CreateBlocklistIdentifierResponse)

Errors

Error Type Status Code Content Type
Models::Errors::ClerkErrors 400, 402, 422 application/json
Errors::APIError 4XX, 5XX */*

delete

Delete an identifier from the instance block-list

Example Usage

require 'clerk_sdk_ruby'

Models = ::Clerk::Models
s = ::Clerk::OpenAPIClient.new(
  bearer_auth: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.blocklist_identifiers.delete(identifier_id: 'identifier123')

unless res.deleted_object.nil?
  # handle response
end

Parameters

Parameter Type Required Description
identifier_id ::String ✔️ The ID of the identifier to delete from the block-list

Response

Crystalline::Nilable.new(Models::Operations::DeleteBlocklistIdentifierResponse)

Errors

Error Type Status Code Content Type
Models::Errors::ClerkErrors 402, 404 application/json
Errors::APIError 4XX, 5XX */*