Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 2.24 KB

File metadata and controls

79 lines (52 loc) · 2.24 KB

MergeCRMClient::RegenerateKeyApi

All URIs are relative to https://api.merge.dev/api/crm/v1

Method HTTP request Description
regenerate_key_create POST /regenerate-key

regenerate_key_create

regenerate_key_create(remote_key_for_regeneration_request)

Exchange remote keys.

Examples

require 'time'
require 'merge_crm_client'
# setup authorization
MergeCRMClient.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 = MergeCRMClient::RegenerateKeyApi.new
remote_key_for_regeneration_request = MergeCRMClient::RemoteKeyForRegenerationRequest.new({name: 'Remote Deployment Key 1'}) # RemoteKeyForRegenerationRequest | 

begin
  
  result = api_instance.regenerate_key_create(remote_key_for_regeneration_request)
  p result
rescue MergeCRMClient::ApiError => e
  puts "Error when calling RegenerateKeyApi->regenerate_key_create: #{e}"
end

Using the regenerate_key_create_with_http_info variant

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

<Array(, Integer, Hash)> regenerate_key_create_with_http_info(remote_key_for_regeneration_request)

begin
  
  data, status_code, headers = api_instance.regenerate_key_create_with_http_info(remote_key_for_regeneration_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <RemoteKey>
rescue MergeCRMClient::ApiError => e
  puts "Error when calling RegenerateKeyApi->regenerate_key_create_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
remote_key_for_regeneration_request RemoteKeyForRegenerationRequest

Return type

RemoteKey

Authorization

tokenAuth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json