Connection

analyze.connection.add_acl_group(connection_id, group_ids)

Adds groups to access control list for a connection

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • group_ids (int) – Group ID or list of IDs

Returns

None

analyze.connection.add_acl_system_user(connection_id, member_ids)

Adds members to access control list for a connection

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • member_ids (int) – Member ID or list of IDs

Returns

None

analyze.connection.add_acl_user(connection_id, member_ids)

Adds members to access control list for a connection

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • member_ids (int) – Member ID or list of IDs

Returns

None

analyze.connection.add_label(connection_id, label)

Sets a label on a connection

Parameters
  • connection_id (str) – Unique connection identifier

  • label (str) – The label unique name

Returns

list of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.add_owner(connection_id, member_ids)

Adds owners to a connection

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • member_ids (int) – Member ID or list of IDs

Returns

None

analyze.connection.add_path(connection_id, path)

Adds a connection reference path in the hierarchy

Parameters
  • connection_id (str) – Unique connection identifier

  • path (str) – Object rollup path using unix style forward slashes

Returns

None

analyze.connection.connection(connection_id, keys=None)

Provides detailed connection information

Parameters
  • connection_id (str) – Unique connection identifier

  • keys (list) – List of keys to return. Defaults to all.

  • connection_string (str) – If set, will generate a connection string for the specified environment

Returns

result dict with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type. Must be private, public, acl-user, or acl-group.

  • kind (str): Connection type. Must be one of the supported connection types.

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

  • connection_string (str): (OPTIONAL) A formatted connection string

Return type

dict

analyze.connection.connection_string(connection_id, environment)

Provides a formatted connection string

Parameters
  • connection_id (str) – Unique connection identifier

  • environment_id (str) – Environment to return for the connection string parameters

Returns

connection string

Return type

str

analyze.connection.connections(id_filter=None, sort=None, keys=None)

Provides list of connections in specified workspace

Parameters
  • id_filter (list/tuple) – List or tuple of object unique identifiers to which to limit the results

  • sort (list, optional) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list, optional) – List of keys to return. Defaults to all.

Returns

result tuple of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.connections_from_label(label, sort=None, keys=None)

Provides list of connections based on set of labels. Uses AND condition.

Parameters
  • label (str) – label name

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

list of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.connections_from_path(path, sort=None, keys=None)

Provides list of connections based on a path fragment. Path fragment can be to parent level.

Parameters
  • path (str) – Object rollup path using unix style forward slashes

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

list of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.copy_directory(from_path, to_path)

Copies a folder and all paths in the hierarchy but does not duplicate referenced objects

Parameters
  • from_path (str) – Original directory path

  • to_path (str) – Destination directory path

Returns

None

analyze.connection.create(path, name, memo=None, kind=None, access_type='private', enabled=True, locked=False)

Creates a connection

Parameters
  • path (str) – Path to place connection in hierarchy

  • name (str) – The object name

  • memo (str) – The object description

  • kind (str) – Connection type

  • access_type (str) – Access type

  • enabled (bool) – True if the project is enabled

  • locked (bool) – True if the project is locked from editing

Returns

result dict with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.connection.create_directory(path)

Creates a folder in the hierarchy

Parameters

path (str) – Path to directory

Returns

None

analyze.connection.create_environment(name, memo=None)

Creates an environment

Parameters
  • name (str) – The environment name

  • memo (str) – The environment description

Returns

result dict with the following properties
  • id (str): Unique environment identifier

  • workspace_id (str): Unique workspace identifier

  • name (str): Environment name

  • memo (str): Environment description

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.connection.delete(connection_id, force=False)

Deletes a connection

Parameters
  • connection_id (str) – Unique connection identifier

  • force (bool, optional) – If true, this will delete the connection, even if it is in use. Defaults to false

Returns

True if the connection was deleted, false if not.

Return type

bool

analyze.connection.delete_directory(path)

Deletes a folder and removes path from all objects in that directory

Parameters

path (str) – Path to directory

Returns

None

analyze.connection.delete_environment(environment_id, force=False)

Deletes an environment

Parameters
  • environment_id (str) – Unique environment identifier

  • force (bool, optional) – If true, this will delete the environment, even if it is in use. Defaults to false

Returns

True if the environment was deleted, false if not.

Return type

bool

analyze.connection.disable(connection_ids)

Sets a connection to disabled so it will not be usable

Parameters

connection_ids (str) – Unique connection identifier or list of identifiers

Returns

None

analyze.connection.enable(connection_ids)

Sets the connection to enabled for use

Parameters

connection_ids (str) – Unique connection identifier or list of identifiers

Returns

None

analyze.connection.environment(environment_id, keys=None)

Provides detailed environment information

Parameters
  • environment_id (str) – Unique environment identifier

  • keys (list) – List of keys to return. Defaults to all.

Returns

result dict with the following properties
  • id (str): Unique connection identifier

  • workspace_id (str): Unique workspace identifier

  • name (str): Connection name

  • memo (str): Connection description

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.connection.environments(id_filter=None, sort=None, keys=None)

Provides list of environments in specified workspace

Parameters
  • id_filter (list/tuple) – List or tuple of object unique identifiers to which to limit the results

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

result tuple of dicts with the following properties
  • id (str): Unique environment identifier

  • workspace_id (str): Unique workspace identifier

  • name (str): Environment name

  • memo (str): Environment description

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.get_config(connection_ids, environment=ct.DEFAULT_ENVIRONMENT_ID)

Returns the connection parameters for the specified environment

Parameters
  • connection_id (str) – Unique connection identifier

  • environment_id (str) – Unique environment identifier

Returns

connection parameters for specified environment

Return type

dict

