All URIs are relative to https://api.clerk.com/v1
Method | HTTP request | Description |
---|---|---|
create_allowlist_identifier | POST /allowlist_identifiers | Add identifier to the allow-list |
create_blocklist_identifier | POST /blocklist_identifiers | Add identifier to the block-list |
delete_allowlist_identifier | DELETE /allowlist_identifiers/{identifier_id} | Delete identifier from allow-list |
delete_blocklist_identifier | DELETE /blocklist_identifiers/{identifier_id} | Delete identifier from block-list |
list_allowlist_identifiers | GET /allowlist_identifiers | List all identifiers on the allow-list |
list_blocklist_identifiers | GET /blocklist_identifiers | List all identifiers on the block-list |
create_allowlist_identifier(opts)
Add identifier to the allow-list
Create an identifier allowed to sign up to an instance
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::AllowListBlockListApi.new
opts = {
create_allowlist_identifier_request: ClerkBackend::CreateAllowlistIdentifierRequest.new({identifier: 'identifier_example'}) # CreateAllowlistIdentifierRequest |
}
begin
# Add identifier to the allow-list
result = api_instance.create_allowlist_identifier(opts)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->create_allowlist_identifier: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_allowlist_identifier_with_http_info(opts)
begin
# Add identifier to the allow-list
data, status_code, headers = api_instance.create_allowlist_identifier_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <AllowlistIdentifier>
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->create_allowlist_identifier_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_allowlist_identifier_request | CreateAllowlistIdentifierRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
create_blocklist_identifier(opts)
Add identifier to the block-list
Create an identifier that is blocked from accessing an instance
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::AllowListBlockListApi.new
opts = {
create_blocklist_identifier_request: ClerkBackend::CreateBlocklistIdentifierRequest.new({identifier: 'identifier_example'}) # CreateBlocklistIdentifierRequest |
}
begin
# Add identifier to the block-list
result = api_instance.create_blocklist_identifier(opts)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->create_blocklist_identifier: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_blocklist_identifier_with_http_info(opts)
begin
# Add identifier to the block-list
data, status_code, headers = api_instance.create_blocklist_identifier_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <BlocklistIdentifier>
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->create_blocklist_identifier_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_blocklist_identifier_request | CreateBlocklistIdentifierRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
delete_allowlist_identifier(identifier_id)
Delete identifier from allow-list
Delete an identifier from the instance allow-list
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::AllowListBlockListApi.new
identifier_id = 'identifier_id_example' # String | The ID of the identifier to delete from the allow-list
begin
# Delete identifier from allow-list
result = api_instance.delete_allowlist_identifier(identifier_id)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->delete_allowlist_identifier: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_allowlist_identifier_with_http_info(identifier_id)
begin
# Delete identifier from allow-list
data, status_code, headers = api_instance.delete_allowlist_identifier_with_http_info(identifier_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeletedObject>
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->delete_allowlist_identifier_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
identifier_id | String | The ID of the identifier to delete from the allow-list |
- Content-Type: Not defined
- Accept: application/json
delete_blocklist_identifier(identifier_id)
Delete identifier from block-list
Delete an identifier from the instance block-list
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::AllowListBlockListApi.new
identifier_id = 'identifier_id_example' # String | The ID of the identifier to delete from the block-list
begin
# Delete identifier from block-list
result = api_instance.delete_blocklist_identifier(identifier_id)
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->delete_blocklist_identifier: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_blocklist_identifier_with_http_info(identifier_id)
begin
# Delete identifier from block-list
data, status_code, headers = api_instance.delete_blocklist_identifier_with_http_info(identifier_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeletedObject>
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->delete_blocklist_identifier_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
identifier_id | String | The ID of the identifier to delete from the block-list |
- Content-Type: Not defined
- Accept: application/json
<Array> list_allowlist_identifiers
List all identifiers on the allow-list
Get a list of all identifiers allowed to sign up to an instance
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::AllowListBlockListApi.new
begin
# List all identifiers on the allow-list
result = api_instance.list_allowlist_identifiers
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->list_allowlist_identifiers: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> list_allowlist_identifiers_with_http_info
begin
# List all identifiers on the allow-list
data, status_code, headers = api_instance.list_allowlist_identifiers_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<AllowlistIdentifier>>
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->list_allowlist_identifiers_with_http_info: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
list_blocklist_identifiers
List all identifiers on the block-list
Get a list of all identifiers which are not allowed to access an instance
require 'time'
require 'clerk-sdk-ruby-backend'
# setup authorization
ClerkBackend.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkBackend::AllowListBlockListApi.new
begin
# List all identifiers on the block-list
result = api_instance.list_blocklist_identifiers
p result
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->list_blocklist_identifiers: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_blocklist_identifiers_with_http_info
begin
# List all identifiers on the block-list
data, status_code, headers = api_instance.list_blocklist_identifiers_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <BlocklistIdentifiers>
rescue ClerkBackend::ApiError => e
puts "Error when calling AllowListBlockListApi->list_blocklist_identifiers_with_http_info: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json