Management configuration API

Configuration of the Pexip Infinity platform and services can be performed through the REST API, allowing you to create, view, edit and delete items.

This topic includes information on:

Configuration resources

A summary of the schema for configuration resources is available from the:

  • Management Node web interface via https://<manageraddress>/admin/platform/schema/
  • REST API via https://<manageraddress>/api/admin/configuration/v1/

The following configuration resources are available via the REST API:

Component Path
System configuration
DNS server /api/admin/configuration/v1/dns_server/
NTP server /api/admin/configuration/v1/ntp_server/
Web proxy server /api/admin/configuration/v1/http_proxy/
Syslog server /api/admin/configuration/v1/syslog_server/
SNMP NMS /api/admin/configuration/v1/snmp_network_management_system/
SMTP server /api/admin/configuration/v1/smtp_server/
Static route /api/admin/configuration/v1/static_route/
Exchange servers /api/admin/configuration/v1/ms_exchange_connector/
Exchange domains /api/admin/configuration/v1/exchange_domain/
Event sinks /api/admin/configuration/v1/event_sink/
One-Touch Join Endpoints /api/admin/configuration/v1/mjx_endpoint/
One-Touch Join Endpoint Groups /api/admin/configuration/v1/mjx_endpoint_group/
One-Touch Join Exchange Autodiscover URLs /api/admin/configuration/v1/mjx_exchange_autodiscover_url/
One-Touch Join Exchange Integrations /api/admin/configuration/v1/mjx_exchange_deployment/
One-Touch Join O365 Graph Integrations /api/admin/configuration/v1/mjx_graph_deployment/
One-Touch Join Google Workspace Integrations /api/admin/configuration/v1/mjx_google_deployment/
One-Touch Join Profiles /api/admin/configuration/v1/mjx_integration/
One-Touch Join Meeting Processing Rules /api/admin/configuration/v1/mjx_meeting_processing_rule/
SSH authorized keys /api/admin/configuration/v1/ssh_authorized_key/
Platform configuration
System location /api/admin/configuration/v1/system_location/
Management Node /api/admin/configuration/v1/management_vm/
Conferencing Node /api/admin/configuration/v1/worker_vm/
Licensing /api/admin/configuration/v1/licence/
License request /api/admin/configuration/v1/licence_request/
CA certificate /api/admin/configuration/v1/ca_certificate/
TLS certificate /api/admin/configuration/v1/tls_certificate/
Certificate signing request (CSR) /api/admin/configuration/v1/certificate_signing_request/
Global settings /api/admin/configuration/v1/global/
Diagnostic graphs /api/admin/configuration/v1/diagnostic_graphs/
Call control
H.323 Gatekeeper /api/admin/configuration/v1/h323_gatekeeper/
SIP credentials /api/admin/configuration/v1/sip_credential/
SIP proxy /api/admin/configuration/v1/sip_proxy/
Microsoft SIP proxy /api/admin/configuration/v1/mssip_proxy/
TURN server /api/admin/configuration/v1/turn_server/
STUN server /api/admin/configuration/v1/stun_server/
Policy server /api/admin/configuration/v1/policy_server/
Google Meet access token /api/admin/configuration/v1/gms_access_token/
Google Meet gateway token /api/admin/configuration/v1/gms_gateway_token/
Microsoft Azure tenant /api/admin/configuration/v1/azure_tenant/
Microsoft Teams Connector /api/admin/configuration/v1/teams_proxy/
Epic telehealth profile /api/admin/configuration/v1/telehealth_profile/
Break-in resistance allow list /api/admin/configuration/v1/break_in_allow_list_address/
Service configuration
Virtual Meeting Room, Virtual Auditorium, Virtual Reception, scheduled conference, Media Playback Service, or Test Call Service /api/admin/configuration/v1/conference/
Alias for a service /api/admin/configuration/v1/conference_alias/
Automatically Dialed Participant /api/admin/configuration/v1/automatic_participant/
IVR theme /api/admin/configuration/v1/ivr_theme/
Gateway routing rule /api/admin/configuration/v1/gateway_routing_rule/
Registration settings /api/admin/configuration/v1/registration/
Device /api/admin/configuration/v1/device/
Conference sync template /api/admin/configuration/v1/conference_sync_template/
Conference LDAP sync source /api/admin/configuration/v1/ldap_sync_source/
Conference LDAP sync field /api/admin/configuration/v1/ldap_sync_field/
Recurring conference /api/admin/configuration/v1/recurring_conference/
Scheduled conference /api/admin/configuration/v1/scheduled_conference/
Scheduled conference aliases /api/admin/configuration/v1/scheduled_alias/
Media Playback Service library entry /api/admin/configuration/v1/media_library_entry/
Media Playback Service playlist /api/admin/configuration/v1/media_library_playlist/
Media Playback Service playlist entry /api/admin/configuration/v1/media_library_playlist_entry/
Users
Authentication /api/admin/configuration/v1/authentication/
Account role /api/admin/configuration/v1/role/
LDAP role /api/admin/configuration/v1/ldap_role/
Permission /api/admin/configuration/v1/permission/
AD FS servers /api/admin/configuration/v1/adfs_auth_server/
AD FS domains /api/admin/configuration/v1/adfs_auth_server_domain/
Google OAuth 2.0 Credential /api/admin/configuration/v1/google_auth_server/
Google OAuth domains /api/admin/configuration/v1/google_auth_server_domain/
Users /api/admin/configuration/v1/end_user/
Identity Providers /api/admin/configuration/v1/identity_provider/
Identity Provider Groups /api/admin/configuration/v1/identity_provider_group/
User groups /api/admin/configuration/v1/user_group/
User group mappings /api/admin/configuration/v1/user_group_entity_mapping/
Web app
Web app path /api/admin/configuration/v1/webapp_alias/
Web app branding package /api/admin/configuration/v1/webapp_branding/
Utilities
Upgrade /api/admin/configuration/v1/upgrade/
Software bundle /api/admin/configuration/v1/software_bundle/
Software bundle revision /api/admin/configuration/v1/software_bundle_revision/
System backup /api/admin/configuration/v1/system_backup/
Automatic backup /api/admin/configuration/v1/autobackup/
Teams scheduled scaling /api/admin/configuration/v1/scheduled_scaling/

