Workflows

class Workflows(session_kwargs, client, return_type='raw')

Methods

delete_projects(id, project_id)

Remove a Workflow from a project

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

get(id)

Get a Workflow

get_executions(id, execution_id)

Get a workflow execution

get_executions_tasks(id, execution_id, task_name)

Get a task of a workflow execution

get_git_commits(id, commit_hash)

Get file contents at git ref

list(*[, hidden, archived, author, state, ...])

List Workflows

list_dependencies(id, *[, user_id])

List dependent objects for this object

list_executions(id, *[, limit, page_num, ...])

List workflow executions

list_git(id)

Get the git metadata attached to an item

list_git_commits(id)

Get the git commits for an item on the current branch

list_projects(id, *[, hidden])

List the projects a Workflow belongs to

list_shares(id)

List users and groups permissioned on this object

patch(id, *[, name, description, ...])

Update some attributes of this Workflow

patch_git(id, *[, git_ref, git_branch, ...])

Update an attached git file

post(name, *[, description, from_job_chain, ...])

Create a Workflow

post_clone(id, *[, clone_schedule, ...])

Clone this Workflow

post_executions(id, *[, target_task, input, ...])

Execute a workflow

post_executions_cancel(id, execution_id)

Cancel a workflow execution

post_executions_resume(id, execution_id)

Resume a paused workflow execution

post_executions_retry(id, execution_id, *[, ...])

Retry a failed task, or all failed tasks in an execution

post_git_checkout(id)

Checkout content that the existing git_ref points to and save to the object

post_git_checkout_latest(id)

Checkout latest commit on the current branch of a script or workflow

post_git_commits(id, content, message, file_hash)

Commit and push a new version of the file

put(id, name, *[, description, definition, ...])

Replace all attributes of this Workflow

put_archive(id, status)

Update the archive status of this object

put_git(id, *[, git_ref, git_branch, ...])

Attach an item to a file in a git repo

put_projects(id, project_id)

Add a Workflow to a project

put_shares_groups(id, group_ids, ...[, ...])

Set the permissions groups has on this object

put_shares_users(id, user_ids, ...[, ...])

Set the permissions users have on this object

put_transfer(id, user_id, ...[, email_body, ...])

Transfer ownership of this object to another user

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.workflows.list(...)
delete_projects(id: int, project_id: int)

Remove a Workflow from a project

Parameters:
idint

The ID of the Workflow.

project_idint

The ID of the project.

Returns:
None

Response code 204: success

delete_shares_groups(id: int, group_id: int)

Revoke the permissions a group has on this object

Parameters:
idint

The ID of the resource that is shared.

group_idint

The ID of the group.

Returns:
None

Response code 204: success

delete_shares_users(id: int, user_id: int)

Revoke the permissions a user has on this object

Parameters:
idint

The ID of the resource that is shared.

user_idint

The ID of the user.

Returns:
None

Response code 204: success

get(id: int)

Get a Workflow

Parameters:
idint
Returns:
civis.response.Response
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • definitionstr

    The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

  • validbool

    The validity of the workflow definition.

  • validation_errorsstr

    The errors encountered when validating the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • notificationsdict
    • urlsList[str]

      URLs to receive a POST request at job completion

    • success_email_subjectstr

      Custom subject line for success e-mail.

    • success_email_bodystr

      Custom body text for success e-mail, written in Markdown.

    • success_email_addressesList[str]

      Addresses to notify by e-mail when the job completes successfully.

    • failure_email_addressesList[str]

      Addresses to notify by e-mail when the job fails.

    • stall_warning_minutesint

      Stall warning emails will be sent after this amount of minutes.

    • success_onbool

      If success email notifications are on

    • failure_onbool

      If failure email notifications are on

  • archivedstr

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • created_at : str (time)

  • updated_at : str (time)

get_executions(id: int, execution_id: int)

Get a workflow execution

Parameters:
idint

The ID for the workflow.

execution_idint

The ID for the workflow execution.

