Connections

Retrieving connection objects

class ConnectionMixin

This class defines all functions related to BlueConic connections.

get_connection(connection_id)

Gets the connection with the connection ID and returns it as a BlueConic connection.

Parameters:

connection_id (str) – The connection ID of the connection

Raises:

HTTPError: Request fails

Returns:

The requested connection

Return type:

Connection

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> bc.get_connection('test-connection-id')
<blueconic.domain.connection.Connection >
get_connections(start=0, count=10000000)

Gets all connections and returns them in a generator with all BlueConic connections.

Parameters:
  • start (int, optional) – The connection to start from. Defaults to 0.

  • count (int, optional) – The number of connections to retrieve. Defaults to 10000000.

Returns:

Iterator with Connection

Return type:

Iterator[Connection]

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> connections = bc.get_connections(start=3, count=5)
>>> for connection in connections:
>>>     print(connection.name)
Content Collector for support.blueconic.com
Content Collector for www.blueconic.com
Facebook Custom Audiences
Firehose Kinesis
Google Tag Manager

Using connection objects

class Connection
get_store()

Gets the product/content store of this connection.

Returns:

The Store or None

Return type:

Optional[Store]

Usage:
>>> import blueconic
>>> bc = blueconic.Client()
>>> connection_id = bc.get_blueconic_parameter_value("My connection","connection")
>>> connection = bc.get_connection(connection_id)
>>> store = connection.get_store()
property creation_date
Returns:

The creation date of this object.

Return type:

Optional[datetime]

property creator_username
Returns:

The username that created this object.

Return type:

Optional[str]

property description
Returns:

Description of this object.

Return type:

Optional[str]

property id
Returns:

ID of this object.

Return type:

str

property is_active
Returns:

Returns indication if the object is active

Return type:

Optional[bool]

property labels
Returns:

The labels this object.

Return type:

Optional[Sequence[str]

property last_modified_date
Returns:

The last modified date of this object.

Return type:

Optional[datetime]

property last_modified_username
Returns:

The last modified username of this object.

Return type:

Optional[str]

property name
Returns:

Name of this object.

Return type:

Optional[str]

property parameters

Returns the parameters of this object.

property plugin_id

Returns the plugin definition of this object.