† We do not currently recommend creation, deletion or modification of these resources directly; this should only be done by the VMR Scheduling for Exchange service.

Resource details

More information can be obtained for each resource by downloading the resource schema in a browser. You may want to install a JSON viewer extension to your browser in order to view the JSON strings in a readable format.

For example, to view the schema for aliases the URI would be:

https://<manageraddress>/api/admin/configuration/v1/conference_alias/schema/?format=json

Each schema contains information on the available fields including:

  • whether the field is optional (nullable: true) or required (nullable: false)
  • the default value
  • the type of data the field must contain
  • the choices for the field, e.g. valid_choices: ["audio", "video", "video-only"]
  • which criteria can be used for filtering and ordering searches
  • help text with additional information on usage.

Resource methods

Each configuration resource supports the following HTTP methods:

Method Action
GET Retrieves the current configuration for a resource
POST Creates a new object for the resource
PATCH Updates an existing resource object, or creates the object if it does not already exist
DELETE Deletes an existing resource object

Getting resource details

See Retrieving, paginating, filtering and ordering resource details for information about how to retrieve the current configuration for a resource.

Creating a single resource object

To create a new object resource, a POST request is submitted to the root URI for the resource. The data should be a JSON object whose attributes match the field values for the resource.

Fields with default values may be omitted from the data.

The response to the POST method contains a Location header which contains the REST URI of the newly created resource.

For example, the URI of a VMR resource takes the format: /api/admin/configuration/v1/conference/<object ID>/

