All URIs are relative to https://zernio.com/api
| Method | HTTP request | Description |
|---|---|---|
| get_user | GET /v1/users/{userId} | Get user |
| list_users | GET /v1/users | List users |
get_user(user_id)
Get user
Returns a single user's details by ID, including name, email, and role.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::UsersApi.new
user_id = 'user_id_example' # String |
begin
# Get user
result = api_instance.get_user(user_id)
p result
rescue Zernio::ApiError => e
puts "Error when calling UsersApi->get_user: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_user_with_http_info(user_id)
begin
# Get user
data, status_code, headers = api_instance.get_user_with_http_info(user_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <GetUser200Response>
rescue Zernio::ApiError => e
puts "Error when calling UsersApi->get_user_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | String |
- Content-Type: Not defined
- Accept: application/json
list_users
List users
Returns all users in the workspace including roles and profile access. Also returns the currentUserId of the caller.
require 'time'
require 'zernio-sdk'
# setup authorization
Zernio.configure do |config|
# Configure Bearer authorization (JWT): bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Zernio::UsersApi.new
begin
# List users
result = api_instance.list_users
p result
rescue Zernio::ApiError => e
puts "Error when calling UsersApi->list_users: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_users_with_http_info
begin
# List users
data, status_code, headers = api_instance.list_users_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <ListUsers200Response>
rescue Zernio::ApiError => e
puts "Error when calling UsersApi->list_users_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json