Returns:
civis.response.Response
  • idint

    The ID for this workflow execution.

  • statestr

    The state of this workflow execution.

  • mistral_statestr

    The state of this workflow as reported by mistral. One of running, paused, success, error, or cancelled

  • mistral_state_infostr

    The state info of this workflow as reported by mistral.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • definitionstr

    The definition of the workflow for this execution.

  • inputdict

    Key-value pairs defined for this execution.

  • included_tasksList[str]

    The subset of workflow tasks selected to execute.

  • tasksList[dict]

    The tasks associated with this execution.

    • namestr

      The name of the task.

    • mistral_statestr

      The state of this task. One of idle, waiting, running, delayed, success, error, or cancelled

    • mistral_state_infostr

      Extra info associated with the state of the task.

    • runsList[dict]

      The runs associated with this task, in descending order by id.

      • idint

        The ID of the run.

      • job_idint

        The ID of the job associated with the run.

      • my_permission_levelstr

        Your permission level on the job. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of the run.

      • created_atstr (time)

        The time that the run was queued.

      • started_atstr (time)

        The time that the run started.

      • finished_atstr (time)

        The time that the run completed.

    • executionsList[dict]

      The executions run by this task, in descending order by id.

      • idint

        The ID of the execution.

      • workflow_idint

        The ID of the workflow associated with the execution.

      • my_permission_levelstr

        Your permission level on the workflow. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of this workflow execution.

      • created_atstr (time)

        The time this execution was created.

      • started_atstr (time)

        The time this execution started.

      • finished_atstr (time)

        The time this execution finished.

  • started_atstr (time)

    The time this execution started.

  • finished_atstr (time)

    The time this execution finished.

  • created_atstr (time)

    The time this execution was created.

  • updated_atstr (time)

    The time this execution was last updated.

get_executions_tasks(id: int, execution_id: int, task_name: str)

Get a task of a workflow execution

Parameters:
idint

The ID for the workflow.

execution_idint

The ID for the workflow execution.

task_namestr

The URL-encoded name of the task.

Returns:
civis.response.Response
  • namestr

    The name of the task.

  • mistral_statestr

    The state of this task. One of idle, waiting, running, delayed, success, error, or cancelled

  • mistral_state_infostr

    Extra info associated with the state of the task.

  • runsList[dict]

    The runs associated with this task, in descending order by id.

    • idint

      The ID of the run.

    • job_idint

      The ID of the job associated with the run.

    • my_permission_levelstr

      Your permission level on the job. One of “read”, “write”, “manage”, or “nil”.

    • statestr

      The state of the run.

    • created_atstr (time)

      The time that the run was queued.

    • started_atstr (time)

      The time that the run started.

    • finished_atstr (time)

      The time that the run completed.

  • executionsList[dict]

    The executions run by this task, in descending order by id.

    • idint

      The ID of the execution.

    • workflow_idint

      The ID of the workflow associated with the execution.

    • my_permission_levelstr

      Your permission level on the workflow. One of “read”, “write”, “manage”, or “nil”.

    • statestr

      The state of this workflow execution.

    • created_atstr (time)

      The time this execution was created.

    • started_atstr (time)

      The time this execution started.

    • finished_atstr (time)

      The time this execution finished.

get_git_commits(id: int, commit_hash: str)

Get file contents at git ref

Parameters:
idint

The ID of the item.

commit_hashstr

The SHA (full or shortened) of the desired git commit.

Returns:
civis.response.Response
  • contentstr

    The file’s contents.

  • typestr

    The file’s type.

  • sizeint

    The file’s size.

  • file_hashstr

    The SHA of the file.

list(*, hidden: bool = None, archived: str = None, author: str = None, state: List[str] = None, scheduled: bool = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None)

List Workflows

Parameters:
hiddenbool, optional

If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.

archivedstr, optional

The archival status of the requested item(s).

authorstr, optional

If specified, return items from any of these authors. It accepts a comma- separated list of user IDs.

stateList[str], optional

State of the most recent execution.One or more of queued, running, succeeded, failed, cancelled, idle, and scheduled.

scheduledbool, optional

If the workflow is scheduled.

limitint, optional

Number of results to return. Defaults to 20. Maximum allowed is 50.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, name, created_at.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.

iteratorbool, optional

If True, return a generator to iterate over all responses. Use when more results than the maximum allowed by limit are needed. When True, limit and page_num are ignored. Defaults to False.

Returns:
civis.response.PaginatedResponse
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • validbool

    The validity of the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • archivedstr

    The archival status of the requested item(s).

  • created_at : str (time)

  • updated_at : str (time)

list_dependencies(id: int, *, user_id: int = None)

List dependent objects for this object

Parameters:
idint

The ID of the resource that is shared.

user_idint, optional

ID of target user

Returns:
civis.response.Response
  • object_typestr

    Dependent object type

  • fco_typestr

    Human readable dependent object type

  • idint

    Dependent object ID

  • namestr

    Dependent object name, or nil if the requesting user cannot read this object

  • permission_levelstr

    Permission level of target user (not user’s groups) for dependent object. Null if no target user or not shareable (e.g. a database table).

  • descriptionstr

    Additional information about the dependency, if relevant

  • shareablebool

    Whether or not the requesting user can share this object.

list_executions(id: int, *, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None)

List workflow executions

Parameters:
idint

The ID for this workflow.

limitint, optional