Note that Pexip Infinity always allocates a new object ID when creating a new resource.

Updating a single resource object

To update a single resource object, a PATCH request is submitted to the URI created by concatenating the object ID with the root URI of the resource.

For example, to make changes to the alias with ID 1 the URI would be:

https://<manageraddress>/api/admin/configuration/v1/conference_alias/1/

Updating multiple resource objects

The PATCH method can be used to create, update or delete multiple objects at once. To update multiple objects a PATCH request is submitted to the root URI for the resource. The data must be formatted as a JSON object with a single attribute objects whose value is a list of the new objects.

Note: for any objects in the list that already exist, the resource_uri field must be included in the request. For any objects that are to be created by the PATCH request, the resource_uri field should be omitted.

Deleting all resource objects

If a DELETE operation is invoked on the root resource URI, then all the resource objects will be deleted. You should therefore use this operation with caution, and ensure you include the resource ID in the URI unless your intention actually is to delete all objects.

For example, to delete ALL Virtual Meeting Rooms, the URI is:

"https://<manageraddress>/api/admin/configuration/v1/conference/"

whereas to delete the single Virtual Meeting Room with ID 1 only, the URI is:

"https://<manageraddress>/api/admin/configuration/v1/conference/1/"

Examples

Here are some configuration API examples:

Creating a Virtual Meeting Room, Virtual Auditorium, Virtual Reception, or Test Call Service

To create a new Virtual Meeting Room, Virtual Auditorium, Virtual Reception, or Test Call Service, you must submit a POST to the URI for this resource. You must specify the service_type as follows:

  • conference for a Virtual Meeting Room
  • lecture for a Virtual Auditorium
  • two_stage_dialing for a Virtual Reception
  • media_playback for a Media Playback Service
  • test_call for a Test Call Service

If you do not specify a service_type, the service will by default be created as a Virtual Meeting Room.

The following example creates a new Virtual Meeting Room with the name VMR_1. It has no aliases.

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={'name': 'VMR_1', 'service_type': 'conference'}
    )
print("Created new Virtual Meeting Room:", response.headers['location'])

Getting a Virtual Meeting Room's configuration

By submitting a GET to the resource URI of a Virtual Meeting Room, you can get its configuration:

import json
import requests
response = requests.get(
    "https://<manageraddress>/api/admin/configuration/v1/conference/1/",
    auth=('<user1>', '<password1>'),
    verify=True
    )
print("Virtual Meeting Room:", response.json())

Example output

Virtual Meeting Room: {
    'aliases': [
        {
        'alias': 'meet@example.com',
        'conference': '/api/admin/configuration/v1/conference/1/',
        'creation_time': '2017-05-11T22:02:05.855877',
        'description': '',
        'id': 1
        }
        ]
    'allow_guests': False,
    'automatic_participants': [],
    'call_type': 'video',
    'creation_time': '2017-05-11T22:02:05.848612',
    'crypto_mode: '',
    'description': '',
    'enable_active_speaker_indication': false,
    'enable_chat': 'default',
    'enable_overlay_text': false,
    'force_presenter_into_main': false,
    'guest_identity_provider_group': '',
    'guest_pin': '',
    'guest_view': None,
    'guests_can_present': true,
    'host_identity_provider_group': '',
    'host_view': 'one_main_seven_pips',
    'id': 1,
    'ivr_theme': None,
    'match_string': '',
    'max_callrate_in': None,
    'max_callrate_out': None,
    'max_pixels_per_second': None,
    'mssip_proxy': null,
    'mute_all_guests': false,
    'name': 'VMR_1',
    'non_idp_paticipants': 'disallow_all',
    'participant_limit': None,
    'pin': '',
    'primary_owner_email_address': '',
    'replace_string': '',
    'resource_uri': '/api/admin/configuration/v1/conference/1/',
    'service_type': 'conference',
    'sync_tag': '',
    'system_location': null,
    'tag': ''
    }

