Project

analyze.project.add_acl_group(project_id, group_id, role)

Adds a security group to the list of groups authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • group_id (int) – Unique security group identifier

  • role (str) – Project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.add_acl_member(project_id, member_id, role)

Adds a member to the list of members authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • member_id (int) – Unique member identifier

  • role (str) – Project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.add_data_share(project_id, grantee_id, role='read')

Adds a project to the data share access along with their access role

Parameters
  • project_id (str) – Unique granter project identifier

  • grantee_id (int) – Unique grantee project identifier

  • read (bool) – Project data access read allowed

  • write (bool) – Project data access for write allowed

Returns

None

analyze.project.add_label(project_id, label)

Sets a label on a project

Parameters
  • project_id (str) – Unique project identifier

  • label (str) – The label unique name

Returns

None

analyze.project.add_path(project_id, path)

Adds a project reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

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

Returns

None

analyze.project.add_paths(additions)

Adds multiple project reference paths in the hierarchy

Parameters

additions (list) – List of additional paths, containing: project_id (str): Unique editor identifier to_path (str): Destination path

Returns

None

analyze.project.archive(account_id, path, project_id, branch='master')

Archives a project

Parameters
  • account_id (str) – the document account in which to save the archive

  • path (str) – the path within the document account to save the archive as, including file name

  • project_id (str) – the project to archive

  • branch (str) – the branch to archive

Returns

None

analyze.project.copy(project_id, name, memo, access_type='public', include_data=False)

Makes a copy of a project in the same workspace

Parameters
  • project_id (str) – Unique project identifier to copy

  • name (str) – Project name for new project

  • memo (str) – Project memo for new project

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

  • include_data (bool) – True if data should be copied to new project

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • environment_id (str): Data connection environment for project

  • 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.project.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.project.create(name, memo, access_type='public', archive_account_id=None, archive_path=None, archive=None, environment_id='default', update_references=True, progress_id=None)

Creates the project

If acl-user is set for access_type, the user will be added to the ACL automatically.

If acl-group is set for access_type, all of the user’s current security groups will be added automatically.

To restore from an archive, you can use either archive_account_id and archive_path, or archive. Don’t use all three together.

Parameters
  • name (str) – Project name

  • memo (str) – Project memo

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

  • archive_account_id (int) – If provided, a document account in which to look up an archive to restore

  • archive_path (str) – If provided, the document path at which to look up an archive to restore

  • archive (str) – If provided, a base64 encoded archive to restore

  • environment_id (str) – Data connection environment for project

  • update_references (bool) – Update the project references in the restored archive

  • progress_id (int) – Id of a progress window for a project archive restoration

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • 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.project.create_branch(project_id, branch, source_branch='master')

Creates a branch

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Unique branch name

  • source_branch (str) – The existing branch to use as a starting point for

  • new branch. (the) –

Returns

None

analyze.project.create_directory(path)

Creates a folder in the project hierarchy

Parameters

path (str) – Path to directory

Returns

None

analyze.project.create_tag(project_id, branch, tag_name, message='')

Creates a tag

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Unique branch name

  • tag_name (str) – Tag name

  • message (str) – Optional message for tag

Returns

None

analyze.project.delete(project_id)

Deletes a project

Parameters

project_id (str) – Unique project identifier

Returns

Unique project identifier

Return type

str

analyze.project.delete_branch(project_id, branch)

Creates a branch

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Unique branch name

Returns

None

analyze.project.delete_directory(path)

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

Parameters

path (str) – Path to directory

Returns

None

analyze.project.delete_log(project_id, branch='master')

Clears the project log

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Project branch

Returns

None

analyze.project.disable(project_ids)

Disables a project or projects

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.enable(project_ids)

Enables a project or projects

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.get_acl_groups(project_id)

Gets the list of security groups authorized to access the project along with their project role

Parameters

project_id (str) – Unique project identifier

Returns

Dict with group_id as key and project role as value

Return type

dict

analyze.project.get_acl_members(project_id)

Gets the list of members authorized to access the project along with their project role

Parameters

project_id (str) – Unique project identifier

Returns

Dict with member_id as key and project role as value

Return type

dict

analyze.project.get_branches(project_id)

Returns the branches for the project

Parameters

project_id (str) – Unique project identifier

Returns

branch names

Return type

list

analyze.project.get_data_share_projects(project_id)

Gets the list of projects authorized to access the project data along with their access role

Parameters

project_id (str) – Unique project identifier