Number of results to return. Defaults to 20. Maximum allowed is 50.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to id. Must be one of: id, updated_at, created_at.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.

iteratorbool, optional

If True, return a generator to iterate over all responses. Use when more results than the maximum allowed by limit are needed. When True, limit and page_num are ignored. Defaults to False.

Returns:
civis.response.PaginatedResponse
  • idint

    The ID for this workflow execution.

  • statestr

    The state of this workflow execution.

  • mistral_statestr

    The state of this workflow as reported by mistral. One of running, paused, success, error, or cancelled

  • mistral_state_infostr

    The state info of this workflow as reported by mistral.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • started_atstr (time)

    The time this execution started.

  • finished_atstr (time)

    The time this execution finished.

  • created_atstr (time)

    The time this execution was created.

  • updated_atstr (time)

    The time this execution was last updated.

list_git(id: int)

Get the git metadata attached to an item

Parameters:
idint

The ID of the item.

Returns:
civis.response.Response
  • git_refstr

    A git reference specifying an unambiguous version of the file. Can be a branch name, tag or the full or shortened SHA of a commit.

  • git_branchstr

    The git branch that the file is on.

  • git_pathstr

    The path of the file in the repository.

  • git_repodict
    • idint

      The ID for this git repository.

    • repo_urlstr

      The URL for this git repository.

    • created_at : str (time)

    • updated_at : str (time)

  • git_ref_typestr

    Specifies if the file is versioned by branch or tag.

  • pull_from_gitbool

    Automatically pull latest commit from git. Only works for scripts and workflows (assuming you have the feature enabled)

list_git_commits(id: int)

Get the git commits for an item on the current branch

Parameters:
idint

The ID of the item.

Returns:
civis.response.Response
  • commit_hashstr

    The SHA of the commit.

  • author_namestr

    The name of the commit’s author.

  • datestr (time)

    The commit’s timestamp.

  • messagestr

    The commit message.

list_projects(id: int, *, hidden: bool = None)

List the projects a Workflow belongs to

Parameters:
idint

The ID of the Workflow.

hiddenbool, optional

If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.

Returns:
civis.response.Response
  • idint

    The ID for this project.

  • authordict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • namestr

    The name of this project.

  • descriptionstr

    A description of the project.

  • usersList[dict]

    Users who can see the project.

    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • auto_share : bool

  • created_at : str (time)

  • updated_at : str (time)

  • archivedstr

    The archival status of the requested item(s).

list_shares(id: int)

List users and groups permissioned on this object

Parameters:
idint

The ID of the resource that is shared.

Returns:
civis.response.Response
  • readersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • writersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • ownersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • total_user_sharesint

    For owners, the number of total users shared. For writers and readers, the number of visible users shared.

  • total_group_sharesint

    For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.

patch(id: int, *, name: str = None, description: str = None, definition: str = None, schedule: dict = None, allow_concurrent_executions: bool = None, time_zone: str = None, notifications: dict = None)

Update some attributes of this Workflow

Parameters:
idint

The ID for this workflow.

namestr, optional

The name of this workflow.

descriptionstr, optional

A description of the workflow.

definitionstr, optional

The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

scheduledict, optional
  • scheduledbool

    If the item is scheduled.

  • scheduled_daysList[int]

    Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

  • scheduled_hoursList[int]

    Hours of the day it is scheduled on.

  • scheduled_minutesList[int]

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourint

    Deprecated in favor of scheduled minutes.

  • scheduled_days_of_monthList[int]

    Days of the month it is scheduled on, mutually exclusive with scheduledDays.

allow_concurrent_executionsbool, optional

Whether the workflow can execute when already running.

time_zonestr, optional

The time zone of this workflow.

notificationsdict, optional
  • urlsList[str]

    URLs to receive a POST request at job completion

  • success_email_subjectstr

    Custom subject line for success e-mail.

  • success_email_bodystr

    Custom body text for success e-mail, written in Markdown.

  • success_email_addressesList[str]

    Addresses to notify by e-mail when the job completes successfully.

  • failure_email_addressesList[str]

    Addresses to notify by e-mail when the job fails.

  • stall_warning_minutesint

    Stall warning emails will be sent after this amount of minutes.

  • success_onbool

    If success email notifications are on

  • failure_onbool

    If failure email notifications are on

