All URIs are relative to https://api.merge.dev/api/hris/v1
Method | HTTP request | Description |
---|---|---|
generate_key_create | POST /generate-key |
generate_key_create(generate_remote_key_request)
Create a remote key.
require 'time'
require 'merge_hris_client'
# setup authorization
MergeHRISClient.configure do |config|
# Configure API key authorization: tokenAuth
config.api_key['tokenAuth'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['tokenAuth'] = 'Bearer'
end
api_instance = MergeHRISClient::GenerateKeyApi.new
generate_remote_key_request = MergeHRISClient::GenerateRemoteKeyRequest.new({name: 'Remote Deployment Key 1'}) # GenerateRemoteKeyRequest |
begin
result = api_instance.generate_key_create(generate_remote_key_request)
p result
rescue MergeHRISClient::ApiError => e
puts "Error when calling GenerateKeyApi->generate_key_create: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> generate_key_create_with_http_info(generate_remote_key_request)
begin
data, status_code, headers = api_instance.generate_key_create_with_http_info(generate_remote_key_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <RemoteKey>
rescue MergeHRISClient::ApiError => e
puts "Error when calling GenerateKeyApi->generate_key_create_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
generate_remote_key_request | GenerateRemoteKeyRequest |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json