Returns

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

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • read (bool): Allow read access to project

  • write (bool): Allow write access to project

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.get_data_shares(project_id)

Gets the list of projects authorized to access the project data along with their access role

Parameters

project_id (str) – Unique project identifier

Returns

Dict with project_id as key and access roles as values

Return type

list

analyze.project.get_data_shares_authorized(project_id)

Gets the list of projects this project is authorized to share data along with their access role

Parameters

project_id (str) – Unique project identifier

Returns

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

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • read (bool): Allow read access

  • write (bool): Allow write access

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.get_database_user(project_id)

Returns the username and password of a database role capable of accessing the project’s database.

Parameters

project_id (str) – Unique project identifier

Returns

role authentication parameters
  • user (str): username for the role

  • pass (str): password for the role

Return type

dict

analyze.project.get_log(project_id, branch='master')

Retrieves the full project log

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Project branch

Returns

List of log messages

Return type

list

analyze.project.get_report_user(project_id)

Returns the username and password of a database role capable of selecting from views in the reporting schema for a given project_id.

Parameters

project_id (str) – Unique project identifier

Returns

role authentication parameters
  • user (str): username for the role

  • pass (str): password for the role

Return type

dict

analyze.project.get_tags(project_id)

Returns the tags for the project

Parameters

project_id (str) – Unique project identifier

Returns

tag names

Return type

list

analyze.project.ids_from_path(path)

Provides the canonical id for the from a provided path

Parameters

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

Returns

id (str): Project unique identifier

Return type

list

analyze.project.is_locked(project_id)

Returns True if project is locked else false

Parameters

project_id (str) – Unique project identifier

Returns

locked state

Return type

bool

analyze.project.labels(project_id)

Provides a list of labels for the project

Parameters

project_id (str) – Unique project identifier

Returns

list of labels associated with project

Return type

list

analyze.project.lock(project_ids)

Locks a project or projects from configuration changes

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.log(project_id, message, level='info', branch='master')

Logs a project message

Parameters
  • project_id (str) – Unique project identifier

  • message (str) – Log message

  • level (str) – Notification level (info, debug, warn, error)

  • branch (str) – Project branch

Returns

None

analyze.project.lookup_by_full_path(path)

Returns ID for path provided

Parameters

path (str) – Unique path to object

Returns

Project unique identifier

Return type

str

analyze.project.lookup_by_name(name)

Returns ID for name provided

Parameters

name (str) – Unique project name

Returns

Project unique identifier

Return type

str

analyze.project.members(project_id, details=False)

Gets the list of members authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • details (bool) – Include member profile details else just the UserIDs

Returns

List of Member IDs or Member Dicts if details is True

Return type

list

analyze.project.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.project.move_path(project_id, from_path, to_path)

Moves a project reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • from_path (str) – Original path

  • to_path (str) – Destination path

Returns

None

analyze.project.move_paths(moves)

Moves multiple project reference paths in the hierarchy

Parameters

moves (list) – List of move dicts with the following keys: - project_id (str): Unique editor identifier - from_path (str): Original path - to_path (str): Destination path

Returns

None

analyze.project.my_role(auth_id, project_id)

Returns the requestors role for the project: explorer, manager, architect

Parameters

project_id (str) – Unique project identifier

Returns

Project role (explorer, manager, or architect)

Return type

str

analyze.project.paths(path=None)

Provides a list of paths for all projects

Parameters

path (str) – Initial path to search

Returns

List of Dicts consisting of:
  • path (str): Project 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.project.paths_from_id(project_id)

Provides a list of paths associated with the canonical id

Parameters

project_id (str) – Unique project identifier

Returns

List of paths that point to the project specified

Return type

list

analyze.project.project(project_id, keys=None details=False)

Returns the details of the specified project

Parameters
  • project_id (str) – Unique project identifier

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

  • details (bool) – If set to true, extra details about the project will be returned. Default False

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

If details is set to True, the dict will also contain:
  • workflows (int): Number of workflows in this project

  • steps (int): Total number of steps in this project

  • tables (int): Total number of tables in this project

  • data (int): Total size of this project

  • variables (int): Number of variables in this project

Return type

dict

analyze.project.projects(sort=None, keys=None, details=False, id_filter=None, all_workspaces=False, member_details=False)

Returns the list of projects available

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

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

  • details (bool) – If set to true, extra details about the project will be returned. Default False

  • id_filter (list) – List or tuple of project ids to which to limit the results

  • all_workspaces (bool, optional) – If true then returns projects across all workspaces

  • member_details (bool, optional) – If True then returns member info relating to updated_by