Returns:
civis.response.Response
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • definitionstr

    The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

  • validbool

    The validity of the workflow definition.

  • validation_errorsstr

    The errors encountered when validating the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • notificationsdict
    • urlsList[str]

      URLs to receive a POST request at job completion

    • success_email_subjectstr

      Custom subject line for success e-mail.

    • success_email_bodystr

      Custom body text for success e-mail, written in Markdown.

    • success_email_addressesList[str]

      Addresses to notify by e-mail when the job completes successfully.

    • failure_email_addressesList[str]

      Addresses to notify by e-mail when the job fails.

    • stall_warning_minutesint

      Stall warning emails will be sent after this amount of minutes.

    • success_onbool

      If success email notifications are on

    • failure_onbool

      If failure email notifications are on

  • archivedstr

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • created_at : str (time)

  • updated_at : str (time)

patch_git(id: int, *, git_ref: str = None, git_branch: str = None, git_path: str = None, git_repo_url: str = None, git_ref_type: str = None, pull_from_git: bool = None)

Update an attached git file

Parameters:
idint

The ID of the item.

git_refstr, optional

A git reference specifying an unambiguous version of the file. Can be a branch name, or the full or shortened SHA of a commit.

git_branchstr, optional

The git branch that the file is on.

git_pathstr, optional

The path of the file in the repository.

git_repo_urlstr, optional

The URL of the git repository.

git_ref_typestr, optional

Specifies if the file is versioned by branch or tag.

pull_from_gitbool, optional

Automatically pull latest commit from git. Only works for scripts.

Returns:
civis.response.Response
  • git_refstr

    A git reference specifying an unambiguous version of the file. Can be a branch name, tag or the full or shortened SHA of a commit.

  • git_branchstr

    The git branch that the file is on.

  • git_pathstr

    The path of the file in the repository.

  • git_repodict
    • idint

      The ID for this git repository.

    • repo_urlstr

      The URL for this git repository.

    • created_at : str (time)

    • updated_at : str (time)

  • git_ref_typestr

    Specifies if the file is versioned by branch or tag.

  • pull_from_gitbool

    Automatically pull latest commit from git. Only works for scripts and workflows (assuming you have the feature enabled)

post(name: str, *, description: str = None, from_job_chain: int = None, definition: str = None, schedule: dict = None, allow_concurrent_executions: bool = None, time_zone: str = None, notifications: dict = None, hidden: bool = None)

Create a Workflow

Parameters:
namestr

The name of this workflow.

descriptionstr, optional

A description of the workflow.

from_job_chainint, optional

If specified, create a workflow from the job chain this job is in, and inherit the schedule from the root of the chain.

definitionstr, optional

The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

scheduledict, optional
  • scheduledbool

    If the item is scheduled.

  • scheduled_daysList[int]

    Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

  • scheduled_hoursList[int]

    Hours of the day it is scheduled on.

  • scheduled_minutesList[int]

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourint

    Deprecated in favor of scheduled minutes.

  • scheduled_days_of_monthList[int]

    Days of the month it is scheduled on, mutually exclusive with scheduledDays.

allow_concurrent_executionsbool, optional

Whether the workflow can execute when already running.

time_zonestr, optional

The time zone of this workflow.

notificationsdict, optional
  • urlsList[str]

    URLs to receive a POST request at job completion

  • success_email_subjectstr

    Custom subject line for success e-mail.

  • success_email_bodystr

    Custom body text for success e-mail, written in Markdown.

  • success_email_addressesList[str]

    Addresses to notify by e-mail when the job completes successfully.

  • failure_email_addressesList[str]

    Addresses to notify by e-mail when the job fails.

  • stall_warning_minutesint

    Stall warning emails will be sent after this amount of minutes.

  • success_onbool

    If success email notifications are on

  • failure_onbool

    If failure email notifications are on

hiddenbool, optional

The hidden status of the item.

Returns:
civis.response.Response
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • definitionstr

    The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

  • validbool

    The validity of the workflow definition.

  • validation_errorsstr

    The errors encountered when validating the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • notificationsdict
    • urlsList[str]

      URLs to receive a POST request at job completion

    • success_email_subjectstr

      Custom subject line for success e-mail.

    • success_email_bodystr

      Custom body text for success e-mail, written in Markdown.

    • success_email_addressesList[str]

      Addresses to notify by e-mail when the job completes successfully.

    • failure_email_addressesList[str]

      Addresses to notify by e-mail when the job fails.

    • stall_warning_minutesint

      Stall warning emails will be sent after this amount of minutes.

    • success_onbool

      If success email notifications are on

    • failure_onbool

      If failure email notifications are on

  • archivedstr

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • created_at : str (time)

  • updated_at : str (time)

post_clone(id: int, *, clone_schedule: bool = None, clone_notifications: bool = None)

Clone this Workflow

Parameters:
idint

The ID for the workflow.

clone_schedulebool, optional

If true, also copy the schedule to the new workflow.

clone_notificationsbool, optional

If true, also copy the notifications to the new workflow.

Returns:
civis.response.Response
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • definitionstr

    The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

  • validbool

    The validity of the workflow definition.

  • validation_errorsstr

    The errors encountered when validating the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • notificationsdict
    • urlsList[str]

      URLs to receive a POST request at job completion

    • success_email_subjectstr

      Custom subject line for success e-mail.

    • success_email_bodystr

      Custom body text for success e-mail, written in Markdown.

    • success_email_addressesList[str]

      Addresses to notify by e-mail when the job completes successfully.

    • failure_email_addressesList[str]

      Addresses to notify by e-mail when the job fails.

    • stall_warning_minutesint

      Stall warning emails will be sent after this amount of minutes.

    • success_onbool

      If success email notifications are on

    • failure_onbool

      If failure email notifications are on

  • archivedstr

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • created_at : str (time)

  • updated_at : str (time)

post_executions(id: int, *, target_task: str = None, input: dict = None, included_tasks: List[str] = None)

Execute a workflow

Parameters:
idint

The ID for the workflow.

target_taskstr, optional

For a reverse workflow, the name of the task to target.

inputdict, optional

Key-value pairs to send to this execution as inputs.

included_tasksList[str], optional

If specified, executes only the subset of workflow tasks included as specified by task name.

Returns:
civis.response.Response
  • idint

    The ID for this workflow execution.

  • statestr

    The state of this workflow execution.

  • mistral_statestr

    The state of this workflow as reported by mistral. One of running, paused, success, error, or cancelled

  • mistral_state_infostr

    The state info of this workflow as reported by mistral.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • definitionstr

    The definition of the workflow for this execution.

  • inputdict

    Key-value pairs defined for this execution.

  • included_tasksList[str]

    The subset of workflow tasks selected to execute.

  • tasksList[dict]

    The tasks associated with this execution.

    • namestr

      The name of the task.

    • mistral_statestr

      The state of this task. One of idle, waiting, running, delayed, success, error, or cancelled

    • mistral_state_infostr

      Extra info associated with the state of the task.

    • runsList[dict]

      The runs associated with this task, in descending order by id.

      • idint

        The ID of the run.

      • job_idint

        The ID of the job associated with the run.

      • my_permission_levelstr

        Your permission level on the job. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of the run.

      • created_atstr (time)

        The time that the run was queued.

      • started_atstr (time)

        The time that the run started.

      • finished_atstr (time)

        The time that the run completed.

    • executionsList[dict]

      The executions run by this task, in descending order by id.

      • idint

        The ID of the execution.

      • workflow_idint

        The ID of the workflow associated with the execution.

      • my_permission_levelstr

        Your permission level on the workflow. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of this workflow execution.

      • created_atstr (time)

        The time this execution was created.

      • started_atstr (time)

        The time this execution started.

      • finished_atstr (time)

        The time this execution finished.

  • started_atstr (time)

    The time this execution started.

  • finished_atstr (time)

    The time this execution finished.

  • created_atstr (time)

    The time this execution was created.

  • updated_atstr (time)

    The time this execution was last updated.

post_executions_cancel(id: int, execution_id: int)

Cancel a workflow execution

Parameters:
idint

The ID for the workflow.

execution_idint

The ID for the workflow execution.

Returns:
civis.response.Response
  • idint

    The ID for this workflow execution.

  • statestr

    The state of this workflow execution.

  • mistral_statestr

    The state of this workflow as reported by mistral. One of running, paused, success, error, or cancelled

  • mistral_state_infostr

    The state info of this workflow as reported by mistral.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • definitionstr

    The definition of the workflow for this execution.

  • inputdict

    Key-value pairs defined for this execution.

  • included_tasksList[str]

    The subset of workflow tasks selected to execute.

  • tasksList[dict]

    The tasks associated with this execution.

    • namestr

      The name of the task.

    • mistral_statestr

      The state of this task. One of idle, waiting, running, delayed, success, error, or cancelled

    • mistral_state_infostr

      Extra info associated with the state of the task.

    • runsList[dict]

      The runs associated with this task, in descending order by id.

      • idint

        The ID of the run.

      • job_idint

        The ID of the job associated with the run.

      • my_permission_levelstr

        Your permission level on the job. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of the run.

      • created_atstr (time)

        The time that the run was queued.

      • started_atstr (time)

        The time that the run started.

      • finished_atstr (time)

        The time that the run completed.

    • executionsList[dict]

      The executions run by this task, in descending order by id.

      • idint

        The ID of the execution.

      • workflow_idint

        The ID of the workflow associated with the execution.

      • my_permission_levelstr

        Your permission level on the workflow. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of this workflow execution.

      • created_atstr (time)

        The time this execution was created.

      • started_atstr (time)

        The time this execution started.

      • finished_atstr (time)

        The time this execution finished.

  • started_atstr (time)

    The time this execution started.

  • finished_atstr (time)

    The time this execution finished.

  • created_atstr (time)

    The time this execution was created.

  • updated_atstr (time)

    The time this execution was last updated.

