All URIs are relative to https://api.clerk.com/v1
Method | HTTP request | Description |
---|---|---|
create_jwt_template | POST /jwt_templates | Create a JWT template |
delete_jwt_template | DELETE /jwt_templates/{template_id} | Delete a Template |
get_jwt_template | GET /jwt_templates/{template_id} | Retrieve a template |
list_jwt_templates | GET /jwt_templates | List all templates |
update_jwt_template | PATCH /jwt_templates/{template_id} | Update a JWT template |
create_jwt_template(create_jwt_template_request)
Create a JWT template
Create a new JWT template
require 'time'
require 'clerk-http-client'
# setup authorization
ClerkHttpClient.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkHttpClient::JWTTemplatesApi.new
create_jwt_template_request = ClerkHttpClient::CreateJWTTemplateRequest.new # CreateJWTTemplateRequest |
begin
# Create a JWT template
result = api_instance.create_jwt_template(create_jwt_template_request)
p result
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->create_jwt_template: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_jwt_template_with_http_info(create_jwt_template_request)
begin
# Create a JWT template
data, status_code, headers = api_instance.create_jwt_template_with_http_info(create_jwt_template_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <JWTTemplate>
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->create_jwt_template_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_jwt_template_request | CreateJWTTemplateRequest |
- Content-Type: application/json
- Accept: application/json
delete_jwt_template(template_id)
Delete a Template
require 'time'
require 'clerk-http-client'
# setup authorization
ClerkHttpClient.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkHttpClient::JWTTemplatesApi.new
template_id = 'template_id_example' # String | JWT Template ID
begin
# Delete a Template
result = api_instance.delete_jwt_template(template_id)
p result
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->delete_jwt_template: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_jwt_template_with_http_info(template_id)
begin
# Delete a Template
data, status_code, headers = api_instance.delete_jwt_template_with_http_info(template_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeletedObject>
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->delete_jwt_template_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
template_id | String | JWT Template ID |
- Content-Type: Not defined
- Accept: application/json
get_jwt_template(template_id)
Retrieve a template
Retrieve the details of a given JWT template
require 'time'
require 'clerk-http-client'
# setup authorization
ClerkHttpClient.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkHttpClient::JWTTemplatesApi.new
template_id = 'template_id_example' # String | JWT Template ID
begin
# Retrieve a template
result = api_instance.get_jwt_template(template_id)
p result
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->get_jwt_template: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_jwt_template_with_http_info(template_id)
begin
# Retrieve a template
data, status_code, headers = api_instance.get_jwt_template_with_http_info(template_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <JWTTemplate>
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->get_jwt_template_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
template_id | String | JWT Template ID |
- Content-Type: Not defined
- Accept: application/json
<Array> list_jwt_templates
List all templates
require 'time'
require 'clerk-http-client'
# setup authorization
ClerkHttpClient.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkHttpClient::JWTTemplatesApi.new
begin
# List all templates
result = api_instance.list_jwt_templates
p result
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->list_jwt_templates: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> list_jwt_templates_with_http_info
begin
# List all templates
data, status_code, headers = api_instance.list_jwt_templates_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<JWTTemplate>>
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->list_jwt_templates_with_http_info: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
update_jwt_template(template_id, create_jwt_template_request)
Update a JWT template
Updates an existing JWT template
require 'time'
require 'clerk-http-client'
# setup authorization
ClerkHttpClient.configure do |config|
# Configure Bearer authorization (sk_<environment>_<secret value>): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = ClerkHttpClient::JWTTemplatesApi.new
template_id = 'template_id_example' # String | The ID of the JWT template to update
create_jwt_template_request = ClerkHttpClient::CreateJWTTemplateRequest.new # CreateJWTTemplateRequest |
begin
# Update a JWT template
result = api_instance.update_jwt_template(template_id, create_jwt_template_request)
p result
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->update_jwt_template: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_jwt_template_with_http_info(template_id, create_jwt_template_request)
begin
# Update a JWT template
data, status_code, headers = api_instance.update_jwt_template_with_http_info(template_id, create_jwt_template_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <JWTTemplate>
rescue ClerkHttpClient::ApiError => e
puts "Error when calling JWTTemplatesApi->update_jwt_template_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
template_id | String | The ID of the JWT template to update | |
create_jwt_template_request | CreateJWTTemplateRequest |
- Content-Type: application/json
- Accept: application/json