Skip to content

Latest commit

 

History

History
143 lines (100 loc) · 4.08 KB

File metadata and controls

143 lines (100 loc) · 4.08 KB

StackOneHRIS::ConnectSessionsApi

All URIs are relative to https://api.stackone.com

Method HTTP request Description
connect_sessions_authenticate POST /connect_sessions/authenticate Authenticate Session
connect_sessions_create POST /connect_sessions Create Session

connect_sessions_authenticate

connect_sessions_authenticate(connect_session_authenticate)

Authenticate Session

Examples

require 'time'
require 'stackone_hris_client'
# setup authorization
StackOneHRIS.configure do |config|
  # Configure HTTP basic authorization: basic
  config.api_key_token = 'YOUR API KEY'
end

api_instance = StackOneHRIS::ConnectSessionsApi.new
connect_session_authenticate = StackOneHRIS::ConnectSessionAuthenticate.new({token: 'token_example'}) # ConnectSessionAuthenticate | The parameters to authenticate

begin
  # Authenticate Session
  result = api_instance.connect_sessions_authenticate(connect_session_authenticate)
  p result
rescue StackOneHRIS::ApiError => e
  puts "Error when calling ConnectSessionsApi->connect_sessions_authenticate: #{e}"
end

Using the connect_sessions_authenticate_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> connect_sessions_authenticate_with_http_info(connect_session_authenticate)

begin
  # Authenticate Session
  data, status_code, headers = api_instance.connect_sessions_authenticate_with_http_info(connect_session_authenticate)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ConnectSession>
rescue StackOneHRIS::ApiError => e
  puts "Error when calling ConnectSessionsApi->connect_sessions_authenticate_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
connect_session_authenticate ConnectSessionAuthenticate The parameters to authenticate

Return type

ConnectSession

Authorization

basic

HTTP request headers

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

connect_sessions_create

connect_sessions_create(connect_session_create)

Create Session

Examples

require 'time'
require 'stackone_hris_client'
# setup authorization
StackOneHRIS.configure do |config|
  # Configure HTTP basic authorization: basic
  config.api_key_token = 'YOUR API KEY'
end

api_instance = StackOneHRIS::ConnectSessionsApi.new
connect_session_create = StackOneHRIS::ConnectSessionCreate.new({origin_owner_id: 'origin_owner_id_example', origin_owner_name: 'origin_owner_name_example'}) # ConnectSessionCreate |

begin
  # Create Session
  result = api_instance.connect_sessions_create(connect_session_create)
  p result
rescue StackOneHRIS::ApiError => e
  puts "Error when calling ConnectSessionsApi->connect_sessions_create: #{e}"
end

Using the connect_sessions_create_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> connect_sessions_create_with_http_info(connect_session_create)

begin
  # Create Session
  data, status_code, headers = api_instance.connect_sessions_create_with_http_info(connect_session_create)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ConnectSessionToken>
rescue StackOneHRIS::ApiError => e
  puts "Error when calling ConnectSessionsApi->connect_sessions_create_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
connect_session_create ConnectSessionCreate

Return type

ConnectSessionToken

Authorization

basic

HTTP request headers

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