All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| create_api_key | POST /v1/api-keys | Create key |
| delete_api_key | DELETE /v1/api-keys/{keyId} | Delete key |
| list_api_keys | GET /v1/api-keys | List keys |
create_api_key(create_api_key_request)
Create key
Creates a new API key with an optional expiry. The full key value is only returned once in the response.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::APIKeysApi.new
create_api_key_request = Late::CreateApiKeyRequest.new({name: 'name_example'}) # CreateApiKeyRequest |
begin
# Create key
result = api_instance.create_api_key(create_api_key_request)
p result
rescue Late::ApiError => e
puts "Error when calling APIKeysApi->create_api_key: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_api_key_with_http_info(create_api_key_request)
begin
# Create key
data, status_code, headers = api_instance.create_api_key_with_http_info(create_api_key_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <CreateApiKey201Response>
rescue Late::ApiError => e
puts "Error when calling APIKeysApi->create_api_key_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_api_key_request | CreateApiKeyRequest |
- Content-Type: application/json
- Accept: application/json
delete_api_key(key_id)
Delete key
Permanently revokes and deletes an API key.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::APIKeysApi.new
key_id = 'key_id_example' # String |
begin
# Delete key
result = api_instance.delete_api_key(key_id)
p result
rescue Late::ApiError => e
puts "Error when calling APIKeysApi->delete_api_key: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_api_key_with_http_info(key_id)
begin
# Delete key
data, status_code, headers = api_instance.delete_api_key_with_http_info(key_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeleteAccountGroup200Response>
rescue Late::ApiError => e
puts "Error when calling APIKeysApi->delete_api_key_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| key_id | String |
- Content-Type: Not defined
- Accept: application/json
list_api_keys
List keys
Returns all API keys for the authenticated user. Keys are returned with a preview only, not the full key value.
require 'time'
require 'late-sdk'
# setup authorization
Late.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Late::APIKeysApi.new
begin
# List keys
result = api_instance.list_api_keys
p result
rescue Late::ApiError => e
puts "Error when calling APIKeysApi->list_api_keys: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_api_keys_with_http_info
begin
# List keys
data, status_code, headers = api_instance.list_api_keys_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <ListApiKeys200Response>
rescue Late::ApiError => e
puts "Error when calling APIKeysApi->list_api_keys_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json