Skip to content

matteeyah/gong-api

Repository files navigation

gong_api

GongAPI - the Ruby gem for the Gong API

Overview

The Gong API allows you to:

  1. Receive the following information from Gong:
    1. Your company's calls in Gong
    2. Your company's users in Gong
    3. Your company's user stats in Gong
    4. Your company's user settings in Gong
    5. Your company's libraries in Gong
  2. Upload new or update call recordings in Gong, in order to support cases where you have an internal system that records calls or obtains them from a third-party entity.
  3. Data Privacy: Delete users and all their associated elements.
  4. Upload CRM data into Gong.

Base URL for all API calls is https://us-55616.api.gong.io

Authentication

There are two ways to retrieve credentials to the Gong Public API:

  1. Retrieve Manually: In the Gong API Page (you must be a technical administrator in Gong), click "Create" to receive an Access Key and an Access Key Secret. Use the Basic Authorization HTTP header (as per RFC) to access the Public API as shown below: Authorization: Basic <token> To create the basic token, combine the Access Key and the Access Key Secret with colon (:) and then encode in Base64 as following: Base64(<accessKey> : <accessKeySecret>)

  2. Retrieve through OAuth To obtain the Bearer token, follow the steps described in the Gong OAuth Guide.

    After obtaining the token, use the Bearer Authorization HTTP header (as per RFC) to access the Public API as shown below: Authorization: Bearer <token>

Limits

By default Gong limits your company's access to the service to 3 API calls per second, and 10,000 API calls per day.

When the rate of API calls exceeds these limits an HTTP status code 429 is returned and a Retry-After header indicates how many seconds to wait before making a new request.

If required, contact help@gong.io to change these limits.

Cursors

Some API calls that return a list are limited in the amount of records they may return, so multiple API calls may be required to bring all records. Such an API call also returns a records field, which contains the number of records in the current page, the current page number and the total number of records.

In cases where the total number of records exceeds the number of records thus far retrieved, the records field will also contain a cursor field which can be used to access the next page of records. To retrieve the next page, repeat the API call with the cursor value as supplied by the previous API call. All other request inputs should remain the same.

Forward Compatibility

When coding a system to accept Gong data, take into account that Gong may, without prior warning, add fields to the JSON output. It is recommended to future proof your code so that it disregards all JSON fields you don't actually use.

Swagger

This SDK is automatically generated by the Swagger Codegen project:

  • API version: V2
  • Package version: 1.0.0
  • Build date: 2023-01-20T15:01:29.073752+01:00[Europe/Belgrade]
  • Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen

Installation

Rubygems

gem install gong_api

If you're using Bundler, you can add this to your Gemfile

    gem 'gong_api'

Building the gem locally

To build the Ruby code into a gem:

gem build gong_api.gemspec

Then install the gem locally:

gem install ./gong_api-1.0.0.gem

(for development, run gem install --dev ./gong_api-1.0.0.gem to install the development dependencies)

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'gong_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'gong_api'

api_instance = GongAPI::AuditingApi.new
from_date_time = 'from_date_time_example' # String | The time from which to retrieve log records, in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC).
log_type = 'log_type_example' # String | Type of logs requested.
opts = { 
  cursor: 'cursor_example', # String | When paging is needed, provide the value supplied by the previous API call to bring the following page of records.
  to_date_time: 'to_date_time_example' # String | The time until which to retrieve log records, in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC); if not specified, the logs end with the latest recorded log.
}