Changing an existing Virtual Meeting Room

Submitting a PATCH to an existing Virtual Meeting Room URI allows the data for that Virtual Meeting Room to be modified.

The following example updates the Virtual Meeting Room PIN to 1234:

import json
import requests
response = requests.patch(
    "https://<manageraddress>/api/admin/configuration/v1/conference/1/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={'pin': '1234'}
    )

Adding a Virtual Meeting Room alias

A Virtual Meeting Room must already exist before you can add an alias to it. To do this you submit a POST to the resource URI for Virtual Meeting Room aliases and add the partial URI of the Virtual Meeting Room to the data POSTed.

The following example creates a new alias meet@example.com for the Virtual Meeting Room with ID 1.

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/conference_alias/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'alias': 'meet@example.com',
        'conference': '/api/admin/configuration/v1/conference/1/',
        }
    )
print("Created new alias:", response.headers['location'])

Note that the request is rejected if the alias already exists.

Deleting a Virtual Meeting Room

Deleting a Virtual Meeting Room is achieved by submitting a DELETE request to an existing Virtual Meeting Room URI.

The following example deletes the Virtual Meeting Room with ID 1:

import requests
response = requests.delete(
    "https://<manageraddress>/api/admin/configuration/v1/conference/1/",
    auth=('<user1>', '<password1>'),
    verify=True
    )

Deleting a Virtual Meeting Room will also delete all aliases associated with it.

Creating a Virtual Meeting Room with aliases

To simplify the creation of a Virtual Meeting Room and the aliases that belong to it, you can submit a single POST with all the information.

The following example creates a new Virtual Meeting Room with the name VMR_1 and two aliases: meet and meet@example.com:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'name': 'VMR_1',
        'service_type': 'conference',
        'aliases': [{'alias' : 'meet'}, {'alias' : 'meet@example.com'}]
        }
    )
print("Created new Virtual Meeting Room:", response.headers['location'])

Note that if there is an existing VMR with the same alias, that alias is removed from the previous VMR and assigned to the new VMR.

Getting all Virtual Meeting Rooms, Virtual Auditoriums and Virtual Receptions

Retrieving all the configured Virtual Meeting Rooms, Virtual Auditoriums and Virtual Receptions is achieved by submitting a GET request to the resource URI they all share:

import json
import requests
response = requests.get(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True
    )
print("Virtual Meeting Rooms:", response.json()['objects'])

Getting all Virtual Meeting Rooms only

To retrieve all the configured Virtual Meeting Rooms but not Virtual Auditoriums or Virtual Receptions, you submit a GET request to the resource URI as above but filter it by service_type:

import json
import requests
response = requests.get(
    "https://<manageraddress>/api/admin/configuration/v1/conference/?service_type=conference",
    auth=('<user1>', '<password1>'),
    verify=True
    )
print("Virtual Meeting Rooms:", response.json()['objects'])

Creating multiple Virtual Meeting Rooms

Multiple Virtual Meeting Rooms can be created using a PATCH request.

The following example creates two Virtual Meeting Rooms; the first with the name VMR_1 and an alias meet1@example.com, and the second with the name VMR_2 and an alias meet2@example.com:

import json
import requests
data = { 'objects' : [
    {'name' : 'VMR_1', 'service_type': 'conference', 'aliases' : [{'alias' : 'meet1@example.com'}]},
    {'name' : 'VMR_2', 'service_type': 'conference', 'aliases' : [{'alias' : 'meet2@example.com'}]},
    ]}
response = requests.patch(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json=data
    )

Deleting multiple Virtual Meeting Rooms

Multiple Virtual Meeting Rooms can be deleted using a PATCH request.

The following example deletes four Virtual Meeting Rooms. The deleted_objects list should refer to existing VMR URIs; in this example it refers to the VMRs with IDs of 5, 46, 47 and 65.

