A Python module for the Elemental Conductor API.
- Elemental CL3 API Docs: https://docs.aws.amazon.com/elemental-cl3/latest/apireference/working-with-the-api.html
- Python Requests Library: https://requests.readthedocs.io/en/latest/
# Initilize a Conductor object with manual credentials
conductor = conductor_api.Conductor("http://127.0.0.1", "elemental", "630f64a8cX9504ec8Kb65225969a605347")
# Initilize a Conductor object using credentials stored as ENV_VARS
conductor = conductor_api.Conductor("http://hostname.net")
# Using Profiles endpoint from Conductor object
conductor.profiles.get(123)
'''
<?xml version="1.0" encoding="UTF-8"?>
<profile href="/profiles/2" product="AWS Elemental Conductor Live" version="3.0.nnnnn">
<name>Profile A</name>
<permalink>profile_a</permalink>
<description></description>
.
.
.
</profile>
'''
# Using Reports endpoint directly
reports = conductor_api.Reports("http://127.0.0.1")
reports.alerts()
'''
<?xml version="1.0" encoding="UTF-8"?>
<alerts href="/alerts" product="AWS Elemental Conductor Live" version="3.2.0.40946" type="array">
<alert>
<id type="integer">18</id>
<type>InputAlert</type>
<name>Live Event 125 Alert 5302</name>
<message>Stopped receiving network data on [udp://239.255.10.7:5001]</message>
<last_set type="datetime">2016-06-01T15:52:17-07:00</last_set>
<quiet type="boolean">false</quiet>
<set type="boolean">true</set>
<threshold nil="true"/>
<code type="integer">5302</code>
<notes nil="true"/>
<alertable_type>Elemental::Live247::Channel</alertable_type>
<alertable_id type="integer">3</alertable_id>
<node_id type="integer">2</node_id>
<updated_at type="datetime">2016-06-01T15:52:18-07:00</updated_at>
<readable_type>Channel</readable_type>
<product_type nil="true"/>
</alert>
<alert>
<id type="integer">16</id>
<type>InputAlert</type>
<name>Live Event 125 Alert 5201</name>
<message>[188] Video not detected: Check input signal</message>
<last_set type="datetime">2016-06-01T15:52:21-07:00</last_set>
<quiet type="boolean">false</quiet>
<set type="boolean">true</set>
<threshold nil="true"/>
<code type="integer">5201</code>
<notes nil="true"/>
<alertable_type>Elemental::Live247::Channel</alertable_type>
<alertable_id type="integer">3</alertable_id>
<node_id type="integer">2</node_id>
<updated_at type="datetime">2016-06-01T15:52:21-07:00</updated_at>
<readable_type>Channel</readable_type>
<product_type nil="true"/>
</alert>
</alerts>
'''