analyze.connection.ids_from_path(path, branch='master')

Provides the list of canonical ids for the connection from a provided path

Parameters

path (str) – Object rollup path

Returns

containing Unique connection IDs on the specified path

Return type

list

analyze.connection.labels(connection_id)

Provides a list of tags for the connection

Parameters

connection_id (str) – Unique connection identifier

Returns

list of labels associated with Connection

Return type

list

analyze.connection.lock(connection_ids)

Locks a connection from configuration changes

Parameters

connection_ids (str) – Unique connection identifier or list of identifiers

Returns

None

analyze.connection.move_directory(from_path, to_path)

Updates a folder name in the hierarchy

Parameters
  • from_path (str) – Original directory path

  • to_path (str) – Destination directory path

Returns

None

analyze.connection.move_path(connection_id, from_path, to_path)

Moves a reference path in the hierarchy

Parameters
  • connection_id (str) – Unique connection identifier

  • from_path (str) – Original path

  • to_path (str) – Destination path

Returns

None

analyze.connection.paths(path=None)

Provides a list of paths for all connections in the workspace

Parameters

path (str) – Initial path to search

Returns

List of Dicts consisting of:
  • path (str): Connection leaf or branch path

  • type (str): leaf or branch to indicate the path type

  • id (str): For leaf type paths, the object the path points to

Return type

list

analyze.connection.paths_from_id(connection_id')

Provides a list of paths associated with the canonical id

Parameters

connection_id (str) – Unique connection identifier

Returns

List of paths associated with a Connection ID

Return type

list

analyze.connection.remove_acl_group(connection_id, group_ids)

Removes groups from access control list for a connection. Prevents removing current user by accident.

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • group_ids (int) – Group ID or list of IDs

Returns

None

analyze.connection.remove_acl_system_user(connection_id, member_ids)

Removes users from access control list for a connection. Prevents removing current user by accident.

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • member_ids (int) – Member ID or list of IDs

Returns

None

analyze.connection.remove_acl_user(connection_id, member_ids)

Removes users from access control list for a connection. Prevents removing current user by accident.

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • member_ids (int) – Member ID or list of IDs

Returns

None

analyze.connection.remove_label(connection_id, label)

Removes a label on a connection

Parameters
  • connection_id (str) – Unique connection identifier

  • label (str) – The label unique name

Returns

list of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.remove_owner(connection_id, member_ids)

Removes owners from a connection. Prevents removing current user by accident.

Parameters
  • connection_id (str) – Unique connection identifier or list of identifiers

  • member_ids (int) – Member ID or list of IDs

Returns

None

analyze.connection.remove_path(connection_id, path)

Removes a reference path in the hierarchy

Parameters
  • connection_id (str) – Unique connection identifier

  • path (str) – Object rollup path using unix style forward slashes

Returns

None

analyze.connection.search_by_label(text, criteria='contains', sort=None, keys=None)

Returns list of connections that match the search criteria

Parameters
  • text (str) – The search text to locate

  • criteria (str) – The search criteria (contains, exact, startswith, or endswith)

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

list of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.search_by_name(text, criteria='contains', sort=None, keys=None)

Returns list of connections that match the search criteria

Parameters
  • text (str) – The search text to locate

  • criteria (str) – The search criteria (contains, exact, startswith, or endswith)

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

list of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.set_config(connection_ids, environment=ct.DEFAULT_ENVIRONMENT_ID, config={})

Sets the connection parameters for the specified environment

Parameters
  • connection_id (str) – Unique connection identifier

  • environment_id (str) – Unique environment identifier

  • config (dict) – Environment connection parameters

Returns

None

analyze.connection.supported_connections()

Provides supported connection types

Parameters

None

Returns

supported connection type keys and their friendly name

Return type

dict

analyze.connection.system_member_connections(system_member_id, id_filter=None, sort=None, keys=None)

Provides list of connections in specified workspace

Parameters
  • system_member_id (int) – System User unique identifier

  • id_filter (list/tuple) – List or tuple of object unique identifiers to which to limit the results

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

result tuple of dicts with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.connection.test(connection_id, environment=ct.DEFAULT_ENVIRONMENT_ID)

Tests the connection

Parameters
  • connection_id (str) – Unique connection identifier

  • environment (str) – Unique environment identifier

Returns

None

analyze.connection.unlock(connection_ids)

Unlocks a connection so configuration changes are allowed

Parameters

connection_ids (str) – Unique connection identifier or list of identifiers

Returns

None

analyze.connection.update(connection_id, **kwargs)

Updates a connection

Parameters

connection_id (str) – Unique connection identifier

Kwargs:

name (str): The object name memo (str): The object description enabled (bool): True if the project is enabled locked (bool): True if the project is locked from editing

Returns

result dict with the following properties
  • id (str): Unique connection identifier

  • name (str): Connection name

  • memo (str): Connection description

  • access_type (str): Access type

  • kind (str): Connection type

  • paths (list): List of paths assigned to connection

  • labels (list): List of labels assigned to connection

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.connection.update_environment(environment_id, name, memo=None)

Updates an environment

Parameters
  • environment_id (str) – Unique environment identifier

  • name (str) – The environment name

  • memo (str) – The environment description

Returns

result dict with the following properties
  • id (str): Unique environment identifier

  • workspace_id (str): Unique workspace identifier

  • name (str): Environment name

  • memo (str): Environment description

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.connection.used_connections(project_id, workflow_id=None, branch='master')

Looks up a list of connections used within a project/workflow

Parameters
  • project_id (str) – Unique project identifier

  • workflow_id (str, optional) – Unique workflow identifier

  • branch (str) – Project branch

Returns

List of connections

Return type

list