import json
import requests
data = {
    'deleted_objects' : [
    "/api/admin/configuration/v1/conference/5/",
    "/api/admin/configuration/v1/conference/46/",
    "/api/admin/configuration/v1/conference/47/",
    "/api/admin/configuration/v1/conference/65/",
    ],
    "objects": []
    }
response = requests.patch(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json=data
    )

Creating a Virtual Auditorium

The following example creates a new Virtual Auditorium with the name Lecture and a single alias lecture@example.com:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'name': 'Lecture',
        'service_type': 'lecture',
        'aliases': [{'alias' : 'lecture@example.com'}]
        }
    )
print("Created new Virtual Auditorium:", response.headers['location'])

Creating a Virtual Reception

The following example creates a new Virtual Reception with the name Reception and a single alias reception@example.com:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/conference/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'name': 'Reception',
        'service_type': 'two_stage_dialing',
        'aliases': [{'alias' : 'reception@example.com'}]
        }
    )
print("Created new Virtual Reception:", response.headers['location'])

Creating Automatically Dialed Participants

You can create a new Automatically Dialed Participant by submitting a POST request to the resource URI for Automatically Dialed Participants. Automatically dialed participants are a little different from other resources as they may be associated with many different Virtual Meeting Rooms and Virtual Auditoriums.

The following example creates an Automatically Dialed Participant and associates them with an already created Virtual Meeting Room with ID 1:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/automatic_participant/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'alias' : 'myendpoint@mydomain.com',
        'remote_display_name' : 'My Name',
        'description' : "Dial myendpoint@mydomain.com whenever a related conference starts",
        'protocol' : 'sip',
        'role' : 'guest',
        'conference' : ['/api/admin/configuration/v1/conference/1/']
        }
    )
print("Created new automatically dialed participant:", response.headers['location'])

Modifying an Automatically Dialed Participant

The following examples use PATCH to modify an existing Automatically Dialed Participant.

The example below associates the Automatically Dialed Participant (created above) with two (already created) Virtual Meeting Rooms — one with ID 1, one with ID 2:

import json
import requests
response = requests.patch(
    "https://<manageraddress>/api/admin/configuration/v1/automatic_participant/1/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'conference' : ['/api/admin/configuration/v1/conference/1/',
        '/api/admin/configuration/v1/conference/2/']
        }
    )
print("added existing automatic participant to an additional meeting room:", response)

Removing an Automatically Dialed Participant from a Virtual Meeting Room

The example below removes the association between the Automatically Dialed Participant and the Virtual Meeting Rooms:

import json
import requests
response = requests.patch(
    "https://<manageraddress>/api/admin/configuration/v1/automatic_participant/1/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'conference' : []
        }
    )
print("Removed automatic participant from all meeting rooms:", response)

Deleting an Automatically Dialed Participant

The following example deletes the Automatically Dialed Participant with ID 1:

import requests
response = requests.delete(
    "https://<manageraddress>/api/admin/configuration/v1/automatic_participant/1/",
    auth=('<user1>', '<password1>'),
    verify=True
    )

Creating Call Routing Rules

To create a new Call Routing Rule you submit a POST to the URI for that resource.

The following example creates a Call Routing Rule with the name Route to Teams, which routes incoming Infinity Gateway calls (via H.323 or SIP) to Microsoft Teams:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/gateway_routing_rule/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'name': 'Route to Teams',
        'priority': 50,
        'match_incoming_calls': True,
        'match_outgoing_calls': False,
        'match_incoming_h323': True,
        'match_incoming_mssip': False,
        'match_incoming_sip': True,
        'match_incoming_webrtc': False,
        'match_string': '(\d{9,12})(@example\.com)?',
        'replace_string': '\1',
        'called_device_type': 'teams_conference',
        'outgoing_protocol': 'teams',
        }
    )
print("Created new Call Routing Rule:", response.headers['location'])