post_executions_resume(id: int, execution_id: int)

Resume a paused workflow execution

Parameters:
idint

The ID for the workflow.

execution_idint

The ID for the workflow execution.

Returns:
civis.response.Response
  • idint

    The ID for this workflow execution.

  • statestr

    The state of this workflow execution.

  • mistral_statestr

    The state of this workflow as reported by mistral. One of running, paused, success, error, or cancelled

  • mistral_state_infostr

    The state info of this workflow as reported by mistral.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • definitionstr

    The definition of the workflow for this execution.

  • inputdict

    Key-value pairs defined for this execution.

  • included_tasksList[str]

    The subset of workflow tasks selected to execute.

  • tasksList[dict]

    The tasks associated with this execution.

    • namestr

      The name of the task.

    • mistral_statestr

      The state of this task. One of idle, waiting, running, delayed, success, error, or cancelled

    • mistral_state_infostr

      Extra info associated with the state of the task.

    • runsList[dict]

      The runs associated with this task, in descending order by id.

      • idint

        The ID of the run.

      • job_idint

        The ID of the job associated with the run.

      • my_permission_levelstr

        Your permission level on the job. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of the run.

      • created_atstr (time)

        The time that the run was queued.

      • started_atstr (time)

        The time that the run started.

      • finished_atstr (time)

        The time that the run completed.

    • executionsList[dict]

      The executions run by this task, in descending order by id.

      • idint

        The ID of the execution.

      • workflow_idint

        The ID of the workflow associated with the execution.

      • my_permission_levelstr

        Your permission level on the workflow. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of this workflow execution.

      • created_atstr (time)

        The time this execution was created.

      • started_atstr (time)

        The time this execution started.

      • finished_atstr (time)

        The time this execution finished.

  • started_atstr (time)

    The time this execution started.

  • finished_atstr (time)

    The time this execution finished.

  • created_atstr (time)

    The time this execution was created.

  • updated_atstr (time)

    The time this execution was last updated.

post_executions_retry(id: int, execution_id: int, *, task_name: str = None)

Retry a failed task, or all failed tasks in an execution

Parameters:
idint

The ID for the workflow.

execution_idint

The ID for the workflow execution.

task_namestr, optional

If specified, the name of the task to be retried. If not specified, all failed tasks in the execution will be retried.

Returns:
civis.response.Response
  • idint

    The ID for this workflow execution.

  • statestr

    The state of this workflow execution.

  • mistral_statestr

    The state of this workflow as reported by mistral. One of running, paused, success, error, or cancelled

  • mistral_state_infostr

    The state info of this workflow as reported by mistral.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • definitionstr

    The definition of the workflow for this execution.

  • inputdict

    Key-value pairs defined for this execution.

  • included_tasksList[str]

    The subset of workflow tasks selected to execute.

  • tasksList[dict]

    The tasks associated with this execution.

    • namestr

      The name of the task.

    • mistral_statestr

      The state of this task. One of idle, waiting, running, delayed, success, error, or cancelled

    • mistral_state_infostr

      Extra info associated with the state of the task.

    • runsList[dict]

      The runs associated with this task, in descending order by id.

      • idint

        The ID of the run.

      • job_idint

        The ID of the job associated with the run.

      • my_permission_levelstr

        Your permission level on the job. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of the run.

      • created_atstr (time)

        The time that the run was queued.

      • started_atstr (time)

        The time that the run started.

      • finished_atstr (time)

        The time that the run completed.

    • executionsList[dict]

      The executions run by this task, in descending order by id.

      • idint

        The ID of the execution.

      • workflow_idint

        The ID of the workflow associated with the execution.

      • my_permission_levelstr

        Your permission level on the workflow. One of “read”, “write”, “manage”, or “nil”.

      • statestr

        The state of this workflow execution.

      • created_atstr (time)

        The time this execution was created.

      • started_atstr (time)

        The time this execution started.

      • finished_atstr (time)

        The time this execution finished.

  • started_atstr (time)

    The time this execution started.

  • finished_atstr (time)

    The time this execution finished.

  • created_atstr (time)

    The time this execution was created.

  • updated_atstr (time)

    The time this execution was last updated.

post_git_checkout(id: int)

Checkout content that the existing git_ref points to and save to the object

Parameters:
idint

The ID of the item.

Returns:
civis.response.Response
  • contentstr

    The file’s contents.

  • typestr

    The file’s type.

  • sizeint

    The file’s size.

  • file_hashstr

    The SHA of the file.

post_git_checkout_latest(id: int)

Checkout latest commit on the current branch of a script or workflow

Parameters:
idint

The ID of the item.

Returns:
civis.response.Response
  • contentstr

    The file’s contents.

  • typestr

    The file’s type.

  • sizeint

    The file’s size.

  • file_hashstr

    The SHA of the file.

post_git_commits(id: int, content: str, message: str, file_hash: str)

Commit and push a new version of the file

Parameters:
idint

The ID of the item.

contentstr

The contents to commit to the file.

messagestr

A commit message describing the changes being made.

file_hashstr

The full SHA of the file being replaced.

Returns:
civis.response.Response
  • contentstr

    The file’s contents.

  • typestr

    The file’s type.

  • sizeint

    The file’s size.

  • file_hashstr

    The SHA of the file.

put(id: int, name: str, *, description: str = None, definition: str = None, schedule: dict = None, allow_concurrent_executions: bool = None, time_zone: str = None, notifications: dict = None)

Replace all attributes of this Workflow

Parameters:
idint

The ID for this workflow.

namestr

The name of this workflow.

descriptionstr, optional

A description of the workflow.

definitionstr, optional

The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

scheduledict, optional
  • scheduledbool

    If the item is scheduled.

  • scheduled_daysList[int]

    Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

  • scheduled_hoursList[int]

    Hours of the day it is scheduled on.

  • scheduled_minutesList[int]

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourint

    Deprecated in favor of scheduled minutes.

  • scheduled_days_of_monthList[int]

    Days of the month it is scheduled on, mutually exclusive with scheduledDays.

allow_concurrent_executionsbool, optional

Whether the workflow can execute when already running.

time_zonestr, optional

The time zone of this workflow.

notificationsdict, optional
  • urlsList[str]

    URLs to receive a POST request at job completion

  • success_email_subjectstr

    Custom subject line for success e-mail.

  • success_email_bodystr

    Custom body text for success e-mail, written in Markdown.

  • success_email_addressesList[str]

    Addresses to notify by e-mail when the job completes successfully.

  • failure_email_addressesList[str]

    Addresses to notify by e-mail when the job fails.

  • stall_warning_minutesint

    Stall warning emails will be sent after this amount of minutes.

  • success_onbool

    If success email notifications are on

  • failure_onbool

    If failure email notifications are on

Returns:
civis.response.Response
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • definitionstr

    The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

  • validbool

    The validity of the workflow definition.

  • validation_errorsstr

    The errors encountered when validating the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • notificationsdict
    • urlsList[str]

      URLs to receive a POST request at job completion

    • success_email_subjectstr

      Custom subject line for success e-mail.

    • success_email_bodystr

      Custom body text for success e-mail, written in Markdown.

    • success_email_addressesList[str]

      Addresses to notify by e-mail when the job completes successfully.

    • failure_email_addressesList[str]

      Addresses to notify by e-mail when the job fails.

    • stall_warning_minutesint

      Stall warning emails will be sent after this amount of minutes.

    • success_onbool

      If success email notifications are on

    • failure_onbool

      If failure email notifications are on

  • archivedstr

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • created_at : str (time)

  • updated_at : str (time)

put_archive(id: int, status: bool)

Update the archive status of this object

Parameters:
idint

The ID of the object.

statusbool

The desired archived status of the object.

Returns:
civis.response.Response
  • idint

    The ID for this workflow.

  • namestr

    The name of this workflow.

  • descriptionstr

    A description of the workflow.

  • definitionstr

    The definition of the workflow in YAML format. Must not be specified if fromJobChain is specified.

  • validbool

    The validity of the workflow definition.

  • validation_errorsstr

    The errors encountered when validating the workflow definition.

  • file_idstr

    The file id for the s3 file containing the workflow configuration.

  • userdict
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • statestr

    The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.

  • scheduledict
    • scheduledbool

      If the item is scheduled.

    • scheduled_daysList[int]

      Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth

    • scheduled_hoursList[int]

      Hours of the day it is scheduled on.

    • scheduled_minutesList[int]

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourint

      Deprecated in favor of scheduled minutes.

    • scheduled_days_of_monthList[int]

      Days of the month it is scheduled on, mutually exclusive with scheduledDays.

  • allow_concurrent_executionsbool

    Whether the workflow can execute when already running.

  • time_zonestr

    The time zone of this workflow.

  • next_execution_atstr (time)

    The time of the next scheduled execution.

  • notificationsdict
    • urlsList[str]

      URLs to receive a POST request at job completion

    • success_email_subjectstr

      Custom subject line for success e-mail.

    • success_email_bodystr

      Custom body text for success e-mail, written in Markdown.

    • success_email_addressesList[str]

      Addresses to notify by e-mail when the job completes successfully.

    • failure_email_addressesList[str]

      Addresses to notify by e-mail when the job fails.

    • stall_warning_minutesint

      Stall warning emails will be sent after this amount of minutes.

    • success_onbool

      If success email notifications are on

    • failure_onbool

      If failure email notifications are on

  • archivedstr

    The archival status of the requested item(s).

  • hiddenbool

    The hidden status of the item.

  • my_permission_levelstr

    Your permission level on the object. One of “read”, “write”, or “manage”.

  • created_at : str (time)

  • updated_at : str (time)

