Skip to content

Latest commit

 

History

History
144 lines (99 loc) · 3.05 KB

File metadata and controls

144 lines (99 loc) · 3.05 KB

Zernio::UsersApi

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

get_user(user_id)

Get user

Returns a single user's details by ID, including name, email, and role.

Examples

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}"
end

Using the get_user_with_http_info variant

This 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

Parameters

Name Type Description Notes
user_id String

Return type

GetUser200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

list_users

list_users

List users

Returns all users in the workspace including roles and profile access. Also returns the currentUserId of the caller.

Examples

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}"
end

Using the list_users_with_http_info variant

This 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}"
end

Parameters

This endpoint does not need any parameter.

Return type

ListUsers200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json