Returns

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

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

If details is set to True, the dict will also contain:
  • workflows (int): Number of workflows in this project

  • steps (int): Total number of steps in this project

  • tables (int): Total number of tables in this project

  • data (int): Total size of this project

  • variables (int): Number of variables in this project

If member_details is set to True, the dict will also contain:
  • updated_by_full_name (str): The User Name of the user that last updated the project

  • updated_by_user_id (int): The id of the user that last updated the project

  • updated_by_gravatar_hash (str): Unique hash to pull gravatar for the user.

Return type

tuple

analyze.project.projects_from_path(path, sort=None, keys=None, details=False)

Provides list of projects 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.

  • details (bool) – If set to true, extra details about the project will be returned. Default False

Returns

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

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.remove_acl_group(project_id, group_id)

Removes a security group from the list of groups authorized to access the project

Parameters
  • project_id (str) – Unique project identifier

  • group_id (int) – Unique security group identifier

Returns

None

analyze.project.remove_acl_member(project_id, member_id)

Removes a member from the list of members authorized to access the project

Parameters
  • project_id (str) – Unique project identifier

  • member_id (int) – Unique member identifier

Returns

None

analyze.project.remove_data_share(project_id, grantee_id)

Removes a project from the list of projects authorized to access the project data

Parameters
  • project_id (str) – Unique project identifier

  • grantee_id (int) – Unique grantee project identifier

Returns

None

analyze.project.remove_label(project_id, label)

Removes a label on a project

Parameters
  • project_id (str) – Unique project identifier

  • label (str) – The label unique name

Returns

None

analyze.project.remove_path(project_id, path)

Removes a project reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

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

Returns

None

analyze.project.save_acl_groups(project_id, acl)

Saves the list of security groups authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • acl (dict) – Dict with group_id as key and project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.save_acl_members(project_id, acl)

Saves the list of members authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • acl (dict) – Dict with member_id as key and project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.save_data_shares(project_id, shares)

Saves the list of projects authorized to access the project data along with their access role

Parameters
  • project_id (str) – Unique project identifier

  • shares (dict) – Dict with project_id as key and boolean values for read and write keys

Returns

None

analyze.project.save_variable(project_id, variable_id, branch='master', value=None, memo=None, view_manager=False, view_explorer=False)

Returns the list of variables in the project and their current values

Parameters
  • project_id (str) – Unique project identifier

  • variable_id (str) – Variable name

  • value (str) – Variable value. If None is passed, the variable is unset.

  • branch (str) – Project branch

  • memo (str) – Variable description

  • view_manager (bool) – True if variable should be visible to manager roles

  • view_explorer (bool) – True if variable should be visible to explorer roles

Returns

result dict with
  • memo (str): Variable memo

  • value (str): Variable value

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.search_by_label(text, criteria='contains', sort=None, keys=None, details=False)

Returns list of projects 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.

  • details (bool) – If set to true, extra details about the project will be returned. Default False

Returns

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

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • branches (int): Number of branches

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.set_variable(project_id, variable_id, branch='master', value=None)

Returns the list of variables in the project and their current values

Parameters
  • project_id (str) – Unique project identifier

  • variable_id (str) – Variable name

  • branch (str) – Project branch

  • value (str) – Variable value. If None is passed, the variable is unset.

Returns

result dict with
  • memo (str): Variable memo

  • value (str): Variable value

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.unlock(project_ids)

Unlocks a project or projects from configuration changes

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.update(project_id, **kwargs)

Updates the project values specified

Parameters

project_id (str) – Unique project identifier

Kwargs:
  • name (str): Project name

  • memo (str): Project memo

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • environment_id (str): Data connection environment for project

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

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

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

  • environment_id (str): Data connection environment for project

  • 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.project.variable(project_id, variable_id, branch='master')

Returns the variable details

Parameters
  • project_id (str) – Unique project identifier

  • variable_id (str) – The variable unique name

  • branch (str) – Project branch

Returns

dict with the following properties
  • value (str): Current variable value

  • memo (str): Description of the variable

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.variable_values(project_id, branch='master')

Returns a key / value dict of variables and their values

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Project branch

Returns

key / value pair of variable name as key and variable value as the value

Return type

dict

analyze.project.variables(project_id, branch='master')

Returns the dict of variables in the project and their current values

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Project branch

Returns

result dict of dicts with the following properties
  • value (str): Current variable value

  • memo (str): Description of the variable

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict