Workflows
- class Workflows(session_kwargs, client, return_type='raw')
Civis API
/workflowsendpoint:import civis client = civis.APIClient() # Call client.workflows.<method>(<arguments>) to make a request, e.g.: client.workflows.list(...)
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(id)Get the git metadata attached to an item
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
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
- delete_projects(id: int, project_id: int) Response
Remove a Workflow from a project
API URL:
DELETE /workflows/{id}/projects/{project_id}- Parameters:
- idint
The ID of the Workflow.
- project_idint
The ID of the project.
- Returns:
- None
Response code 204: success
Revoke the permissions a group has on this object
API URL:
DELETE /workflows/{id}/shares/groups/{group_id}- Parameters:
- idint
The ID of the resource that is shared.
- group_idint
The ID of the group.
- Returns:
- None
Response code 204: success
Revoke the permissions a user has on this object
API URL:
DELETE /workflows/{id}/shares/users/{user_id}- 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) Response
Get a Workflow
API URL:
GET /workflows/{id}- Parameters:
- idint
- Returns:
civis.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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- last_execution_idint
The ID of the most recent execution of this workflow, if any.
- schedule
civis.Response - 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.
- schedule
- 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.
- notifications
civis.Response - 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
- notifications
- 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) Response
Get a workflow execution
API URL:
GET /workflows/{id}/executions/{execution_id}- Parameters:
- idint
The ID for the workflow.
- execution_idint
The ID for the workflow execution.
- Returns:
civis.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.
- user
civis.Response - 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.
- user
- definitionstr
The definition of the workflow for this execution.
- input
civis.Response Key-value pairs defined for this execution.
- input
- included_tasksList[str]
The subset of workflow tasks selected to execute.
- tasksList[
civis.Response] 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[
civis.Response] 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.
- runsList[
- executionsList[
civis.Response] 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.
- executionsList[
- tasksList[
- 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) Response
Get a task of a workflow execution
API URL:
GET /workflows/{id}/executions/{execution_id}/tasks/{task_name}- 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- 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[
civis.Response] 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.
- runsList[
- executionsList[
civis.Response] 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.
- executionsList[
- get_git(id: int) Response
Get the git metadata attached to an item
API URL:
GET /workflows/{id}/git- Parameters:
- idint
The ID of the item.
- Returns:
civis.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_repo
civis.Response - idint
The ID for this git repository.
- repo_urlstr
The URL for this git repository.
created_at : str (time)
updated_at : str (time)
- git_repo
- 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)
- get_git_commits(id: int, commit_hash: str) Response
Get file contents at git ref
API URL:
GET /workflows/{id}/git/commits/{commit_hash}- Parameters:
- idint
The ID of the item.
- commit_hashstr
The SHA (full or shortened) of the desired git commit.
- Returns:
civis.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) ListResponse | PaginatedResponse
List Workflows
API URL:
GET /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. Note that the “scheduled” state applies only to scheduled workflows which have never been run. If you want to see all scheduled workflows, please use the “scheduled” filter instead.
- 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 (specifically, a
civis.PaginatedResponseobject) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- schedule
civis.Response - 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.
- schedule
- 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) ListResponse
List dependent objects for this object
API URL:
GET /workflows/{id}/dependencies- Parameters:
- idint
The ID of the resource that is shared.
- user_idint, optional
ID of target user
- Returns:
civis.ListResponse- 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) ListResponse | PaginatedResponse
List workflow executions
API URL:
GET /workflows/{id}/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 (specifically, a
civis.PaginatedResponseobject) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.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.
- user
civis.Response - 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.
- user
- 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) ListResponse
Get the git metadata attached to an item
API URL:
GET /workflows/{id}/gitWarning
The method name
<client>.workflows.list_gitis deprecated and will be removed at civis-python v3.0.0 (no release timeline yet). Please switch to<client>.workflows.get_gitfor the same method.- Parameters:
- idint
The ID of the item.
- Returns:
civis.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_repo
civis.Response - idint
The ID for this git repository.
- repo_urlstr
The URL for this git repository.
created_at : str (time)
updated_at : str (time)
- git_repo
- 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) ListResponse
Get the git commits for an item on the current branch
API URL:
GET /workflows/{id}/git/commits- Parameters:
- idint
The ID of the item.
- Returns:
civis.ListResponse- 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) ListResponse
List the projects a Workflow belongs to
API URL:
GET /workflows/{id}/projects- 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.ListResponse- idint
The ID for this project.
- author
civis.Response - 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.
- author
- namestr
The name of this project.
- descriptionstr
A description of the project.
- usersList[
civis.Response] 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.
- usersList[
auto_share : bool
created_at : str (time)
updated_at : str (time)
- archivedstr
The archival status of the requested item(s).
List users and groups permissioned on this object
API URL:
GET /workflows/{id}/shares- Parameters:
- idint
The ID of the resource that is shared.
- Returns:
civis.ListResponse- readers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- readers
- writers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- writers
- owners
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- owners
- 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) Response
Update some attributes of this Workflow
API URL:
PATCH /workflows/{id}- 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- 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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- last_execution_idint
The ID of the most recent execution of this workflow, if any.
- schedule
civis.Response - 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.
- schedule
- 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.
- notifications
civis.Response - 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
- notifications
- 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) Response
Update an attached git file
API URL:
PATCH /workflows/{id}/git- 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 (e.g., https://github.com/organization/repo_name.git).
- 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- 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_repo
civis.Response - idint
The ID for this git repository.
- repo_urlstr
The URL for this git repository.
created_at : str (time)
updated_at : str (time)
- git_repo
- 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) Response
Create a Workflow
API URL:
POST /workflows- 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- 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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- last_execution_idint
The ID of the most recent execution of this workflow, if any.
- schedule
civis.Response - 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.
- schedule
- 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.
- notifications
civis.Response - 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
- notifications
- 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) Response
Clone this Workflow
API URL:
POST /workflows/{id}/clone- 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- 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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- last_execution_idint
The ID of the most recent execution of this workflow, if any.
- schedule
civis.Response - 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.
- schedule
- 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.
- notifications
civis.Response - 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
- notifications
- 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) Response
Execute a workflow
API URL:
POST /workflows/{id}/executions- 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- 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.
- user
civis.Response - 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.
- user
- definitionstr
The definition of the workflow for this execution.
- input
civis.Response Key-value pairs defined for this execution.
- input
- included_tasksList[str]
The subset of workflow tasks selected to execute.
- tasksList[
civis.Response] 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[
civis.Response] 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.
- runsList[
- executionsList[
civis.Response] 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.
- executionsList[
- tasksList[
- 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) Response
Cancel a workflow execution
API URL:
POST /workflows/{id}/executions/{execution_id}/cancel- Parameters:
- idint
The ID for the workflow.
- execution_idint
The ID for the workflow execution.
- Returns:
civis.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.
- user
civis.Response - 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.
- user
- definitionstr
The definition of the workflow for this execution.
- input
civis.Response Key-value pairs defined for this execution.
- input
- included_tasksList[str]
The subset of workflow tasks selected to execute.
- tasksList[
civis.Response] 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[
civis.Response] 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.
- runsList[
- executionsList[
civis.Response] 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.
- executionsList[
- tasksList[
- 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) Response
Resume a paused workflow execution
API URL:
POST /workflows/{id}/executions/{execution_id}/resume- Parameters:
- idint
The ID for the workflow.
- execution_idint
The ID for the workflow execution.
- Returns:
civis.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.
- user
civis.Response - 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.
- user
- definitionstr
The definition of the workflow for this execution.
- input
civis.Response Key-value pairs defined for this execution.
- input
- included_tasksList[str]
The subset of workflow tasks selected to execute.
- tasksList[
civis.Response] 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[
civis.Response] 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.
- runsList[
- executionsList[
civis.Response] 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.
- executionsList[
- tasksList[
- 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) Response
Retry a failed task, or all failed tasks in an execution
API URL:
POST /workflows/{id}/executions/{execution_id}/retry- 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- 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.
- user
civis.Response - 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.
- user
- definitionstr
The definition of the workflow for this execution.
- input
civis.Response Key-value pairs defined for this execution.
- input
- included_tasksList[str]
The subset of workflow tasks selected to execute.
- tasksList[
civis.Response] 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[
civis.Response] 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.
- runsList[
- executionsList[
civis.Response] 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.
- executionsList[
- tasksList[
- 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_latest(id: int) Response
Checkout latest commit on the current branch of a script or workflow
API URL:
POST /workflows/{id}/git/checkout-latest- Parameters:
- idint
The ID of the item.
- Returns:
civis.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) Response
Commit and push a new version of the file
API URL:
POST /workflows/{id}/git/commits- 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- 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) Response
Replace all attributes of this Workflow
API URL:
PUT /workflows/{id}- 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- 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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- last_execution_idint
The ID of the most recent execution of this workflow, if any.
- schedule
civis.Response - 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.
- schedule
- 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.
- notifications
civis.Response - 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
- notifications
- 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) Response
Update the archive status of this object
API URL:
PUT /workflows/{id}/archive- Parameters:
- idint
The ID of the object.
- statusbool
The desired archived status of the object.
- Returns:
civis.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.
- user
civis.Response - 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.
- user
- statestr
The state of the workflow. State is “running” if any execution is running, otherwise reflects most recent execution state.
- last_execution_idint
The ID of the most recent execution of this workflow, if any.
- schedule
civis.Response - 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.
- schedule
- 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.
- notifications
civis.Response - 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
- notifications
- 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) Response
Attach an item to a file in a git repo
API URL:
PUT /workflows/{id}/git- 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 (e.g., https://github.com/organization/repo_name.git).
- 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- 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_repo
civis.Response - idint
The ID for this git repository.
- repo_urlstr
The URL for this git repository.
created_at : str (time)
updated_at : str (time)
- git_repo
- 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) Response
Add a Workflow to a project
API URL:
PUT /workflows/{id}/projects/{project_id}- Parameters:
- idint
The ID of the Workflow.
- project_idint
The ID of the project.
- Returns:
- None
Response code 204: success
Set the permissions groups has on this object
API URL:
PUT /workflows/{id}/shares/groups- 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- readers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- readers
- writers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- writers
- owners
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- owners
- 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.
Set the permissions users have on this object
API URL:
PUT /workflows/{id}/shares/users- 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- readers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- readers
- writers
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- writers
- owners
civis.Response - usersList[
civis.Response] id : int
name : str
- usersList[
- groupsList[
civis.Response] id : int
name : str
- groupsList[
- owners
- 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) Response
Transfer ownership of this object to another user
API URL:
PUT /workflows/{id}/transfer- 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- dependenciesList[
civis.Response] 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
- dependenciesList[