This example creates a Call Routing Rule that applies to outbound calls made from Pexip VMRs and routes them to registered devices only:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/gateway_routing_rule/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'name': 'Outbound calls to registered devices',
        'priority': 60,
        'match_incoming_calls': False,
        'match_outgoing_calls': True,
        'match_string': '.*@mycompany\.com',
        'replace_string': '',
        'called_device_type': 'registration',
        }
    )
print("Created new Call Routing Rule:", response.headers['location'])

Deleting a Call Routing Rule

The following example deletes the Call Routing Rule with ID 1:

import requests
response = requests.delete(
    "https://<manageraddress>/api/admin/configuration/v1/gateway_routing_rule/1/",
    auth=('<user1>', '<password1>'),
    verify=True
    )

Downloading a Conferencing Node for deployment

By submitting a POST request specifying a deployment_type from the list below, you can download an OVA (or ZIP file for Hyper-V) which can be used to deploy a new Proxying Edge Node onto the appropriate host server:

  • MANUAL-ESXI6_7
  • MANUAL-ESXI6
  • MANUAL-HYPERV2012
  • MANUAL-KVM
import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/worker_vm/",
    auth=('<user1>', '<password1>'),
    verify=True,
    stream=True,
    json={
        'name': 'new_node',
        'hostname': 'newnode',
        'domain': 'example.test',
        'address': '<newnode_ip_address>',
        'netmask': '<newnode_ip_mask>',
        'gateway': '<ip_gateway_address>',
        'password': '<newnode_password>',
        'node_type': 'PROXYING',
        'system_location': '/api/admin/configuration/v1/system_location/1/',
        'deployment_type': 'MANUAL-ESXI6_7',
        'vm_cpu_count': '8',
        'vm_system_memory': '16384',
        }
    )
with open('conferencing_node.ova', 'wb') as handle:
    for chunk in response.iter_content(10*1024):
        handle.write(chunk)
print("Downloaded Conferencing Node OVA: conferencing_node.ova")

Deploying a Conferencing Node using a VM template and configuration file

You can use a deployment_type of MANUAL-PROVISION-ONLY to create a VM template for deployment onto unsupported hypervisors or orchestration layers.

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/worker_vm/",
    auth=('<user1>', '<password1>'),
    verify=True,
    stream=True,
    json={
        'name': 'new_node',
        'hostname': 'newnode',
        'domain': 'example.test',
        'address': '<newnode_ip_address>',
        'netmask': '<newnode_ip_mask>',
        'gateway': '<ip_gateway_address>',
        'password': '<newnode_password>',
        'node_type': 'CONFERENCING',
        'system_location': '/api/admin/configuration/v1/system_location/1/',
        'deployment_type': 'MANUAL-PROVISION-ONLY',
        }
    )
with open('conferencing_node.xml', 'wb') as handle:
    for chunk in response.iter_content(10*1024):
        handle.write(chunk)
print("Downloaded Conferencing Node provisioning document: conferencing_node.xml")

 

After the provisioning document has been obtained from the management API as above, it may be injected into the Conferencing Node to be provisioned as follows:

import requests
with open('conferencing_node.xml', 'rb') as handle:
    document = handle.read()
    response = requests.post(
        "https://<conferencingnodeaddress>:8443/configuration/bootstrap",
        verify=True,
        headers={'Content-Type': 'text/xml'},
        data=document,
        )
    if response.status_code == requests.codes.ok:
        print("Successfully provisioned Conferencing Node")

Note that this API is available only on Conferencing Nodes created using the MANUAL-PROVISION-ONLY deployment type.

Uploading a service theme

The following example will create a new theme, upload the theme contents and then configure a VMR to use the theme:

import requests
import json
from urllib.parse import urlsplit
​
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/ivr_theme/",
    auth=("<user1>", "<password1>"),
    json={"name": "New theme"},
    verify=True,
)
theme_uri = response.headers["location"]
theme_path = urlsplit(theme_uri).path
response = requests.patch(
    theme_uri,
    auth=("<user1>", "<password1>"),
    files={"package": open("test_theme.zip", "rb")},
    verify=True,
)
response = requests.patch(
    "https://<manageraddress>/api/admin/configuration/v1/conference/1/",
    auth=("<user1>", "<password1>"),
    json={"ivr_theme": theme_path},
    verify=True,
)

Returning a license

To return a license, send a DELETE request using the format:

import requests
response = requests.delete(
    "https://<manageraddress>/api/admin/configuration/v1/licence/<fulfillment_id>",
    auth=('<user1>', '<password1>'),
    verify=True
    )

where:

  • the fulfillment ID is a 10 digit number
  • you can force offline mode by adding ?offline_mode=True to the end of the URI, in which case it will return with a 202 response and a Location header telling you where to POST the response document.

Adding a license

To add a license entitlement key, send a POST request using the format:

import json
import requests
response = requests.post(
    "https://<manageraddress>/api/admin/configuration/v1/licence/",
    auth=('<user1>', '<password1>'),
    verify=True,
    json={
        'entitlement_id' : '<entitlement key>'
        }
    )
print("Added license entitlement key:", response.headers['location'])

where:

  • the entitlement key is in the form XXXX-XXXX-XXXX-XXXX (where X is a hex digit [0-9A-F]) or is in an encoded format such as SrF1FPcyRjitSHOhtU_XGQ==
  • you can force offline mode by adding 'offline_mode' : True to the JSON data, in which case it will return with a 202 response and a Location header telling you where to GET the request file from, and also where to POST the response document.

To export an offline/stored license request file, you can use:

import json
import requests
response = requests.get(
    "https://<manageraddress>/api/admin/configuration/v1/licence_request/<request_id>/export",
    auth=('<user1>', '<password1>'),
    verify=True
    )
print("License request:", response.json()['actions'])

where the URL to GET the file from is the one returned in the Location header of the response to the initial activation request.

To upload a license response file for a stored license request:

import requests
with open('response.xml', 'r') as response_file:
    response = requests.post(
        'https://<manageraddress>/api/admin/configuration/v1/licence_request/<request_id>',
        auth=('<user1>', '<password1>'),
        verify=True,
        files={'response_xml': ('response.xml', response_file.read())})
    print(response.status_code)

where:

  • 'response_xml' is the path to the file containing the response data
  • in this example the response file is called response.xml and is in the current directory; depending on the type of activation key this could also be a .json file
  • the URL to POST to is the one returned in the Location header of the response to the initial activation request.

Using the Google Meet Gateway Token Management API

All gateway token requests use the same endpoint: https://<manageraddress>/api/admin/configuration/v1/gms_gateway_token/1/

Generating a CSR

Send a GET request to the gateway token endpoint to receive a JSON response with a key csr that will contain the generated CSR.

If a private key has not already been uploaded, then this will generate a new one internally. Note that there is no way to extract this generated private key. If knowing the private key is important, then you will need to generate one locally, upload that, and then generate a new CSR.

Uploading a private key

Send a PATCH request to the gateway token endpoint with private_key set to the private key. The private key must be in PEM format with newlines between each line. A status code of 202 means that the change was successful.

Uploading the certificate

Send a PATCH request to the gateway token endpoint with certificate set to the certificate. A status code of 202 means that the change was successful.

If you have both the private key and certificate, then they can be uploaded at the same time by setting both keys in the request data.

Upload SSH authorized key

To upload an SSH Authorized public key (located in /tmp/sshtmp.pub in this example):

import requests
from pathlib import Path
key = Path("/tmp/sshtmp.pub").read_text()
requests.post("<manageraddress>/api/admin/configuration/v1/ssh_authorized_key/", json={"key": key}, auth=('<user1>', '<password1>'))