begin
  #Retrieve logs data by type and time range (/v2/logs)
  result = api_instance.list_logs_using_get(from_date_time, log_type, opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling AuditingApi->list_logs_using_get: #{e}"
end

api_instance = GongAPI::CRMApi.new
client_request_id = 'client_request_id_example' # String | A unique identifier sent by you to allow troubleshooting requests. Valid characters for this field are letters, numbers, dashes and underscores.
integration_id = 789 # Integer | Integration ID generated when creating the integration


begin
  #Delete a Generic CRM integration (/v2/crm/integration/delete)
  result = api_instance.delete_generic_crm_integration_using_delete(client_request_id, integration_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->delete_generic_crm_integration_using_delete: #{e}"
end

api_instance = GongAPI::CRMApi.new
body = ['body_example'] # Array<String> | Requested objects crm ids
integration_id = 789 # Integer | Integration ID generated when creating the integration
object_type = 'object_type_example' # String | Requested objects type


begin
  #Get CRM objects (/v2/crm/object/list)
  result = api_instance.get_crm_objects_using_get(body, integration_id, object_type)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->get_crm_objects_using_get: #{e}"
end

api_instance = GongAPI::CRMApi.new
client_request_id = 'client_request_id_example' # String | <span style='background: rgba(9,30,66,0.08)'>clientRequestId</span> sent to \"/map/users\", \"/object/entities\" or \"/integration/delete\" API
integration_id = 789 # Integer | Integration ID generated when creating the integration


begin
  #Get Request Status (/v2/crm/request-status)
  result = api_instance.get_request_status_using_get(client_request_id, integration_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->get_request_status_using_get: #{e}"
end

api_instance = GongAPI::CRMApi.new
integration_id = 789 # Integer | Integration ID generated when creating the integration
object_type = 'object_type_example' # String | Type of object to retrieve the schema fields for (case-sensitive). <br>Omitting this parameter returns the schema for all object types.


begin
  #List Schema Fields (/v2/crm/object/schema/list)
  result = api_instance.list_crm_schema_fields_using_get(integration_id, object_type)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->list_crm_schema_fields_using_get: #{e}"
end

api_instance = GongAPI::CRMApi.new

begin
  #Get Generic CRM integration details (/v2/crm/integration/list)
  result = api_instance.list_generic_crm_integration_using_get
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->list_generic_crm_integration_using_get: #{e}"
end

api_instance = GongAPI::CRMApi.new
opts = { 
  data_file: 'data_file_example' # String | 
}

begin
  #Map Users (Deprecated)
  result = api_instance.map_crm_users_using_post(opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->map_crm_users_using_post: #{e}"
end

api_instance = GongAPI::CRMApi.new
body = GongAPI::GenericCrmRegistrationRequest.new # GenericCrmRegistrationRequest | registrationRequest


begin
  #Register a Generic CRM integration (/v2/crm/integration/new)
  result = api_instance.register_generic_crm_integration_using_put(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->register_generic_crm_integration_using_put: #{e}"
end

api_instance = GongAPI::CRMApi.new
opts = { 
  data_file: 'data_file_example' # String | 
}

begin
  #Upload CRM objects (/v2/crm/object/entities)
  result = api_instance.upload_crm_data_using_post(opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->upload_crm_data_using_post: #{e}"
end

api_instance = GongAPI::CRMApi.new
body = [GongAPI::GenericSchemaFieldRequest.new] # Array<GenericSchemaFieldRequest> | fields
integration_id = 789 # Integer | Integration ID generated when creating the integration
object_type = 'object_type_example' # String | Type of object to set the schema for (case-sensitive)


begin
  #Upload Object Schema (/v2/crm/object/schema)
  result = api_instance.upload_crm_schema_field_using_post(body, integration_id, object_type)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->upload_crm_schema_field_using_post: #{e}"
end

api_instance = GongAPI::CRMApi.new
body = [GongAPI::GenericDealStageRequest.new] # Array<GenericDealStageRequest> | stages
integration_id = 789 # Integer | Integration ID generated when creating the integration


begin
  #Upload Stages (Deprecated)
  result = api_instance.upload_stages_using_post(body, integration_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CRMApi->upload_stages_using_post: #{e}"
end

api_instance = GongAPI::CallsApi.new
id = 'id_example' # String | callId returned from 'Add New Call' request
opts = { 
  media_file: 'media_file_example' # String | 
}

begin
  #Add call media (/v2/calls/{id}/media)
  result = api_instance.add_call_recording_using_put(id, opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->add_call_recording_using_put: #{e}"
end

api_instance = GongAPI::CallsApi.new
body = GongAPI::NewCallAddingRequest.new # NewCallAddingRequest | newCallAddingRequest


begin
  #Add new call (/v2/calls)
  result = api_instance.add_call_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->add_call_using_post: #{e}"
end

api_instance = GongAPI::CallsApi.new
body = GongAPI::RequestCallsFilter.new # RequestCallsFilter | callsRequest


begin
  #Retrieve transcripts of calls by date or callIds (/v2/calls/transcript)
  result = api_instance.get_call_transcripts_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->get_call_transcripts_using_post: #{e}"
end

api_instance = GongAPI::CallsApi.new
id = 'id_example' # String | Gong's unique numeric identifier for the call (up to 20 digits).


begin
  #Retrieve data for a specific call (/v2/calls/{id})
  result = api_instance.get_call_using_get(id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->get_call_using_get: #{e}"
end

api_instance = GongAPI::CallsApi.new
body = GongAPI::RequestCallsRequestFilterWithOwnersContentSelector.new # RequestCallsRequestFilterWithOwnersContentSelector | callsRequest


begin
  #Retrieve detailed call data by various filters (/v2/calls/extensive)
  result = api_instance.list_calls_extensive_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->list_calls_extensive_using_post: #{e}"
end

api_instance = GongAPI::CallsApi.new
from_date_time = 'from_date_time_example' # String | The date from which to list calls, in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC); if not specified, the calls start with the earliest recorded call. For web-conference calls recorded by Gong, the date denotes its scheduled time, otherwise, it denotes its actual start time.
to_date_time = 'to_date_time_example' # String | The date until which to list calls, in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC); if not specified, the calls end with the latest recorded call. For web-conference calls recorded by Gong, the date denotes its scheduled time, otherwise, it denotes its actual start time.
opts = { 
  cursor: 'cursor_example', # String | When paging is needed, provide the value supplied by the previous API call to bring the following page of records.
  workspace_id: 'workspace_id_example' # String | Optional Workspace identifier, if supplied the API will return only the calls belonging to this workspace.
}

begin
  #Retrieve call data by date range (/v2/calls)
  result = api_instance.list_calls_using_get(from_date_time, to_date_time, opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->list_calls_using_get: #{e}"
end

api_instance = GongAPI::CallsApi.new
opts = { 
  cursor: 'cursor_example', # String | When paging is needed, provide the value supplied by the previous API call to bring the following page of records.
  from_date_time: 'from_date_time_example' # String | Association time filter - only the associations made after that time will be listed. The time is in the ISO-8601 format (e.g., '2018-02-18T02:30:00-07:00' or '2018-02-18T08:00:00Z', where Z stands for UTC); if not specified all association events will be listed.
}

begin
  #List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase
  result = api_instance.list_crm_calls_manual_association_using_get(opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling CallsApi->list_crm_calls_manual_association_using_get: #{e}"
end

api_instance = GongAPI::DataPrivacyApi.new
email_address = 'email_address_example' # String | The email address.


begin
  #Retrieve all references to an email address. (/v2/data-privacy/data-for-email-address)
  result = api_instance.find_all_references_to_email_address_using_get(email_address)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling DataPrivacyApi->find_all_references_to_email_address_using_get: #{e}"
end

api_instance = GongAPI::DataPrivacyApi.new
phone_number = 'phone_number_example' # String | The phone number.  This number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored.  The following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc.  Note: This parameter should be URL-encoded.


begin
  #Retrieve all references to a phone number. (/v2/data-privacy/data-for-phone-number)
  result = api_instance.find_all_references_to_phone_number_using_get(phone_number)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling DataPrivacyApi->find_all_references_to_phone_number_using_get: #{e}"
end

api_instance = GongAPI::DataPrivacyApi.new
email_address = 'email_address_example' # String | The email address.


begin
  #Delete the email address, and all associated elements (/v2/data-privacy/erase-data-for-email-address)
  result = api_instance.purge_email_address_using_post(email_address)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling DataPrivacyApi->purge_email_address_using_post: #{e}"
end

api_instance = GongAPI::DataPrivacyApi.new
phone_number = 'phone_number_example' # String | The phone number.  This number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored.  The following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc.  Note: This parameter should be URL-encoded.


begin
  #Delete the phone number, and all associated elements (/v2/data-privacy/erase-data-for-phone-number)
  result = api_instance.purge_phone_number_using_post(phone_number)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling DataPrivacyApi->purge_phone_number_using_post: #{e}"
end

api_instance = GongAPI::EngagementInBetaPhaseApi.new
body = GongAPI::ContentSharedEvent.new # ContentSharedEvent | request


begin
  #Report event of a content share (/v2/customer-engagement/content/shared)
  result = api_instance.content_shared_using_put(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling EngagementInBetaPhaseApi->content_shared_using_put: #{e}"
end

api_instance = GongAPI::EngagementInBetaPhaseApi.new
body = GongAPI::ContentViewedEvent.new # ContentViewedEvent | request


begin
  #Report event of a content view (/v2/customer-engagement/content/viewed)
  result = api_instance.content_viewed_using_put(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling EngagementInBetaPhaseApi->content_viewed_using_put: #{e}"
end

api_instance = GongAPI::EngagementInBetaPhaseApi.new
body = GongAPI::CustomActionEvent.new # CustomActionEvent | request


begin
  #Report event of a custom action (/v2/customer-engagement/action)
  result = api_instance.custom_action_using_put(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling EngagementInBetaPhaseApi->custom_action_using_put: #{e}"
end

api_instance = GongAPI::LibraryApi.new
opts = { 
  folder_id: 'folder_id_example' # String | Gong's unique numeric identifier for the folder (up to 20 digits).
}

begin
  #List of calls in a specific folder (/v2/library/folder-content)
  result = api_instance.get_calls_in_specific_folder_using_get(opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling LibraryApi->get_calls_in_specific_folder_using_get: #{e}"
end

api_instance = GongAPI::LibraryApi.new
opts = { 
  workspace_id: 'workspace_id_example' # String | Workspace identifier. We will retrieve folders which are related to this specific workspace.
}

begin
  #Retrieve Library folders (/v2/library/folders)
  result = api_instance.get_library_structure_using_get(opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling LibraryApi->get_library_structure_using_get: #{e}"
end

api_instance = GongAPI::MeetingsInBetaPhaseApi.new
body = GongAPI::NewMeetingRequest.new # NewMeetingRequest | newMeetingRequest


begin
  #Create a New Gong Meeting (/v2/meetings)
  result = api_instance.add_meeting_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling MeetingsInBetaPhaseApi->add_meeting_using_post: #{e}"
end

api_instance = GongAPI::MeetingsInBetaPhaseApi.new
body = GongAPI::DeleteMeetingRequest.new # DeleteMeetingRequest | request
meeting_id = 789 # Integer | Gong's unique identifier for the meeting (up to 20 digits).


begin
  #Delete a Gong Meeting (/v2/meetings)
  result = api_instance.delete_meeting_using_delete(body, meeting_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling MeetingsInBetaPhaseApi->delete_meeting_using_delete: #{e}"
end

api_instance = GongAPI::MeetingsInBetaPhaseApi.new
body = GongAPI::IntegrationStatusRequest.new # IntegrationStatusRequest | integrationStatusRequest


begin
  #Validate Gong meeting Integration (/v2/meetings/integration/status)
  result = api_instance.integration_status_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling MeetingsInBetaPhaseApi->integration_status_using_post: #{e}"
end

api_instance = GongAPI::MeetingsInBetaPhaseApi.new
body = GongAPI::UpdateMeetingRequest.new # UpdateMeetingRequest | updateMeetingRequest
meeting_id = 789 # Integer | Gong's unique identifier for the meeting (up to 20 digits).


begin
  #Update a Gong Meeting (/v2/meetings/{meetingId})
  result = api_instance.update_meeting_using_put(body, meeting_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling MeetingsInBetaPhaseApi->update_meeting_using_put: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
body = GongAPI::CallsUsersAccessAddDto.new # CallsUsersAccessAddDto | callsUsersAccessAddDto


begin
  #Give individual users access to calls (/v2/calls/users-access)
  result = api_instance.add_users_access_to_calls_using_put(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->add_users_access_to_calls_using_put: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
body = GongAPI::PermissionProfileDTO.new # PermissionProfileDTO | permissionProfileDTO
workspace_id = 'workspace_id_example' # String | Workspace identifier.  You can retrieve the workspace using the \"workspaces\" (under \"Settings\") API.


begin
  #Create permission profile (/v2/permission-profile)
  result = api_instance.create_permission_profile_using_post(body, workspace_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->create_permission_profile_using_post: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
body = GongAPI::CallsUsersAccessDeleteDto.new # CallsUsersAccessDeleteDto | callsUsersAccessDeleteDto


begin
  #Remove specific individual users access from calls (/v2/calls/users-access)
  result = api_instance.delete_users_access_to_calls_using_delete(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->delete_users_access_to_calls_using_delete: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
profile_id = 'profile_id_example' # String | Permission profile identifier.


begin
  #Permission profile for a given profile Id (/v2/permission-profile)
  result = api_instance.get_permission_profile_using_get(profile_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->get_permission_profile_using_get: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
body = GongAPI::RequestCallsAccessGetDto.new # RequestCallsAccessGetDto | callsAccessGetDto


begin
  #Retrieve users that have specific individual access to calls (/v2/calls/users-access)
  result = api_instance.get_users_access_to_calls_using_get(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->get_users_access_to_calls_using_get: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
profile_id = 'profile_id_example' # String | Permission profile identifier.


begin
  #List all users attached to a given permission profile (/v2/permission-profile/users)
  result = api_instance.list_permission_profile_users_using_get(profile_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->list_permission_profile_users_using_get: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
workspace_id = 'workspace_id_example' # String | Workspace identifier, the API will return only the profiles belonging to this workspace.  You can retrieve the workspace using the \"workspaces\" (under \"Settings\") API.


begin
  #List all company permission profiles for a given workspace (/v2/all-permission-profiles)
  result = api_instance.list_permission_profile_using_get(workspace_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->list_permission_profile_using_get: #{e}"
end

api_instance = GongAPI::PermissionsApi.new
body = GongAPI::PermissionProfileDTO.new # PermissionProfileDTO | permissionProfileDTO
profile_id = 'profile_id_example' # String | Permission profile identifier.


begin
  #Update permission profile (/v2/permission-profile)
  result = api_instance.update_permission_profile_using_put(body, profile_id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling PermissionsApi->update_permission_profile_using_put: #{e}"
end

api_instance = GongAPI::SettingsApi.new

begin
  #Retrieve scorecards details (/v2/settings/scorecards)
  result = api_instance.list_scorecards_using_get
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling SettingsApi->list_scorecards_using_get: #{e}"
end

api_instance = GongAPI::SettingsApi.new

begin
  #List all company workspaces (/v2/workspaces)
  result = api_instance.list_workspaces_using_get
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling SettingsApi->list_workspaces_using_get: #{e}"
end

api_instance = GongAPI::StatsApi.new
body = GongAPI::RequestAnsweredScorecardsFilter.new # RequestAnsweredScorecardsFilter | answeredScorecardsRequest


begin
  #Retrieve answered scorecards for applicable reviewed users or scorecards for a date range (/v2/stats/activity/scorecards)
  result = api_instance.list_answered_scorecards_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling StatsApi->list_answered_scorecards_using_post: #{e}"
end

api_instance = GongAPI::StatsApi.new
body = GongAPI::RequestMultipleUsersWithDates.new # RequestMultipleUsersWithDates | statsRequest


begin
  #Retrieve interaction stats for applicable users by date (/v2/stats/interaction)
  result = api_instance.list_interaction_stats_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling StatsApi->list_interaction_stats_using_post: #{e}"
end

api_instance = GongAPI::StatsApi.new
body = GongAPI::RequestMultipleUsersWithDates.new # RequestMultipleUsersWithDates | multipleUsersRequest


begin
  #Retrieve aggregated activity for defined users by date (/v2/stats/activity/aggregate)
  result = api_instance.list_multiple_users_aggregate_activity_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling StatsApi->list_multiple_users_aggregate_activity_using_post: #{e}"
end

api_instance = GongAPI::StatsApi.new
body = GongAPI::RequestWithTimePeriodMultipleUsersWithDates.new # RequestWithTimePeriodMultipleUsersWithDates | multipleUsersRequest


begin
  #Retrieve aggregated activity for defined users by a date range with grouping in time periods (/v2/stats/activity/aggregate-by-period)
  result = api_instance.list_multiple_users_aggregate_by_period_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling StatsApi->list_multiple_users_aggregate_by_period_using_post: #{e}"
end

api_instance = GongAPI::StatsApi.new
body = GongAPI::RequestMultipleUsersWithDates.new # RequestMultipleUsersWithDates | multipleUsersRequest


begin
  #Retrieve daily activity for applicable users for a date range (/v2/stats/activity/day-by-day)
  result = api_instance.list_multiple_users_day_by_day_activity_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling StatsApi->list_multiple_users_day_by_day_activity_using_post: #{e}"
end

api_instance = GongAPI::UsersApi.new
id = 'id_example' # String | Gong's unique numeric identifier for the user (up to 20 digits).


begin
  #Retrieve user history (/v2/users/{id}/settings-history)
  result = api_instance.get_user_history_using_get(id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling UsersApi->get_user_history_using_get: #{e}"
end

api_instance = GongAPI::UsersApi.new
id = 'id_example' # String | Gong's unique numeric identifier for the user (up to 20 digits).


begin
  #Retrieve user (/v2/users/{id})
  result = api_instance.get_user_using_get(id)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling UsersApi->get_user_using_get: #{e}"
end

api_instance = GongAPI::UsersApi.new
body = GongAPI::RequestMultipleUsersRequestWithCreationDates.new # RequestMultipleUsersRequestWithCreationDates | multipleUsersRequest


begin
  #List users by filter (/v2/users/extensive)
  result = api_instance.list_multiple_users_using_post(body)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling UsersApi->list_multiple_users_using_post: #{e}"
end

api_instance = GongAPI::UsersApi.new
opts = { 
  cursor: 'cursor_example', # String | When paging is needed, provide the value supplied by the previous API call to bring the following page of records.
  include_avatars: true # BOOLEAN | Avatars are synthetic users representing Gong employees (CSMs and support providers) when they access your instance. References to avatars' IDs may be found in the outputs of other API endpoints. This parameter is optional, if not provided avatars will not be included in the results.
}

begin
  #List all users (/v2/users)
  result = api_instance.list_users_using_get(opts)
  p result
rescue GongAPI::ApiError => e
  puts "Exception when calling UsersApi->list_users_using_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to //127.0.0.1/

Class Method HTTP request Description
GongAPI::AuditingApi list_logs_using_get GET /v2/logs Retrieve logs data by type and time range (/v2/logs)
GongAPI::CRMApi delete_generic_crm_integration_using_delete DELETE /v2/crm/integration/delete Delete a Generic CRM integration (/v2/crm/integration/delete)
GongAPI::CRMApi get_crm_objects_using_get GET /v2/crm/object/list Get CRM objects (/v2/crm/object/list)
GongAPI::CRMApi get_request_status_using_get GET /v2/crm/request-status Get Request Status (/v2/crm/request-status)
GongAPI::CRMApi list_crm_schema_fields_using_get GET /v2/crm/object/schema/list List Schema Fields (/v2/crm/object/schema/list)
GongAPI::CRMApi list_generic_crm_integration_using_get GET /v2/crm/integration/list Get Generic CRM integration details (/v2/crm/integration/list)
GongAPI::CRMApi map_crm_users_using_post POST /v2/crm/map/users Map Users (Deprecated)
GongAPI::CRMApi register_generic_crm_integration_using_put PUT /v2/crm/integration/new Register a Generic CRM integration (/v2/crm/integration/new)
GongAPI::CRMApi upload_crm_data_using_post POST /v2/crm/object/entities Upload CRM objects (/v2/crm/object/entities)
GongAPI::CRMApi upload_crm_schema_field_using_post POST /v2/crm/object/schema Upload Object Schema (/v2/crm/object/schema)
GongAPI::CRMApi upload_stages_using_post POST /v2/crm/stages Upload Stages (Deprecated)
GongAPI::CallsApi add_call_recording_using_put PUT /v2/calls/{id}/media Add call media (/v2/calls/{id}/media)
GongAPI::CallsApi add_call_using_post POST /v2/calls Add new call (/v2/calls)
GongAPI::CallsApi get_call_transcripts_using_post POST /v2/calls/transcript Retrieve transcripts of calls by date or callIds (/v2/calls/transcript)
GongAPI::CallsApi get_call_using_get GET /v2/calls/{id} Retrieve data for a specific call (/v2/calls/{id})
GongAPI::CallsApi list_calls_extensive_using_post POST /v2/calls/extensive Retrieve detailed call data by various filters (/v2/calls/extensive)
GongAPI::CallsApi list_calls_using_get GET /v2/calls Retrieve call data by date range (/v2/calls)
GongAPI::CallsApi list_crm_calls_manual_association_using_get GET /v2/calls/manual-crm-associations List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase
GongAPI::DataPrivacyApi find_all_references_to_email_address_using_get GET /v2/data-privacy/data-for-email-address Retrieve all references to an email address. (/v2/data-privacy/data-for-email-address)
GongAPI::DataPrivacyApi find_all_references_to_phone_number_using_get GET /v2/data-privacy/data-for-phone-number Retrieve all references to a phone number. (/v2/data-privacy/data-for-phone-number)
GongAPI::DataPrivacyApi purge_email_address_using_post POST /v2/data-privacy/erase-data-for-email-address Delete the email address, and all associated elements (/v2/data-privacy/erase-data-for-email-address)
GongAPI::DataPrivacyApi purge_phone_number_using_post POST /v2/data-privacy/erase-data-for-phone-number Delete the phone number, and all associated elements (/v2/data-privacy/erase-data-for-phone-number)
GongAPI::EngagementInBetaPhaseApi content_shared_using_put PUT /v2/customer-engagement/content/shared Report event of a content share (/v2/customer-engagement/content/shared)
GongAPI::EngagementInBetaPhaseApi content_viewed_using_put PUT /v2/customer-engagement/content/viewed Report event of a content view (/v2/customer-engagement/content/viewed)
GongAPI::EngagementInBetaPhaseApi custom_action_using_put PUT /v2/customer-engagement/action Report event of a custom action (/v2/customer-engagement/action)
GongAPI::LibraryApi get_calls_in_specific_folder_using_get GET /v2/library/folder-content List of calls in a specific folder (/v2/library/folder-content)
GongAPI::LibraryApi get_library_structure_using_get GET /v2/library/folders Retrieve Library folders (/v2/library/folders)
GongAPI::MeetingsInBetaPhaseApi add_meeting_using_post POST /v2/meetings Create a New Gong Meeting (/v2/meetings)
GongAPI::MeetingsInBetaPhaseApi delete_meeting_using_delete DELETE /v2/meetings/{meetingId} Delete a Gong Meeting (/v2/meetings)
GongAPI::MeetingsInBetaPhaseApi integration_status_using_post POST /v2/meetings/integration/status Validate Gong meeting Integration (/v2/meetings/integration/status)
GongAPI::MeetingsInBetaPhaseApi update_meeting_using_put PUT /v2/meetings/{meetingId} Update a Gong Meeting (/v2/meetings/{meetingId})
GongAPI::PermissionsApi add_users_access_to_calls_using_put PUT /v2/calls/users-access Give individual users access to calls (/v2/calls/users-access)
GongAPI::PermissionsApi create_permission_profile_using_post POST /v2/permission-profile Create permission profile (/v2/permission-profile)
GongAPI::PermissionsApi delete_users_access_to_calls_using_delete DELETE /v2/calls/users-access Remove specific individual users access from calls (/v2/calls/users-access)
GongAPI::PermissionsApi get_permission_profile_using_get GET /v2/permission-profile Permission profile for a given profile Id (/v2/permission-profile)
GongAPI::PermissionsApi get_users_access_to_calls_using_get GET /v2/calls/users-access Retrieve users that have specific individual access to calls (/v2/calls/users-access)
GongAPI::PermissionsApi list_permission_profile_users_using_get GET /v2/permission-profile/users List all users attached to a given permission profile (/v2/permission-profile/users)
GongAPI::PermissionsApi list_permission_profile_using_get GET /v2/all-permission-profiles List all company permission profiles for a given workspace (/v2/all-permission-profiles)
GongAPI::PermissionsApi update_permission_profile_using_put PUT /v2/permission-profile Update permission profile (/v2/permission-profile)
GongAPI::SettingsApi list_scorecards_using_get GET /v2/settings/scorecards Retrieve scorecards details (/v2/settings/scorecards)
GongAPI::SettingsApi list_workspaces_using_get GET /v2/workspaces List all company workspaces (/v2/workspaces)
GongAPI::StatsApi list_answered_scorecards_using_post POST /v2/stats/activity/scorecards Retrieve answered scorecards for applicable reviewed users or scorecards for a date range (/v2/stats/activity/scorecards)
GongAPI::StatsApi list_interaction_stats_using_post POST /v2/stats/interaction Retrieve interaction stats for applicable users by date (/v2/stats/interaction)
GongAPI::StatsApi list_multiple_users_aggregate_activity_using_post POST /v2/stats/activity/aggregate Retrieve aggregated activity for defined users by date (/v2/stats/activity/aggregate)
GongAPI::StatsApi list_multiple_users_aggregate_by_period_using_post POST /v2/stats/activity/aggregate-by-period Retrieve aggregated activity for defined users by a date range with grouping in time periods (/v2/stats/activity/aggregate-by-period)
GongAPI::StatsApi list_multiple_users_day_by_day_activity_using_post POST /v2/stats/activity/day-by-day Retrieve daily activity for applicable users for a date range (/v2/stats/activity/day-by-day)
GongAPI::UsersApi get_user_history_using_get GET /v2/users/{id}/settings-history Retrieve user history (/v2/users/{id}/settings-history)
GongAPI::UsersApi get_user_using_get GET /v2/users/{id} Retrieve user (/v2/users/{id})
GongAPI::UsersApi list_multiple_users_using_post POST /v2/users/extensive List users by filter (/v2/users/extensive)
GongAPI::UsersApi list_users_using_get GET /v2/users List all users (/v2/users)

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

GongAPI - the Ruby client for Gong API

Topics

Resources

Stars

Watchers

Forks

Languages