put_git(id: int, *, git_ref: str = None, git_branch: str = None, git_path: str = None, git_repo_url: str = None, git_ref_type: str = None, pull_from_git: bool = None)

Attach an item to a file in a git repo

Parameters:
idint

The ID of the item.

git_refstr, optional

A git reference specifying an unambiguous version of the file. Can be a branch name, or the full or shortened SHA of a commit.

git_branchstr, optional

The git branch that the file is on.

git_pathstr, optional

The path of the file in the repository.

git_repo_urlstr, optional

The URL of the git repository.

git_ref_typestr, optional

Specifies if the file is versioned by branch or tag.

pull_from_gitbool, optional

Automatically pull latest commit from git. Only works for scripts.

Returns:
civis.response.Response
  • git_refstr

    A git reference specifying an unambiguous version of the file. Can be a branch name, tag or the full or shortened SHA of a commit.

  • git_branchstr

    The git branch that the file is on.

  • git_pathstr

    The path of the file in the repository.

  • git_repodict
    • idint

      The ID for this git repository.

    • repo_urlstr

      The URL for this git repository.

    • created_at : str (time)

    • updated_at : str (time)

  • git_ref_typestr

    Specifies if the file is versioned by branch or tag.

  • pull_from_gitbool

    Automatically pull latest commit from git. Only works for scripts and workflows (assuming you have the feature enabled)

put_projects(id: int, project_id: int)

Add a Workflow to a project

Parameters:
idint

The ID of the Workflow.

project_idint

The ID of the project.

Returns:
None

Response code 204: success

put_shares_groups(id: int, group_ids: List[int], permission_level: str, *, share_email_body: str = None, send_shared_email: bool = None)

Set the permissions groups has on this object

Parameters:
idint

The ID of the resource that is shared.

group_idsList[int]

An array of one or more group IDs.

permission_levelstr

Options are: “read”, “write”, or “manage”.

share_email_bodystr, optional

Custom body text for e-mail sent on a share.

send_shared_emailbool, optional

Send email to the recipients of a share.

Returns:
civis.response.Response
  • readersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • writersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • ownersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • total_user_sharesint

    For owners, the number of total users shared. For writers and readers, the number of visible users shared.

  • total_group_sharesint

    For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.

put_shares_users(id: int, user_ids: List[int], permission_level: str, *, share_email_body: str = None, send_shared_email: bool = None)

Set the permissions users have on this object

Parameters:
idint

The ID of the resource that is shared.

user_idsList[int]

An array of one or more user IDs.

permission_levelstr

Options are: “read”, “write”, or “manage”.

share_email_bodystr, optional

Custom body text for e-mail sent on a share.

send_shared_emailbool, optional

Send email to the recipients of a share.

Returns:
civis.response.Response
  • readersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • writersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • ownersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • total_user_sharesint

    For owners, the number of total users shared. For writers and readers, the number of visible users shared.

  • total_group_sharesint

    For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.

put_transfer(id: int, user_id: int, include_dependencies: bool, *, email_body: str = None, send_email: bool = None)

Transfer ownership of this object to another user

Parameters:
idint

The ID of the resource that is shared.

user_idint

ID of target user

include_dependenciesbool

Whether or not to give manage permissions on all dependencies

email_bodystr, optional

Custom body text for e-mail sent on transfer.

send_emailbool, optional

Send email to the target user of the transfer?

Returns:
civis.response.Response
  • dependenciesList[dict]

    Dependent objects for this object

    • object_typestr

      Dependent object type

    • fco_typestr

      Human readable dependent object type

    • idint

      Dependent object ID

    • namestr

      Dependent object name, or nil if the requesting user cannot read this object

    • permission_levelstr

      Permission level of target user (not user’s groups) for dependent object. Null if no target user or not shareable (e.g. a database table).

    • descriptionstr

      Additional information about the dependency, if relevant

    • sharedbool

      Whether dependent object was successfully shared with target user