API Resources¶
Announcements¶
-
class
Announcements
(session_kwargs, client, return_type='civis')¶ Methods
-
list
(self, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List announcements
Parameters: - limit : integer, optional
Number of results to return. Defaults to 10. Maximum allowed is 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to released_at. Must be one of: released_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of this announcement
- subject : string
The subject of this announcement.
- body : string
The body of this announcement.
- released_at : string/date-time
The date and time this announcement was released.
- created_at : string/date-time
- updated_at : string/date-time
-
Apps¶
-
class
Apps
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_instances_projects
(self, id, project_id, slug)¶ Remove an App Instance from a project
Parameters: - id : integer
The ID of the App Instance.
- project_id : integer
The ID of the project.
- slug : string
The slug for the application.
Returns: - None
Response code 204: success
Revoke the permissions a group has on this object
Parameters: - slug : string
The slug for the application.
- id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - slug : string
The slug for the application.
- id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
get
(self, slug)¶ List details of a Decision Application
Parameters: - slug : string
The slug for the application.
Returns: - slug : string
The slug for the application.
- id : integer
The unique id of the application.
- instance_name : string
A word that describes an instance of this app.
- name : string
The name of the application.
- current_release : dict::
- id : integer
- The unique id of the release.
- app_id : integer
- The id of the app the release belongs to.
- report_template_id : integer
- ID of the report template for this release.
- resources : dict
- A hash of resources associated with this release.
- archived : string
- The archival status of the requested item(s).
- features : dict
App features.
-
get_instances
(self, id, slug)¶ Return a given app instance
Parameters: - id : integer
The unique id of the instance.
- slug : string
The slug for the application.
Returns: - id : integer
The unique id of the instance.
- name : string
The name of the instance.
- app_release_id : integer
The id of the app release the instance belongs to.
- report_id : integer
The id of the report the instance belongs to.
- created_at : string/time
The time the instance was created at.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- project_id : integer
The id of the project collecting all the items that belong to this app instance.
- auth_code_url : string
- api_key : string
A Civis API key that can be used by this app instance.
- archived : string
The archival status of the requested item(s).
-
get_releases
(self, id, slug)¶ Return a given app release
Parameters: - id : integer
The unique id of the release.
- slug : string
The slug for the application.
Returns: - id : integer
The unique id of the release.
- app_id : integer
The id of the app the release belongs to.
- report_template_id : integer
ID of the report template for this release.
- resources : dict
A hash of resources associated with this release.
- archived : string
The archival status of the requested item(s).
-
list
(self)¶ List apps
Returns: - slug : string
The slug for the application.
- id : integer
The unique id of the application.
- instance_name : string
A word that describes an instance of this app.
- name : string
The name of the application.
-
list_instances
(self, slug, *, archived='DEFAULT', app_release_id='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the instances of a Decision Application
Parameters: - slug : string
The slug for the application.
- archived : string, optional
The archival status of the requested item(s).
- app_release_id : integer, optional
If supplied, return only instances matching this release.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id, created_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iterator : bool, 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: - id : integer
The unique id of the instance.
- name : string
The name of the instance.
- app_release_id : integer
The id of the app release the instance belongs to.
- report_id : integer
The id of the report the instance belongs to.
- created_at : string/time
The time the instance was created at.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- project_id : integer
The id of the project collecting all the items that belong to this app instance.
- archived : string
The archival status of the requested item(s).
-
list_instances_projects
(self, id, slug, *, hidden='DEFAULT')¶ List the projects an App Instance belongs to
Parameters: - id : integer
The ID of the App Instance.
- slug : string
The slug for the application.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
Returns: - id : integer
The ID for this project.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- name : string
The name of this project.
- description : string
A description of the project.
- users : list::
Users who can see the project. - id : integer
The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- auto_share : boolean
- created_at : string/time
- updated_at : string/time
- archived : string
The archival status of the requested item(s).
List users and groups permissioned on this object
Parameters: - slug : string
The slug for the application.
- id : integer
The ID of the resource that is shared.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
list_releases
(self, slug, *, archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the releases of a particular Decision Application
Parameters: - slug : string
The slug for the application.
- archived : string, optional
The archival status of the requested item(s).
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iterator : bool, 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: - id : integer
The unique id of the release.
- app_id : integer
The id of the app the release belongs to.
- report_template_id : integer
ID of the report template for this release.
- resources : dict
A hash of resources associated with this release.
- archived : string
The archival status of the requested item(s).
-
patch_instances
(self, id, slug, *, name='DEFAULT')¶ Update a given app instance
Parameters: - id : integer
The unique id of the instance.
- slug : string
The slug for the application.
- name : string, optional
The name of the instance.
Returns: - id : integer
The unique id of the instance.
- name : string
The name of the instance.
- app_release_id : integer
The id of the app release the instance belongs to.
- report_id : integer
The id of the report the instance belongs to.
- created_at : string/time
The time the instance was created at.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- project_id : integer
The id of the project collecting all the items that belong to this app instance.
- auth_code_url : string
- api_key : string
A Civis API key that can be used by this app instance.
- archived : string
The archival status of the requested item(s).
-
post_instances
(self, slug, *, name='DEFAULT')¶ Create a new instance of an application of the given slug
Parameters: - slug : string
The slug for the application.
- name : string, optional
The name of the instance.
Returns: - id : integer
The unique id of the instance.
- name : string
The name of the instance.
- app_release_id : integer
The id of the app release the instance belongs to.
- report_id : integer
The id of the report the instance belongs to.
- created_at : string/time
The time the instance was created at.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- project_id : integer
The id of the project collecting all the items that belong to this app instance.
- auth_code_url : string
- api_key : string
A Civis API key that can be used by this app instance.
- archived : string
The archival status of the requested item(s).
-
put_instances_archive
(self, id, slug, status)¶ Update the archive status of this object
Parameters: - id : integer
The ID of the object.
- slug : string
The slug for the application.
- status : boolean
The desired archived status of the object.
Returns: - id : integer
The unique id of the instance.
- name : string
The name of the instance.
- app_release_id : integer
The id of the app release the instance belongs to.
- report_id : integer
The id of the report the instance belongs to.
- created_at : string/time
The time the instance was created at.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- project_id : integer
The id of the project collecting all the items that belong to this app instance.
- auth_code_url : string
- api_key : string
A Civis API key that can be used by this app instance.
- archived : string
The archival status of the requested item(s).
-
put_instances_projects
(self, id, project_id, slug)¶ Add an App Instance to a project
Parameters: - id : integer
The ID of the App Instance.
- project_id : integer
The ID of the project.
- slug : string
The slug for the application.
Returns: - None
Response code 204: success
Set the permissions groups has on this object
Parameters: - slug : string
The slug for the application.
- id : integer
The ID of the resource that is shared.
- group_ids : list
An array of one or more group IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
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
Parameters: - slug : string
The slug for the application.
- id : integer
The ID of the resource that is shared.
- user_ids : list
An array of one or more user IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
Clusters¶
-
class
Clusters
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_kubernetes_partitions
(self, id, cluster_partition_id)¶ Delete a Cluster Partition
Parameters: - id : integer
The ID of the cluster which this partition belongs to.
- cluster_partition_id : integer
The ID of this cluster partition.
Returns: - None
Response code 204: success
-
get_kubernetes
(self, id)¶ Describe a Kubernetes Cluster
Parameters: - id : integer
The ID of this cluster.
Returns: - id : integer
The ID of this cluster.
- organization_id : string
The id of this cluster’s organization.
- organization_name : string
The name of this cluster’s organization.
- organization_slug : string
The slug of this cluster’s organization.
- cluster_partitions : list::
List of cluster partitions associated with this cluster. - cluster_partition_id : integer
The ID of this cluster partition.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
- instance_configs : list::
The instances configured for this cluster partition. - instance_config_id : integer
The ID of this InstanceConfig.
- instance_type : string
- An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- instance_max_memory : integer
- The amount of memory (RAM) available to a single instance of that type in megabytes.
- instance_max_cpu : integer
- The number of processor shares available to a single instance of that type in millicores.
- instance_max_disk : integer
- The amount of disk available to a single instance of that type in gigabytes.
- default_instance_config_id : integer
The id of the InstanceConfig that is the default for this partition.
- is_nat_enabled : boolean
Whether this cluster needs a NAT gateway or not.
-
get_kubernetes_partitions
(self, id, cluster_partition_id)¶ Describe a Cluster Partition
Parameters: - id : integer
The ID of the cluster which this partition belongs to.
- cluster_partition_id : integer
The ID of this cluster partition.
Returns: - cluster_partition_id : integer
The ID of this cluster partition.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
- instance_configs : list::
The instances configured for this cluster partition. - instance_config_id : integer
The ID of this InstanceConfig.
- instance_type : string
- An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- instance_max_memory : integer
- The amount of memory (RAM) available to a single instance of that type in megabytes.
- instance_max_cpu : integer
- The number of processor shares available to a single instance of that type in millicores.
- instance_max_disk : integer
- The amount of disk available to a single instance of that type in gigabytes.
- default_instance_config_id : integer
The id of the InstanceConfig that is the default for this partition.
-
get_workers
(self, id)¶ Describe a Worker Cluster
Parameters: - id : integer
The ID of this cluster.
Returns: - id : integer
The ID of this cluster.
- instance_type : string
The EC2 instance types in this cluster.
- min_instances : integer
The minimum number of instances in this cluster.
- max_instances : integer
The maximum number of instances in this cluster.
- instances : integer
The number of instances currently in this cluster.
- instance_max_memory : integer
The amount of memory available to a single instance.
- instance_max_cpu : integer
The number of processor shares available to a single instance.
- instance_max_disk_space : number/float
The amount of memory available to a single instance.
- region : string
The AWS region that this cluster is in.
- active_jobs_count : integer
The number of jobs currently being run in the cluster.
- queued_jobs_count : integer
The number of jobs currently waiting to be run on the cluster.
-
list_kubernetes
(self, *, organization_slug='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List Kubernetes Clusters
Parameters: - organization_slug : string, optional
The slug of this cluster’s organization.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to organization_id. Must be one of: organization_id, created_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iterator : bool, 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: - id : integer
The ID of this cluster.
- organization_id : string
The id of this cluster’s organization.
- organization_name : string
The name of this cluster’s organization.
- organization_slug : string
The slug of this cluster’s organization.
- cluster_partitions : list::
List of cluster partitions associated with this cluster. - cluster_partition_id : integer
The ID of this cluster partition.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
- instance_configs : list::
The instances configured for this cluster partition. - instance_config_id : integer
The ID of this InstanceConfig.
- instance_type : string
- An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- instance_max_memory : integer
- The amount of memory (RAM) available to a single instance of that type in megabytes.
- instance_max_cpu : integer
- The number of processor shares available to a single instance of that type in millicores.
- instance_max_disk : integer
- The amount of disk available to a single instance of that type in gigabytes.
- default_instance_config_id : integer
The id of the InstanceConfig that is the default for this partition.
- is_nat_enabled : boolean
Whether this cluster needs a NAT gateway or not.
-
list_kubernetes_deployment_stats
(self, id)¶ Get stats about deployments associated with a Kubernetes Cluster
Parameters: - id : integer
The ID of this cluster.
Returns: - base_type : string
The base type of this deployment
- state : string
State of the deployment
- count : integer
Number of deployments of base type and state
- total_cpu : integer
Total amount of CPU in millicores for deployments of base type and state
- total_memory : integer
Total amount of Memory in megabytes for deployments of base type and state
-
list_kubernetes_deployments
(self, id, *, base_type='DEFAULT', state='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the deployments associated with a Kubernetes Cluster
Parameters: - id : integer
The id of the cluster.
- base_type : string, optional
If specified, return deployments of these base types. It accepts a comma- separated list, possible values are ‘Notebook’, ‘Service’, ‘Run’.
- state : string, optional
If specified, return deployments in these states. It accepts a comma- separated list, possible values are pending, running, terminated, sleeping
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to created_at. Must be one of: created_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iterator : bool, 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: - id : integer
The id of this deployment.
- name : string
The name of the deployment.
- base_id : integer
The id of the base object associated with the deployment.
- base_type : string
The base type of this deployment.
- state : string
The state of the deployment.
- cpu : integer
The CPU in millicores required by the deployment.
- memory : integer
The memory in MB required by the deployment.
- disk_space : integer
The disk space in GB required by the deployment.
- instance_type : string
The EC2 instance type requested for the deployment.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- created_at : string/time
- updated_at : string/time
-
list_kubernetes_partitions
(self, id)¶ List Cluster Partitions for given cluster
Parameters: - id : integer
The ID of this cluster.
Returns: - cluster_partition_id : integer
The ID of this cluster partition.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
- instance_configs : list::
The instances configured for this cluster partition. - instance_config_id : integer
The ID of this InstanceConfig.
- instance_type : string
- An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- instance_max_memory : integer
- The amount of memory (RAM) available to a single instance of that type in megabytes.
- instance_max_cpu : integer
- The number of processor shares available to a single instance of that type in millicores.
- instance_max_disk : integer
- The amount of disk available to a single instance of that type in gigabytes.
- default_instance_config_id : integer
The id of the InstanceConfig that is the default for this partition.
-
list_workers
(self, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List Worker Clusters
Parameters: - limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id, created_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iterator : bool, 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: - id : integer
The ID of this cluster.
- instance_type : string
The EC2 instance types in this cluster.
- min_instances : integer
The minimum number of instances in this cluster.
- max_instances : integer
The maximum number of instances in this cluster.
- region : string
The AWS region that this cluster is in.
- active_jobs_count : integer
The number of jobs currently being run in the cluster.
- queued_jobs_count : integer
The number of jobs currently waiting to be run on the cluster.
-
list_workers_active_jobs
(self, id)¶ List Active Jobs for a Worker Cluster
Parameters: - id : integer
The ID of this cluster.
Returns: - id : integer
- name : string
- type : string
- from_template_id : integer
- state : string
Whether the job is idle, queued, running, cancelled, or failed.
- created_at : string/date-time
- updated_at : string/date-time
- runs : list::
Information about the most recent runs of the job. - id : integer - state : string - created_at : string/time
The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- hidden : boolean
The hidden status of the item.
- required_cpu : integer
The CPU shares required by the script.
- required_disk_space : integer
The disk space in GB required by the script.
- required_memory : integer
The memory in MB required by the script.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
-
list_workers_queued_jobs
(self, id)¶ List Queued Jobs for a Worker Cluster
Parameters: - id : integer
The ID of this cluster.
Returns: - id : integer
- name : string
- type : string
- from_template_id : integer
- state : string
Whether the job is idle, queued, running, cancelled, or failed.
- created_at : string/date-time
- updated_at : string/date-time
- runs : list::
Information about the most recent runs of the job. - id : integer - state : string - created_at : string/time
The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- hidden : boolean
The hidden status of the item.
- required_cpu : integer
The CPU shares required by the script.
- required_disk_space : integer
The disk space in GB required by the script.
- required_memory : integer
The memory in MB required by the script.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
-
patch_kubernetes_partitions
(self, id, cluster_partition_id, *, instance_configs='DEFAULT', name='DEFAULT', labels='DEFAULT')¶ Update a Cluster Partition
Parameters: - id : integer
The ID of the cluster which this partition belongs to.
- cluster_partition_id : integer
The ID of this cluster partition.
- instance_configs : list, optional::
The instances configured for this cluster partition. - instance_type : string
An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- name : string, optional
The name of the cluster partition.
- labels : list, optional
Labels associated with this partition.
Returns: - cluster_partition_id : integer
The ID of this cluster partition.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
- instance_configs : list::
The instances configured for this cluster partition. - instance_config_id : integer
The ID of this InstanceConfig.
- instance_type : string
- An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- instance_max_memory : integer
- The amount of memory (RAM) available to a single instance of that type in megabytes.
- instance_max_cpu : integer
- The number of processor shares available to a single instance of that type in millicores.
- instance_max_disk : integer
- The amount of disk available to a single instance of that type in gigabytes.
- default_instance_config_id : integer
The id of the InstanceConfig that is the default for this partition.
-
post_kubernetes_partitions
(self, id, instance_configs, name, labels)¶ Create a Cluster Partition for given cluster
Parameters: - id : integer
The ID of the cluster which this partition belongs to.
- instance_configs : list::
The instances configured for this cluster partition. - instance_type : string
An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
Returns: - cluster_partition_id : integer
The ID of this cluster partition.
- name : string
The name of the cluster partition.
- labels : list
Labels associated with this partition.
- instance_configs : list::
The instances configured for this cluster partition. - instance_config_id : integer
The ID of this InstanceConfig.
- instance_type : string
- An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, and p2.xlarge.
- min_instances : integer
- The minimum number of instances of that type in this cluster.
- max_instances : integer
- The maximum number of instances of that type in this cluster.
- instance_max_memory : integer
- The amount of memory (RAM) available to a single instance of that type in megabytes.
- instance_max_cpu : integer
- The number of processor shares available to a single instance of that type in millicores.
- instance_max_disk : integer
- The amount of disk available to a single instance of that type in gigabytes.
- default_instance_config_id : integer
The id of the InstanceConfig that is the default for this partition.
-
Codes¶
-
class
Codes
(session_kwargs, client, return_type='civis')¶ Methods
-
delete
(self, id)¶ Delete a code
Parameters: - id : integer
The ID for this code.
Returns: - None
Response code 204: success
-
get
(self, id)¶ Show basic code info
Parameters: - id : integer
The ID for this code.
Returns: - id : integer
The ID for this code.
- name : string
Name of code.
- type : string
The code’s type; e.g., Code::FrontEnd.
- body : string
Actual code contents; e.g., HTML, SQL, etc.
- readme : string
User specified information about this code. Markdown format accepted.
- score : integer
Internal Civis Use Only.
- auth_s3_url : string
Authorized_s3_link to file.
- created_at : string/time
The creation time for this code.
- updated_at : string/time
The last modification time for this code.
-
list
(self, *, limit='DEFAULT', type='DEFAULT', featured='DEFAULT')¶ List codes
Parameters: - limit : integer, optional
The maximum number of codes to return.
- type : string, optional
The code’s type; e.g., Code::FrontEnd.
- featured : boolean, optional
If true, return featured codes.
Returns: - id : integer
The ID for this code.
- name : string
Name of code.
- type : string
The code’s type; e.g., Code::FrontEnd.
- created_at : string/time
The creation time for this code.
- updated_at : string/time
The last modification time for this code.
-
patch
(self, id, *, name='DEFAULT', type='DEFAULT', body='DEFAULT', readme='DEFAULT', score='DEFAULT', auth_s3_url='DEFAULT')¶ Update a code
Parameters: - id : integer
The ID for this code.
- name : string, optional
Name of code.
- type : string, optional
The code’s type; e.g., Code::FrontEnd.
- body : string, optional
Actual code contents; e.g., HTML, SQL, etc.
- readme : string, optional
User specified information about this code. Markdown format accepted.
- score : integer, optional
Internal Civis Use Only.
- auth_s3_url : string, optional
Authorized_s3_link to file.
Returns: - None
Response code 204: success
-
post
(self, name, type, body, readme, *, score='DEFAULT', auth_s3_url='DEFAULT')¶ Create a new code
Parameters: - name : string
Name of code.
- type : string
The code’s type; e.g., Code::FrontEnd.
- body : string
Actual code contents; e.g., HTML, SQL, etc.
- readme : string
User specified information about this code. Markdown format accepted.
- score : integer, optional
Internal Civis Use Only.
- auth_s3_url : string, optional
Authorized_s3_link to file.
Returns: - None
Response code 204: success
-
put
(self, id, name, type, body, readme, *, score='DEFAULT', auth_s3_url='DEFAULT')¶ Update a code
Parameters: - id : integer
The ID for this code.
- name : string
Name of code.
- type : string
The code’s type; e.g., Code::FrontEnd.
- body : string
Actual code contents; e.g., HTML, SQL, etc.
- readme : string
User specified information about this code. Markdown format accepted.
- score : integer, optional
Internal Civis Use Only.
- auth_s3_url : string, optional
Authorized_s3_link to file.
Returns: - id : integer
The ID for this code.
- name : string
Name of code.
- type : string
The code’s type; e.g., Code::FrontEnd.
- body : string
Actual code contents; e.g., HTML, SQL, etc.
- readme : string
User specified information about this code. Markdown format accepted.
- score : integer
Internal Civis Use Only.
- auth_s3_url : string
Authorized_s3_link to file.
- created_at : string/time
The creation time for this code.
- updated_at : string/time
The last modification time for this code.
-
Credentials¶
-
class
Credentials
(session_kwargs, client, return_type='civis')¶ Methods
Revoke the permissions a group has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
get
(self, id)¶ Get a credential
Parameters: - id : integer
The ID of the credential.
Returns: - id : integer
The ID of the credential.
- name : string
The name identifying the credential
- type : string
The credential’s type.
- username : string
The username for the credential.
- description : string
A long description of the credential.
- owner : string
The name of the user who this credential belongs to.
- remote_host_id : integer
The ID of the remote host associated with this credential.
- remote_host_name : string
The name of the remote host associated with this credential.
- state : string
The U.S. state for the credential. Only for VAN credentials.
- created_at : string/time
The creation time for this credential.
- updated_at : string/time
The last modification time for this credential.
-
list
(self, *, type='DEFAULT', remote_host_id='DEFAULT', default='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List credentials
Parameters: - type : string, optional
The type (or types) of credentials to return. One or more of: Amazon Web Services S3, Bitbucket, BSD::API, CASS/NCOA PAF, Catalist::API, Catalist::SFTP, Certificate, Civis Platform, Custom, Database, Google, Github, JobTraits::Ftp, Salesforce User, Salesforce Client, Silverpop Application, Silverpop Refresh Token, Silverpop User, TableauUser, VAN::MyVoterFile, VAN::MyCampaign, and VAN::BothModes. Specify multiple values as a comma-separated list (e.g., “A,B”).
- remote_host_id : integer, optional
The ID of the remote host associated with the credentials to return.
- default : boolean, optional
If true, will return a list with a single credential which is the current user’s default credential.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 1000.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, created_at, name.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the credential.
- name : string
The name identifying the credential
- type : string
The credential’s type.
- username : string
The username for the credential.
- description : string
A long description of the credential.
- owner : string
The name of the user who this credential belongs to.
- remote_host_id : integer
The ID of the remote host associated with this credential.
- remote_host_name : string
The name of the remote host associated with this credential.
- state : string
The U.S. state for the credential. Only for VAN credentials.
- created_at : string/time
The creation time for this credential.
- updated_at : string/time
The last modification time for this credential.
List users and groups permissioned on this object
Parameters: - id : integer
The ID of the resource that is shared.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
post
(self, type, username, password, *, name='DEFAULT', description='DEFAULT', remote_host_id='DEFAULT', state='DEFAULT', system_credential='DEFAULT')¶ Create a credential
Parameters: - type : string
- username : string
The username for the credential.
- password : string
The password for the credential.
- name : string, optional
The name identifying the credential.
- description : string, optional
A long description of the credential.
- remote_host_id : integer, optional
The ID of the remote host associated with the credential.
- state : string, optional
The U.S. state for the credential. Only for VAN credentials.
- system_credential : boolean, optional
Returns: - id : integer
The ID of the credential.
- name : string
The name identifying the credential
- type : string
The credential’s type.
- username : string
The username for the credential.
- description : string
A long description of the credential.
- owner : string
The name of the user who this credential belongs to.
- remote_host_id : integer
The ID of the remote host associated with this credential.
- remote_host_name : string
The name of the remote host associated with this credential.
- state : string
The U.S. state for the credential. Only for VAN credentials.
- created_at : string/time
The creation time for this credential.
- updated_at : string/time
The last modification time for this credential.
-
post_authenticate
(self, url, remote_host_type, username, password)¶ Authenticate against a remote host
Parameters: - url : string
The URL to your host.
- remote_host_type : string
The type of remote host. One of: RemoteHostTypes::BSD, RemoteHostTypes::Bitbucket, RemoteHostTypes::Ftp, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, RemoteHostTypes::Salesforce, RemoteHostTypes::Snowflake, and RemoteHostTypes::Van
- username : string
The username for the credential.
- password : string
The password for the credential.
Returns: - id : integer
The ID of the credential.
- name : string
The name identifying the credential
- type : string
The credential’s type.
- username : string
The username for the credential.
- description : string
A long description of the credential.
- owner : string
The name of the user who this credential belongs to.
- remote_host_id : integer
The ID of the remote host associated with this credential.
- remote_host_name : string
The name of the remote host associated with this credential.
- state : string
The U.S. state for the credential. Only for VAN credentials.
- created_at : string/time
The creation time for this credential.
- updated_at : string/time
The last modification time for this credential.
-
post_temporary
(self, id, *, duration='DEFAULT')¶ Generate a temporary credential for accessing S3
Parameters: - id : integer
The ID of the credential.
- duration : integer, optional
The number of seconds the temporary credential should be valid. Defaults to 15 minutes. Must not be less than 15 minutes or greater than 36 hours.
Returns: - access_key : string
The identifier of the credential.
- secret_access_key : string
The secret part of the credential.
- session_token : string
The session token identifier.
-
put
(self, id, type, username, password, *, name='DEFAULT', description='DEFAULT', remote_host_id='DEFAULT', state='DEFAULT', system_credential='DEFAULT')¶ Update an existing credential
Parameters: - id : integer
The ID of the credential.
- type : string
- username : string
The username for the credential.
- password : string
The password for the credential.
- name : string, optional
The name identifying the credential.
- description : string, optional
A long description of the credential.
- remote_host_id : integer, optional
The ID of the remote host associated with the credential.
- state : string, optional
The U.S. state for the credential. Only for VAN credentials.
- system_credential : boolean, optional
Returns: - id : integer
The ID of the credential.
- name : string
The name identifying the credential
- type : string
The credential’s type.
- username : string
The username for the credential.
- description : string
A long description of the credential.
- owner : string
The name of the user who this credential belongs to.
- remote_host_id : integer
The ID of the remote host associated with this credential.
- remote_host_name : string
The name of the remote host associated with this credential.
- state : string
The U.S. state for the credential. Only for VAN credentials.
- created_at : string/time
The creation time for this credential.
- updated_at : string/time
The last modification time for this credential.
Set the permissions groups has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_ids : list
An array of one or more group IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
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
Parameters: - id : integer
The ID of the resource that is shared.
- user_ids : list
An array of one or more user IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
Databases¶
-
class
Databases
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_whitelist_ips
(self, id, whitelisted_ip_id)¶ Remove a whitelisted IP address
Parameters: - id : integer
The ID of the database this rule is applied to.
- whitelisted_ip_id : integer
The ID of this whitelisted IP address.
Returns: - None
Response code 204: success
-
get
(self, id)¶ Show database information
Parameters: - id : integer
The ID for the database.
Returns: - id : integer
The ID for the database.
- name : string
The name of the database.
- adapter : string
The type of the database.
-
get_whitelist_ips
(self, id, whitelisted_ip_id)¶ View details about a whitelisted IP
Parameters: - id : integer
The ID of the database this rule is applied to.
- whitelisted_ip_id : integer
The ID of this whitelisted IP address.
Returns: - id : integer
The ID of this whitelisted IP address.
- remote_host_id : integer
The ID of the database this rule is applied to.
- security_group_id : string
The ID of the security group this rule is applied to.
- subnet_mask : string
The subnet mask that is allowed by this rule.
- authorized_by : string
The user who authorized this rule.
- is_active : boolean
True if the rule is applied, false if it has been revoked.
- created_at : string/time
The time this rule was created.
- updated_at : string/time
The time this rule was last updated.
-
list
(self)¶ List databases
Returns: - id : integer
The ID for the database.
- name : string
The name of the database.
- adapter : string
The type of the database.
-
list_schemas
(self, id)¶ List schemas in this database
Parameters: - id : integer
The ID of the database.
Returns: - schema : string
The name of a schema.
-
list_whitelist_ips
(self, id)¶ List whitelisted IPs for the specified database
Parameters: - id : integer
The ID for the database.
Returns: - id : integer
The ID of this whitelisted IP address.
- remote_host_id : integer
The ID of the database this rule is applied to.
- security_group_id : string
The ID of the security group this rule is applied to.
- subnet_mask : string
The subnet mask that is allowed by this rule.
- created_at : string/time
The time this rule was created.
- updated_at : string/time
The time this rule was last updated.
-
post_schemas_scan
(self, id, schema, *, stats_priority='DEFAULT')¶ Creates and enqueues a schema scanner job
Parameters: - id : integer
The ID of the database.
- schema : string
The name of the schema.
- stats_priority : string, optional
When to sync table statistics for every table in the schema. Valid options are the following. Option: ‘flag’ means to flag stats for the next scheduled run of a full table scan on the database. Option: ‘block’ means to block this job on stats syncing. Option: ‘queue’ means to queue a separate job for syncing stats and do not block this job on the queued job. Defaults to ‘flag’
Returns: - job_id : integer
The ID of the job created.
- run_id : integer
The ID of the run created.
-
post_whitelist_ips
(self, id, subnet_mask)¶ Whitelist an IP address
Parameters: - id : integer
The ID of the database this rule is applied to.
- subnet_mask : string
The subnet mask that is allowed by this rule.
Returns: - id : integer
The ID of this whitelisted IP address.
- remote_host_id : integer
The ID of the database this rule is applied to.
- security_group_id : string
The ID of the security group this rule is applied to.
- subnet_mask : string
The subnet mask that is allowed by this rule.
- authorized_by : string
The user who authorized this rule.
- is_active : boolean
True if the rule is applied, false if it has been revoked.
- created_at : string/time
The time this rule was created.
- updated_at : string/time
The time this rule was last updated.
-
Endpoints¶
Enhancements¶
-
class
Enhancements
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_cass_ncoa_projects
(self, id, project_id)¶ Remove a CASS/NCOA Enhancement from a project
Parameters: - id : integer
The ID of the CASS/NCOA Enhancement.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
-
delete_cass_ncoa_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the cass_ncoa.
- run_id : integer
The ID of the run.
Returns: - None
Response code 202: success
Revoke the permissions a group has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
delete_civis_data_match_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the civis_data_match.
- run_id : integer
The ID of the run.
Returns: - None
Response code 202: success
-
delete_data_unification_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the data_unification.
- run_id : integer
The ID of the run.
Returns: - None
Response code 202: success
-
delete_geocode_projects
(self, id, project_id)¶ Remove a Geocode Enhancement from a project
Parameters: - id : integer
The ID of the Geocode Enhancement.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
-
delete_geocode_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the geocode.
- run_id : integer
The ID of the run.
Returns: - None
Response code 202: success
Revoke the permissions a group has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
delete_table_deduplication_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the table_deduplication.
- run_id : integer
The ID of the run.
Returns: - None
Response code 202: success
-
get_cass_ncoa
(self, id)¶ Get a CASS/NCOA Enhancement
Parameters: - id : integer
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- destination : dict::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- archived : string
The archival status of the requested item(s).
-
get_cass_ncoa_runs
(self, id, run_id)¶ Check status of a run
Parameters: - id : integer
The ID of the cass_ncoa.
- run_id : integer
The ID of the run.
Returns: - id : integer
The ID of the run.
- cass_ncoa_id : integer
The ID of the cass_ncoa.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
get_civis_data_match
(self, id)¶ Get a Civis Data Match Enhancement
Parameters: - id : integer
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- match_target_id : integer
The ID of the Civis Data match target. See /match_targets for IDs.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
get_civis_data_match_runs
(self, id, run_id)¶ Check status of a run
Parameters: - id : integer
The ID of the civis_data_match.
- run_id : integer
The ID of the run.
Returns: - id : integer
The ID of the run.
- civis_data_match_id : integer
The ID of the civis_data_match.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
get_data_unification
(self, id)¶ Get a Data Unification Enhancement
Parameters: - id : integer
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- field_mapping1 : dict
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- table1 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- field_mapping2 : dict
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- table2 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
get_data_unification_runs
(self, id, run_id)¶ Check status of a run
Parameters: - id : integer
The ID of the data_unification.
- run_id : integer
The ID of the run.
Returns: - id : integer
The ID of the run.
- data_unification_id : integer
The ID of the data_unification.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
get_geocode
(self, id)¶ Get a Geocode Enhancement
Parameters: - id : integer
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- multipart_key : list
The source table primary key.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string
The output table schema.
- target_table : string
The output table name.
- country : string
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
- archived : string
The archival status of the requested item(s).
-
get_geocode_runs
(self, id, run_id)¶ Check status of a run
Parameters: - id : integer
The ID of the geocode.
- run_id : integer
The ID of the run.
Returns: - id : integer
The ID of the run.
- geocode_id : integer
The ID of the geocode.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
get_table_deduplication
(self, id)¶ Get a Table Deduplication Enhancement
Parameters: - id : integer
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
get_table_deduplication_runs
(self, id, run_id)¶ Check status of a run
Parameters: - id : integer
The ID of the table_deduplication.
- run_id : integer
The ID of the run.
Returns: - id : integer
The ID of the run.
- table_deduplication_id : integer
The ID of the table_deduplication.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list
(self, *, type='DEFAULT', author='DEFAULT', status='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List Enhancements
Parameters: - type : string, optional
If specified, return items of these types.
- author : string, optional
If specified, return items from this author. Must use user IDs. A comma separated list of IDs is also accepted to return items from multiple authors.
- status : string, optional
If specified, returns items with one of these statuses. It accepts a comma- separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.
- archived : string, optional
The archival status of the requested item(s).
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, name, created_at, last_run.updated_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- archived : string
The archival status of the requested item(s).
-
list_cass_ncoa_projects
(self, id, *, hidden='DEFAULT')¶ List the projects a CASS/NCOA Enhancement belongs to
Parameters: - id : integer
The ID of the CASS/NCOA Enhancement.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
Returns: - id : integer
The ID for this project.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- name : string
The name of this project.
- description : string
A description of the project.
- users : list::
Users who can see the project. - id : integer
The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- auto_share : boolean
- created_at : string/time
- updated_at : string/time
- archived : string
The archival status of the requested item(s).
-
list_cass_ncoa_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List runs for the given cass_ncoa
Parameters: - id : integer
The ID of the cass_ncoa.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the run.
- cass_ncoa_id : integer
The ID of the cass_ncoa.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list_cass_ncoa_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the cass_ncoa.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
-
list_cass_ncoa_runs_outputs
(self, id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the outputs for a run
Parameters: - id : integer
The ID of the job.
- run_id : integer
The ID of the run.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to created_at. Must be one of: created_at, id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - object_type : string
The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue
- object_id : integer
The ID of the output.
- name : string
The name of the output.
- link : string
The hypermedia link to the output.
- value : string
List users and groups permissioned on this object
Parameters: - id : integer
The ID of the resource that is shared.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
list_civis_data_match_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List runs for the given civis_data_match
Parameters: - id : integer
The ID of the civis_data_match.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the run.
- civis_data_match_id : integer
The ID of the civis_data_match.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list_civis_data_match_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the civis_data_match.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
-
list_civis_data_match_runs_outputs
(self, id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the outputs for a run
Parameters: - id : integer
The ID of the job.
- run_id : integer
The ID of the run.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to created_at. Must be one of: created_at, id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - object_type : string
The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue
- object_id : integer
The ID of the output.
- name : string
The name of the output.
- link : string
The hypermedia link to the output.
- value : string
-
list_data_unification_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List runs for the given data_unification
Parameters: - id : integer
The ID of the data_unification.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the run.
- data_unification_id : integer
The ID of the data_unification.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list_data_unification_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the data_unification.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
-
list_data_unification_runs_outputs
(self, id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the outputs for a run
Parameters: - id : integer
The ID of the job.
- run_id : integer
The ID of the run.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to created_at. Must be one of: created_at, id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - object_type : string
The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue
- object_id : integer
The ID of the output.
- name : string
The name of the output.
- link : string
The hypermedia link to the output.
- value : string
-
list_field_mapping
(self)¶ List the fields in a field mapping for Civis Data Match, Data Unification, and Table Deduplication jobs
Returns: - field : string
The name of the field.
- description : string
The description of the field.
-
list_geocode_projects
(self, id, *, hidden='DEFAULT')¶ List the projects a Geocode Enhancement belongs to
Parameters: - id : integer
The ID of the Geocode Enhancement.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
Returns: - id : integer
The ID for this project.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- name : string
The name of this project.
- description : string
A description of the project.
- users : list::
Users who can see the project. - id : integer
The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- auto_share : boolean
- created_at : string/time
- updated_at : string/time
- archived : string
The archival status of the requested item(s).
-
list_geocode_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List runs for the given geocode
Parameters: - id : integer
The ID of the geocode.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the run.
- geocode_id : integer
The ID of the geocode.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list_geocode_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the geocode.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
-
list_geocode_runs_outputs
(self, id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the outputs for a run
Parameters: - id : integer
The ID of the job.
- run_id : integer
The ID of the run.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to created_at. Must be one of: created_at, id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - object_type : string
The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue
- object_id : integer
The ID of the output.
- name : string
The name of the output.
- link : string
The hypermedia link to the output.
- value : string
List users and groups permissioned on this object
Parameters: - id : integer
The ID of the resource that is shared.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
list_table_deduplication_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List runs for the given table_deduplication
Parameters: - id : integer
The ID of the table_deduplication.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the run.
- table_deduplication_id : integer
The ID of the table_deduplication.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list_table_deduplication_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the table_deduplication.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
-
list_table_deduplication_runs_outputs
(self, id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List the outputs for a run
Parameters: - id : integer
The ID of the job.
- run_id : integer
The ID of the run.
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to created_at. Must be one of: created_at, id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - object_type : string
The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue
- object_id : integer
The ID of the output.
- name : string
The name of the output.
- link : string
The hypermedia link to the output.
- value : string
-
list_types
(self)¶ List available enhancement types
Returns: - name : string
The name of the type.
-
patch_cass_ncoa
(self, id, *, name='DEFAULT', schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', source='DEFAULT', destination='DEFAULT', column_mapping='DEFAULT', use_default_column_mapping='DEFAULT', perform_ncoa='DEFAULT', ncoa_credential_id='DEFAULT', output_level='DEFAULT', limiting_sql='DEFAULT')¶ Update some attributes of this CASS/NCOA Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string, optional
The name of the enhancement job.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- source : dict, optional::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- destination : dict, optional::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict, optional::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean, optional
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean, optional
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer, optional
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string, optional
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string, optional
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- destination : dict::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- archived : string
The archival status of the requested item(s).
-
patch_civis_data_match
(self, id, *, name='DEFAULT', schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', input_field_mapping='DEFAULT', input_table='DEFAULT', match_target_id='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Update some attributes of this Civis Data Match Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string, optional
The name of the enhancement job.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- input_field_mapping : dict, optional
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- match_target_id : integer, optional
The ID of the Civis Data match target. See /match_targets for IDs.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- match_target_id : integer
The ID of the Civis Data match target. See /match_targets for IDs.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
patch_data_unification
(self, id, *, name='DEFAULT', schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', field_mapping1='DEFAULT', table1='DEFAULT', field_mapping2='DEFAULT', table2='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Update some attributes of this Data Unification Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string, optional
The name of the enhancement job.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- field_mapping1 : dict, optional
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- table1 : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- field_mapping2 : dict, optional
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- table2 : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- field_mapping1 : dict
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- table1 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- field_mapping2 : dict
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- table2 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
patch_geocode
(self, id, *, name='DEFAULT', schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', remote_host_id='DEFAULT', credential_id='DEFAULT', source_schema_and_table='DEFAULT', multipart_key='DEFAULT', limiting_sql='DEFAULT', target_schema='DEFAULT', target_table='DEFAULT', country='DEFAULT', provider='DEFAULT', output_address='DEFAULT')¶ Update some attributes of this Geocode Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string, optional
The name of the enhancement job.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- remote_host_id : integer, optional
The ID of the remote host.
- credential_id : integer, optional
The ID of the remote host credential.
- source_schema_and_table : string, optional
The source database schema and table.
- multipart_key : list, optional
The source table primary key.
- limiting_sql : string, optional
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string, optional
The output table schema.
- target_table : string, optional
The output table name.
- country : string, optional
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string, optional
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean, optional
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- multipart_key : list
The source table primary key.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string
The output table schema.
- target_table : string
The output table name.
- country : string
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
- archived : string
The archival status of the requested item(s).
-
patch_table_deduplication
(self, id, *, name='DEFAULT', schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', input_field_mapping='DEFAULT', input_table='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Update some attributes of this Table Deduplication Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string, optional
The name of the enhancement job.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- input_field_mapping : dict, optional
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
post_cass_ncoa
(self, name, source, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', destination='DEFAULT', column_mapping='DEFAULT', use_default_column_mapping='DEFAULT', perform_ncoa='DEFAULT', ncoa_credential_id='DEFAULT', output_level='DEFAULT', limiting_sql='DEFAULT')¶ Create a CASS/NCOA Enhancement
Parameters: - name : string
The name of the enhancement job.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- destination : dict, optional::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict, optional::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean, optional
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean, optional
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer, optional
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string, optional
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string, optional
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- destination : dict::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- archived : string
The archival status of the requested item(s).
-
post_cass_ncoa_cancel
(self, id)¶ Cancel a run
Parameters: - id : integer
The ID of the job.
Returns: - id : integer
The ID of the run.
- state : string
The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
-
post_cass_ncoa_runs
(self, id)¶ Start a run
Parameters: - id : integer
The ID of the cass_ncoa.
Returns: - id : integer
The ID of the run.
- cass_ncoa_id : integer
The ID of the cass_ncoa.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
post_civis_data_match
(self, name, input_field_mapping, match_target_id, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', input_table='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Create a Civis Data Match Enhancement
Parameters: - name : string
The name of the enhancement job.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- match_target_id : integer
The ID of the Civis Data match target. See /match_targets for IDs.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- input_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- match_target_id : integer
The ID of the Civis Data match target. See /match_targets for IDs.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
post_civis_data_match_cancel
(self, id)¶ Cancel a run
Parameters: - id : integer
The ID of the job.
Returns: - id : integer
The ID of the run.
- state : string
The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
-
post_civis_data_match_runs
(self, id)¶ Start a run
Parameters: - id : integer
The ID of the civis_data_match.
Returns: - id : integer
The ID of the run.
- civis_data_match_id : integer
The ID of the civis_data_match.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
post_data_unification
(self, name, field_mapping1, field_mapping2, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', table1='DEFAULT', table2='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Create a Data Unification Enhancement
Parameters: - name : string
The name of the enhancement job.
- field_mapping1 : dict
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- field_mapping2 : dict
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- table1 : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- table2 : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- field_mapping1 : dict
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- table1 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- field_mapping2 : dict
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- table2 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
post_data_unification_cancel
(self, id)¶ Cancel a run
Parameters: - id : integer
The ID of the job.
Returns: - id : integer
The ID of the run.
- state : string
The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
-
post_data_unification_runs
(self, id)¶ Start a run
Parameters: - id : integer
The ID of the data_unification.
Returns: - id : integer
The ID of the run.
- data_unification_id : integer
The ID of the data_unification.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
post_geocode
(self, name, remote_host_id, credential_id, source_schema_and_table, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', multipart_key='DEFAULT', limiting_sql='DEFAULT', target_schema='DEFAULT', target_table='DEFAULT', country='DEFAULT', provider='DEFAULT', output_address='DEFAULT')¶ Create a Geocode Enhancement
Parameters: - name : string
The name of the enhancement job.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- multipart_key : list, optional
The source table primary key.
- limiting_sql : string, optional
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string, optional
The output table schema.
- target_table : string, optional
The output table name.
- country : string, optional
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string, optional
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean, optional
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- multipart_key : list
The source table primary key.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string
The output table schema.
- target_table : string
The output table name.
- country : string
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
- archived : string
The archival status of the requested item(s).
-
post_geocode_cancel
(self, id)¶ Cancel a run
Parameters: - id : integer
The ID of the job.
Returns: - id : integer
The ID of the run.
- state : string
The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
-
post_geocode_runs
(self, id)¶ Start a run
Parameters: - id : integer
The ID of the geocode.
Returns: - id : integer
The ID of the run.
- geocode_id : integer
The ID of the geocode.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
post_table_deduplication
(self, name, input_field_mapping, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', input_table='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Create a Table Deduplication Enhancement
Parameters: - name : string
The name of the enhancement job.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- input_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
post_table_deduplication_cancel
(self, id)¶ Cancel a run
Parameters: - id : integer
The ID of the job.
Returns: - id : integer
The ID of the run.
- state : string
The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
-
post_table_deduplication_runs
(self, id)¶ Start a run
Parameters: - id : integer
The ID of the table_deduplication.
Returns: - id : integer
The ID of the run.
- table_deduplication_id : integer
The ID of the table_deduplication.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
put_cass_ncoa
(self, id, name, source, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', destination='DEFAULT', column_mapping='DEFAULT', use_default_column_mapping='DEFAULT', perform_ncoa='DEFAULT', ncoa_credential_id='DEFAULT', output_level='DEFAULT', limiting_sql='DEFAULT')¶ Replace all attributes of this CASS/NCOA Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- destination : dict, optional::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict, optional::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean, optional
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean, optional
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer, optional
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string, optional
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string, optional
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- destination : dict::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- archived : string
The archival status of the requested item(s).
-
put_cass_ncoa_archive
(self, id, status)¶ Update the archive status of this object
Parameters: - id : integer
The ID of the object.
- status : boolean
The desired archived status of the object.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- source : dict::
- database_table : dict::
- schema : string
- The schema name of the source table.
- table : string
- The name of the source table.
- remote_host_id : integer
- The ID of the database host for the table.
- credential_id : integer
- The id of the credentials to be used when performing the enhancement.
- multipart_key : list
- The source table primary key.
- destination : dict::
- database_table : dict::
- schema : string
- The schema name for the output data.
- table : string
- The table name for the output data.
- column_mapping : dict::
- address1 : string
- The first address line.
- address2 : string
- The second address line.
- city : string
- The city of an address.
- state : string
- The state of an address.
- zip : string
- The zip code of an address.
- name : string
- The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name
- company : string
- The name of the company located at this address.
- use_default_column_mapping : boolean
Defaults to true, where the existing column mapping on the input table will be used. If false, a custom column mapping must be provided.
- perform_ncoa : boolean
Whether to update addresses for records matching the National Change of Address (NCOA) database.
- ncoa_credential_id : integer
Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.
- output_level : string
The set of fields persisted by a CASS or NCOA enhancement.For CASS enhancements, one of ‘cass’ or ‘all.’For NCOA enhancements, one of ‘cass’, ‘ncoa’ , ‘coalesced’ or ‘all’.By default, all fields will be returned.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- archived : string
The archival status of the requested item(s).
-
put_cass_ncoa_projects
(self, id, project_id)¶ Add a CASS/NCOA Enhancement to a project
Parameters: - id : integer
The ID of the CASS/NCOA Enhancement.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
Set the permissions groups has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_ids : list
An array of one or more group IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
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
Parameters: - id : integer
The ID of the resource that is shared.
- user_ids : list
An array of one or more user IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
put_civis_data_match
(self, id, name, input_field_mapping, match_target_id, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', input_table='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Replace all attributes of this Civis Data Match Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- match_target_id : integer
The ID of the Civis Data match target. See /match_targets for IDs.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- input_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- match_target_id : integer
The ID of the Civis Data match target. See /match_targets for IDs.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
put_data_unification
(self, id, name, field_mapping1, field_mapping2, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', table1='DEFAULT', table2='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Replace all attributes of this Data Unification Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- field_mapping1 : dict
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- field_mapping2 : dict
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- table1 : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- table2 : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- field_mapping1 : dict
The column mapping for Table 1. See /enhancements/field_mapping for list of valid fields.
- table1 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- field_mapping2 : dict
The column mapping for Table 2. See /enhancements/field_mapping for list of valid fields.
- table2 : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in Table 1 to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
put_geocode
(self, id, name, remote_host_id, credential_id, source_schema_and_table, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', multipart_key='DEFAULT', limiting_sql='DEFAULT', target_schema='DEFAULT', target_table='DEFAULT', country='DEFAULT', provider='DEFAULT', output_address='DEFAULT')¶ Replace all attributes of this Geocode Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- multipart_key : list, optional
The source table primary key.
- limiting_sql : string, optional
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string, optional
The output table schema.
- target_table : string, optional
The output table name.
- country : string, optional
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string, optional
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean, optional
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- multipart_key : list
The source table primary key.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string
The output table schema.
- target_table : string
The output table name.
- country : string
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
- archived : string
The archival status of the requested item(s).
-
put_geocode_archive
(self, id, status)¶ Update the archive status of this object
Parameters: - id : integer
The ID of the object.
- status : boolean
The desired archived status of the object.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- remote_host_id : integer
The ID of the remote host.
- credential_id : integer
The ID of the remote host credential.
- source_schema_and_table : string
The source database schema and table.
- multipart_key : list
The source table primary key.
- limiting_sql : string
The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).
- target_schema : string
The output table schema.
- target_table : string
The output table name.
- country : string
The country of the addresses to be geocoded; either ‘us’ or ‘ca’.
- provider : string
The geocoding provider; one of postgis, nominatim, and geocoder_ca.
- output_address : boolean
Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.
- archived : string
The archival status of the requested item(s).
-
put_geocode_projects
(self, id, project_id)¶ Add a Geocode Enhancement to a project
Parameters: - id : integer
The ID of the Geocode Enhancement.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
Set the permissions groups has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_ids : list
An array of one or more group IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
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
Parameters: - id : integer
The ID of the resource that is shared.
- user_ids : list
An array of one or more user IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
put_table_deduplication
(self, id, name, input_field_mapping, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', input_table='DEFAULT', output_table='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT')¶ Replace all attributes of this Table Deduplication Enhancement
Parameters: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer, optional
Parent ID that triggers this enhancement.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- input_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict, optional::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer, optional
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float, optional
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
Returns: - id : integer
The ID for the enhancement.
- name : string
The name of the enhancement job.
- type : string
The type of the enhancement (e.g CASS-NCOA)
- created_at : string/time
The time this enhancement was created.
- updated_at : string/time
The time the enhancement was last updated.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- state : string
The status of the enhancement’s last run
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- parent_id : integer
Parent ID that triggers this enhancement.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- input_field_mapping : dict
The column mapping for the input table. See /enhancements/field_mapping for list of valid fields.
- input_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- output_table : dict::
- database_name : string
- The Redshift database name for the table.
- schema : string
- The schema name for the table.
- table : string
- The table name.
- max_matches : integer
The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.
- threshold : number/float
The score threshold (between 0 and 1). Matches below this threshold will not be returned.
-
Exports¶
-
class
Exports
(session_kwargs, client, return_type='civis')¶ Methods
-
list
(self, *, type='DEFAULT', author='DEFAULT', status='DEFAULT', hidden='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List
Parameters: - type : string, optional
If specified, return exports of these types. It accepts a comma-separated list, possible values are ‘database’ and ‘gdoc’.
- author : string, optional
If specified, return exports from this author. It accepts a comma-separated list of author ids.
- status : string, optional
If specified, returns export with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- archived : string, optional
The archival status of the requested item(s).
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, name, created_at, last_run.updated_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID for this export.
- name : string
The name of this export.
- type : string
The type of export.
- created_at : string/time
The creation time for this export.
- updated_at : string/time
The last modification time for this export.
- state : string
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
-
Files¶
-
class
Files
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_projects
(self, id, project_id)¶ Remove a File from a project
Parameters: - id : integer
The ID of the File.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
Revoke the permissions a group has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
get
(self, id, *, link_expires_at='DEFAULT', inline='DEFAULT')¶ Get details about a file
Parameters: - id : integer
The ID of the file.
- link_expires_at : string, optional
The date and time the download link will expire. Must be a time between now and 36 hours from now. Defaults to 30 minutes from now.
- inline : boolean, optional
If true, will return a url that can be displayed inline in HTML
Returns: - id : integer
The ID of the file.
- name : string
The file name.
- created_at : string/date-time
The date and time the file was created.
- file_size : integer
The file size.
- expires_at : string/date-time
The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- download_url : string
A JSON string containing information about the URL of the file.
- file_url : string
The URL that may be used to download the file.
- detected_info : dict::
- include_header : boolean
A boolean value indicating whether or not the first row of the file is a header row.
- column_delimiter : string
The column delimiter for the file. One of “comma”, “tab”, or “pipe”.
- compression : string
The type of compression of the file. One of “gzip”, or “none”.
- table_columns : list::
An array of hashes corresponding to the columns in the file. Each hash should have keys for column “name” and “sql_type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
-
list_projects
(self, id, *, hidden='DEFAULT')¶ List the projects a File belongs to
Parameters: - id : integer
The ID of the File.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
Returns: - id : integer
The ID for this project.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- name : string
The name of this project.
- description : string
A description of the project.
- users : list::
Users who can see the project. - id : integer
The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- auto_share : boolean
- created_at : string/time
- updated_at : string/time
- archived : string
The archival status of the requested item(s).
List users and groups permissioned on this object
Parameters: - id : integer
The ID of the resource that is shared.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
post
(self, name, *, expires_at='DEFAULT')¶ Initiate an upload of a file into the platform
Parameters: - name : string
The file name.
- expires_at : string/date-time, optional
The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.
Returns: - id : integer
The ID of the file.
- name : string
The file name.
- created_at : string/date-time
The date and time the file was created.
- file_size : integer
The file size.
- expires_at : string/date-time
The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.
- upload_url : string
The URL that may be used to upload a file. To use the upload URL, initiate a POST request to the given URL with the file you wish to import as the “file” form field.
- upload_fields : dict
A hash containing the form fields to be included with the POST request.
-
post_multipart
(self, name, num_parts, *, expires_at='DEFAULT')¶ Initiate a multipart upload
Parameters: - name : string
The file name.
- num_parts : integer
The number of parts in which the file will be uploaded. This parameter determines the number of presigned URLs that are returned.
- expires_at : string/date-time, optional
The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.
Returns: - id : integer
The ID of the file.
- name : string
The file name.
- created_at : string/date-time
The date and time the file was created.
- file_size : integer
The file size.
- expires_at : string/date-time
The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.
- upload_urls : list
An array of URLs that may be used to upload file parts. Use separate PUT requests to complete the part uploads. Links expire after 12 hours.
-
post_multipart_complete
(self, id)¶ Complete a multipart upload
Parameters: - id : integer
The ID of the file.
Returns: - None
Response code 204: success
-
put_projects
(self, id, project_id)¶ Add a File to a project
Parameters: - id : integer
The ID of the File.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
Set the permissions groups has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_ids : list
An array of one or more group IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
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
Parameters: - id : integer
The ID of the resource that is shared.
- user_ids : list
An array of one or more user IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
Groups¶
-
class
Groups
(session_kwargs, client, return_type='civis')¶ Methods
-
list
(self, *, query='DEFAULT', permission='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List Groups
Parameters: - query : string, optional
If specified, it will filter the groups returned. Infix matching is supported (e.g., “query=group” will return “group” and “group of people” and “my group” and “my group of people”).
- permission : string, optional
A permissions string, one of “read”, “write”, or “manage”. Lists only groups for which the current user has that permission.
- limit : integer, optional
Number of results to return. Defaults to 50. Maximum allowed is 1000.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to name. Must be one of: name, created_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iterator : bool, 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: - id : integer
The ID of this group.
- name : string
This group’s name.
- created_at : string/time
The date and time when this group was created.
- slug : string
The slug for this group.
- organization_id : integer
The organization associated with this group.
-
Imports¶
-
class
Imports
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_files_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the import.
- run_id : integer
The ID of the run.
Returns: - None
Response code 202: success
-
delete_projects
(self, id, project_id)¶ Remove an Import from a project
Parameters: - id : integer
The ID of the Import.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
Revoke the permissions a group has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
get
(self, id)¶ Get details about an import
Parameters: - id : integer
The ID for the import.
Returns: - name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- source : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- destination : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- parent_id : integer
Parent id to trigger this import from
- id : integer
The ID for the import.
- is_outbound : boolean
- job_type : string
The job type of this import.
- syncs : list::
List of syncs. - id : integer - source : dict:
- id : integer The ID of the table or file, if available. - path : string The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop - database_table : dict:: - schema : string The database schema name. - table : string The database table name. - use_without_schema : boolean If true, the table has no schema. Defaults to false. - file : dict:: - id : integer The file id. - google_worksheet : dict:: - spreadsheet : string The spreadsheet document name. - worksheet : string The worksheet tab name. - salesforce : dict:: - object_name : string The Salesforce object name. - silverpop : dict:: - list_id : integer The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
- state : string
- created_at : string/date-time
- updated_at : string/date-time
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- next_run_at : string/time
The time of the next scheduled run.
- time_zone : string
The time zone of this import.
- hidden : boolean
The hidden status of the item.
- archived : string
The archival status of the requested item(s).
-
get_batches
(self, id)¶ Get details about a batch import
Parameters: - id : integer
The ID for the import.
Returns: - id : integer
The ID for the import.
- schema : string
The destination schema name. This schema must already exist in Redshift.
- table : string
The destination table name, without the schema prefix. This table must already exist in Redshift.
- remote_host_id : integer
The ID of the destination database host.
- state : string
The state of the run; one of “queued”, “running”, “succeeded”, “failed”, or “cancelled”.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error returned by the run, if any.
- hidden : boolean
The hidden status of the item.
-
get_files_csv
(self, id)¶ Get a CSV Import
Parameters: - id : integer
Returns: - id : integer
The ID for the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
- hidden : boolean
The hidden status of the item.
-
get_files_runs
(self, id, run_id)¶ Check status of a run
Parameters: - id : integer
The ID of the import.
- run_id : integer
The ID of the run.
Returns: - id : integer
The ID of the run.
- import_id : integer
The ID of the import.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list
(self, *, type='DEFAULT', author='DEFAULT', destination='DEFAULT', source='DEFAULT', status='DEFAULT', hidden='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List Imports
Parameters: - type : string, optional
If specified, return imports of these types. It accepts a comma-separated list, possible values are ‘AutoImport’, ‘DbSync’, ‘Salesforce’, ‘GdocImport’.
- author : string, optional
If specified, return imports from this author. It accepts a comma-separated list of author ids.
- destination : string, optional
If specified, returns imports with one of these destinations. It accepts a comma-separated list of remote host ids.
- source : string, optional
If specified, returns imports with one of these sources. It accepts a comma-separated list of remote host ids. ‘DbSync’ must be specified for ‘type’.
- status : string, optional
If specified, returns imports with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- archived : string, optional
The archival status of the requested item(s).
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, name, created_at, last_run.updated_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- source : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- destination : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- id : integer
The ID for the import.
- is_outbound : boolean
- job_type : string
The job type of this import.
- state : string
- created_at : string/date-time
- updated_at : string/date-time
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- time_zone : string
The time zone of this import.
- archived : string
The archival status of the requested item(s).
-
list_batches
(self, *, hidden='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List batch imports
Parameters: - hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at, created_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID for the import.
- schema : string
The destination schema name. This schema must already exist in Redshift.
- table : string
The destination table name, without the schema prefix. This table must already exist in Redshift.
- remote_host_id : integer
The ID of the destination database host.
- state : string
The state of the run; one of “queued”, “running”, “succeeded”, “failed”, or “cancelled”.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error returned by the run, if any.
-
list_files_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List runs for the given import
Parameters: - id : integer
The ID of the import.
- limit : integer, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to id. Must be one of: id.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
The ID of the run.
- import_id : integer
The ID of the import.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
list_files_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the import.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
-
list_projects
(self, id, *, hidden='DEFAULT')¶ List the projects an Import belongs to
Parameters: - id : integer
The ID of the Import.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
Returns: - id : integer
The ID for this project.
- author : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- name : string
The name of this project.
- description : string
A description of the project.
- users : list::
Users who can see the project. - id : integer
The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- auto_share : boolean
- created_at : string/time
- updated_at : string/time
- archived : string
The archival status of the requested item(s).
-
list_runs
(self, id)¶ Get the run history of this import
Parameters: - id : integer
Returns: - id : integer
- state : string
- created_at : string/time
The time that the run was queued.
- started_at : string/time
The time that the run started.
- finished_at : string/time
The time that the run completed.
- error : string
The error message for this run, if present.
-
list_runs_logs
(self, id, run_id, *, last_id='DEFAULT', limit='DEFAULT')¶ Get the logs for a run
Parameters: - id : integer
The ID of the import.
- run_id : integer
The ID of the run.
- last_id : integer, optional
The ID of the last log message received. Log entries with this ID value or lower will be omitted.Logs are sorted by ID if this value is provided, and are otherwise sorted by createdAt.
- limit : integer, optional
The maximum number of log messages to return. Default of 10000.
Returns: - id : integer
The ID of the log.
- created_at : string/date-time
The time the log was created.
- message : string
The log message.
- level : string
The level of the log. One of unknown,fatal,error,warn,info,debug.
List users and groups permissioned on this object
Parameters: - id : integer
The ID of the resource that is shared.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
patch_files_csv
(self, id, *, source='DEFAULT', destination='DEFAULT', first_row_is_header='DEFAULT', column_delimiter='DEFAULT', escaped='DEFAULT', compression='DEFAULT', existing_table_rows='DEFAULT', max_errors='DEFAULT', table_columns='DEFAULT', redshift_destination_options='DEFAULT')¶ Update some attributes of this CSV Import
Parameters: - id : integer
The ID for the import.
- source : dict, optional::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict, optional::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean, optional
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string, optional
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean, optional
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string, optional
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string, optional
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer, optional
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list, optional::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict, optional::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
Returns: - id : integer
The ID for the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
- hidden : boolean
The hidden status of the item.
-
post
(self, name, sync_type, is_outbound, *, source='DEFAULT', destination='DEFAULT', schedule='DEFAULT', notifications='DEFAULT', parent_id='DEFAULT', next_run_at='DEFAULT', time_zone='DEFAULT', hidden='DEFAULT')¶ Create a new import configuration
Parameters: - name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- is_outbound : boolean
- source : dict, optional::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- destination : dict, optional::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- parent_id : integer, optional
Parent id to trigger this import from
- next_run_at : string/time, optional
The time of the next scheduled run.
- time_zone : string, optional
The time zone of this import.
- hidden : boolean, optional
The hidden status of the item.
Returns: - name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- source : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- destination : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- parent_id : integer
Parent id to trigger this import from
- id : integer
The ID for the import.
- is_outbound : boolean
- job_type : string
The job type of this import.
- syncs : list::
List of syncs. - id : integer - source : dict:
- id : integer The ID of the table or file, if available. - path : string The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop - database_table : dict:: - schema : string The database schema name. - table : string The database table name. - use_without_schema : boolean If true, the table has no schema. Defaults to false. - file : dict:: - id : integer The file id. - google_worksheet : dict:: - spreadsheet : string The spreadsheet document name. - worksheet : string The worksheet tab name. - salesforce : dict:: - object_name : string The Salesforce object name. - silverpop : dict:: - list_id : integer The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
- state : string
- created_at : string/date-time
- updated_at : string/date-time
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- next_run_at : string/time
The time of the next scheduled run.
- time_zone : string
The time zone of this import.
- hidden : boolean
The hidden status of the item.
- archived : string
The archival status of the requested item(s).
-
post_batches
(self, file_ids, schema, table, remote_host_id, credential_id, *, column_delimiter='DEFAULT', first_row_is_header='DEFAULT', compression='DEFAULT', hidden='DEFAULT')¶ Upload multiple files to Civis
Parameters: - file_ids : list
The file IDs for the import.
- schema : string
The destination schema name. This schema must already exist in Redshift.
- table : string
The destination table name, without the schema prefix. This table must already exist in Redshift.
- remote_host_id : integer
The ID of the destination database host.
- credential_id : integer
The ID of the credentials to be used when performing the database import.
- column_delimiter : string, optional
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. If unspecified, defaults to “comma”.
- first_row_is_header : boolean, optional
A boolean value indicating whether or not the first row is a header row. If unspecified, defaults to false.
- compression : string, optional
The type of compression. Valid arguments are “gzip”, “zip”, and “none”. If unspecified, defaults to “gzip”.
- hidden : boolean, optional
The hidden status of the item.
Returns: - id : integer
The ID for the import.
- schema : string
The destination schema name. This schema must already exist in Redshift.
- table : string
The destination table name, without the schema prefix. This table must already exist in Redshift.
- remote_host_id : integer
The ID of the destination database host.
- state : string
The state of the run; one of “queued”, “running”, “succeeded”, “failed”, or “cancelled”.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error returned by the run, if any.
- hidden : boolean
The hidden status of the item.
-
post_cancel
(self, id)¶ Cancel a run
Parameters: - id : integer
The ID of the job.
Returns: - id : integer
The ID of the run.
- state : string
The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
-
post_files
(self, schema, name, remote_host_id, credential_id, *, max_errors='DEFAULT', existing_table_rows='DEFAULT', diststyle='DEFAULT', distkey='DEFAULT', sortkey1='DEFAULT', sortkey2='DEFAULT', column_delimiter='DEFAULT', first_row_is_header='DEFAULT', multipart='DEFAULT', escaped='DEFAULT', hidden='DEFAULT')¶ Initate an import of a tabular file into the platform
Parameters: - schema : string
The schema of the destination table.
- name : string
The name of the destination table.
- remote_host_id : integer
The id of the destination database host.
- credential_id : integer
The id of the credentials to be used when performing the database import.
- max_errors : integer, optional
The maximum number of rows with errors to remove from the import before failing.
- existing_table_rows : string, optional
The behaviour if a table with the requested name already exists. One of “fail”, “truncate”, “append”, or “drop”.Defaults to “fail”.
- diststyle : string, optional
The diststyle to use for the table. One of “even”, “all”, or “key”.
- distkey : string, optional
The column to use as the distkey for the table.
- sortkey1 : string, optional
The column to use as the sort key for the table.
- sortkey2 : string, optional
The second column in a compound sortkey for the table.
- column_delimiter : string, optional
The column delimiter of the file. If column_delimiter is null or omitted, it will be auto-detected. Valid arguments are “comma”, “tab”, and “pipe”.
- first_row_is_header : boolean, optional
A boolean value indicating whether or not the first row is a header row. If first_row_is_header is null or omitted, it will be auto-detected.
- multipart : boolean, optional
If true, the upload URI will require a multipart/form-data POST request. Defaults to false.
- escaped : boolean, optional
If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- hidden : boolean, optional
The hidden status of the item.
Returns: - id : integer
The id of the import.
- upload_uri : string
The URI which may be used to upload a tabular file for import. You must use this URI to upload the file you wish imported and then inform the Civis API when your upload is complete using the URI given by the runUri field of this response.
- run_uri : string
The URI to POST to once the file upload is complete. After uploading the file using the URI given in the uploadUri attribute of the response, POST to this URI to initiate the import of your uploaded file into the platform.
- upload_fields : dict
If multipart was set to true, these fields should be included in the multipart upload.
-
post_files_csv
(self, source, destination, first_row_is_header, *, column_delimiter='DEFAULT', escaped='DEFAULT', compression='DEFAULT', existing_table_rows='DEFAULT', max_errors='DEFAULT', table_columns='DEFAULT', redshift_destination_options='DEFAULT', hidden='DEFAULT')¶ Create a CSV Import
Parameters: - source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string, optional
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean, optional
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string, optional
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string, optional
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer, optional
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list, optional::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict, optional::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
- hidden : boolean, optional
The hidden status of the item.
Returns: - id : integer
The ID for the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
- hidden : boolean
The hidden status of the item.
-
post_files_runs
(self, id)¶ Start a run
Parameters: - id : integer
The ID of the import.
Returns: - id : integer
The ID of the run.
- import_id : integer
The ID of the import.
- state : string
The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- is_cancel_requested : boolean
True if run cancel requested, else false.
- started_at : string/time
The time the last run started at.
- finished_at : string/time
The time the last run completed.
- error : string
The error, if any, returned by the run.
-
post_runs
(self, id)¶ Run an import
Parameters: - id : integer
The ID of the import to run.
Returns: - run_id : integer
The ID of the new run triggered.
-
post_syncs
(self, id, source, destination, *, advanced_options='DEFAULT')¶ Create a sync
Parameters: - id : integer
- source : dict::
- path : string
- The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- file : dict
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- salesforce : dict::
- object_name : string
- The Salesforce object name.
- silverpop : dict::
- list_id : integer
- The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict, optional::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
Returns: - id : integer
- source : dict::
- id : integer
- The ID of the table or file, if available.
- path : string
- The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- file : dict::
- id : integer
- The file id.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- salesforce : dict::
- object_name : string
- The Salesforce object name.
- silverpop : dict::
- list_id : integer
- The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
-
put
(self, id, name, sync_type, is_outbound, *, source='DEFAULT', destination='DEFAULT', schedule='DEFAULT', notifications='DEFAULT', parent_id='DEFAULT', next_run_at='DEFAULT', time_zone='DEFAULT')¶ Update an import
Parameters: - id : integer
The ID for the import.
- name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- is_outbound : boolean
- source : dict, optional::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- destination : dict, optional::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- schedule : dict, optional::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- notifications : dict, optional::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- parent_id : integer, optional
Parent id to trigger this import from
- next_run_at : string/time, optional
The time of the next scheduled run.
- time_zone : string, optional
The time zone of this import.
Returns: - name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- source : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- destination : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- parent_id : integer
Parent id to trigger this import from
- id : integer
The ID for the import.
- is_outbound : boolean
- job_type : string
The job type of this import.
- syncs : list::
List of syncs. - id : integer - source : dict:
- id : integer The ID of the table or file, if available. - path : string The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop - database_table : dict:: - schema : string The database schema name. - table : string The database table name. - use_without_schema : boolean If true, the table has no schema. Defaults to false. - file : dict:: - id : integer The file id. - google_worksheet : dict:: - spreadsheet : string The spreadsheet document name. - worksheet : string The worksheet tab name. - salesforce : dict:: - object_name : string The Salesforce object name. - silverpop : dict:: - list_id : integer The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
- state : string
- created_at : string/date-time
- updated_at : string/date-time
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- next_run_at : string/time
The time of the next scheduled run.
- time_zone : string
The time zone of this import.
- hidden : boolean
The hidden status of the item.
- archived : string
The archival status of the requested item(s).
-
put_archive
(self, id, status)¶ Update the archive status of this object
Parameters: - id : integer
The ID of the object.
- status : boolean
The desired archived status of the object.
Returns: - name : string
The name of the import.
- sync_type : string
The type of sync to perform; one of Dbsync, AutoImport, SilverpopDataImport, SilverpopContactImport, GdocImport, GdocExport, and Salesforce.
- source : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- destination : dict::
- remote_host_id : integer
- credential_id : integer
- additional_credentials : list
- Array that holds additional credentials used for specific imports. For salesforce imports, the first and only element is the client credential id.
- name : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
- notifications : dict::
- urls : list
- URLs to receive a POST request at job completion
- success_email_subject : string
- Custom subject line for success e-mail.
- success_email_body : string
- Custom body text for success e-mail, written in Markdown.
- success_email_addresses : list
- Addresses to notify by e-mail when the job completes successfully.
- success_email_from_name : string
- Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_to : string
- Address for replies to success emails; defaults to the author of the job.
- failure_email_addresses : list
- Addresses to notify by e-mail when the job fails.
- stall_warning_minutes : integer
- Stall warning emails will be sent after this amount of minutes.
- success_on : boolean
- If success email notifications are on.
- failure_on : boolean
- If failure email notifications are on.
- parent_id : integer
Parent id to trigger this import from
- id : integer
The ID for the import.
- is_outbound : boolean
- job_type : string
The job type of this import.
- syncs : list::
List of syncs. - id : integer - source : dict:
- id : integer The ID of the table or file, if available. - path : string The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop - database_table : dict:: - schema : string The database schema name. - table : string The database table name. - use_without_schema : boolean If true, the table has no schema. Defaults to false. - file : dict:: - id : integer The file id. - google_worksheet : dict:: - spreadsheet : string The spreadsheet document name. - worksheet : string The worksheet tab name. - salesforce : dict:: - object_name : string The Salesforce object name. - silverpop : dict:: - list_id : integer The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
- state : string
- created_at : string/date-time
- updated_at : string/date-time
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- user : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- running_as : dict::
- id : integer
- The ID of this user.
- name : string
- This user’s name.
- username : string
- This user’s username.
- initials : string
- This user’s initials.
- online : boolean
- Whether this user is online.
- next_run_at : string/time
The time of the next scheduled run.
- time_zone : string
The time zone of this import.
- hidden : boolean
The hidden status of the item.
- archived : string
The archival status of the requested item(s).
-
put_files_csv
(self, id, source, destination, first_row_is_header, *, column_delimiter='DEFAULT', escaped='DEFAULT', compression='DEFAULT', existing_table_rows='DEFAULT', max_errors='DEFAULT', table_columns='DEFAULT', redshift_destination_options='DEFAULT')¶ Replace all attributes of this CSV Import
Parameters: - id : integer
The ID for the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string, optional
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean, optional
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string, optional
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string, optional
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer, optional
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list, optional::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict, optional::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
Returns: - id : integer
The ID for the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
- hidden : boolean
The hidden status of the item.
-
put_files_csv_archive
(self, id, status)¶ Update the archive status of this object
Parameters: - id : integer
The ID of the object.
- status : boolean
The desired archived status of the object.
Returns: - id : integer
The ID for the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_paths : dict::
- storage_host_id : integer
- The ID of the source storage host.
- credential_id : integer
- The ID of the credentials for the source storage host.
- file_paths : list
- The file or directory path(s) to import. If specifying a directory path, the job will import every file found under that path. All files must have the same column layout and file format (e.g., compression, columnDelimiter, etc.).
- destination : dict::
- schema : string
- The destination schema name.
- table : string
- The destination table name.
- remote_host_id : integer
- The ID of the destination database host.
- credential_id : integer
- The ID of the credentials for the destination database.
- primary_keys : list
- A list of the primary key column(s) of the destination table.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- last_modified_keys : list
- A list of the columns indicating a record has been updated.If the destination table does not exist, and the import mode is “upsert”, this field is required.
- first_row_is_header : boolean
A boolean value indicating whether or not the first row of the source file is a header row.
- column_delimiter : string
The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.
- escaped : boolean
A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.
- compression : string
The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.
- existing_table_rows : string
The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.
- max_errors : integer
The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.
- table_columns : list::
An array of hashes corresponding to the columns in the source file. Each hash should have keys for column “name” and “type” - name : string
The column name.
- sql_type : string
- The SQL type of the column.
- redshift_destination_options : dict::
- distkey : string
- Distkey for this table in Redshift
- sortkeys : list
- Sortkeys for this table in Redshift. Please provide a maximum of two.
- hidden : boolean
The hidden status of the item.
-
put_projects
(self, id, project_id)¶ Add an Import to a project
Parameters: - id : integer
The ID of the Import.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
Set the permissions groups has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_ids : list
An array of one or more group IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
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
Parameters: - id : integer
The ID of the resource that is shared.
- user_ids : list
An array of one or more user IDs.
- permission_level : string
Options are: “read”, “write”, or “manage”.
- share_email_body : string, optional
Custom body text for e-mail sent on a share.
- send_shared_email : boolean, optional
Send email to the recipients of a share.
Returns: - readers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- writers : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- owners : dict::
- users : list::
- id : integer
- name : string
- groups : list::
- id : integer
- name : string
- total_user_shares : integer
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_shares : integer
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
-
put_syncs
(self, id, sync_id, source, destination, *, advanced_options='DEFAULT')¶ Update a sync
Parameters: - id : integer
The ID of the import to fetch.
- sync_id : integer
The ID of the sync to fetch.
- source : dict::
- path : string
- The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- file : dict
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- salesforce : dict::
- object_name : string
- The Salesforce object name.
- silverpop : dict::
- list_id : integer
- The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict, optional::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
Returns: - id : integer
- source : dict::
- id : integer
- The ID of the table or file, if available.
- path : string
- The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- file : dict::
- id : integer
- The file id.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- salesforce : dict::
- object_name : string
- The Salesforce object name.
- silverpop : dict::
- list_id : integer
- The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
-
put_syncs_archive
(self, id, sync_id, *, status='DEFAULT')¶ Update the archive status of this sync
Parameters: - id : integer
The ID of the import to fetch.
- sync_id : integer
The ID of the sync to fetch.
- status : boolean, optional
The desired archived status of the sync.
Returns: - id : integer
- source : dict::
- id : integer
- The ID of the table or file, if available.
- path : string
- The path of the dataset to sync from; for a database source, schema.tablename. If you are doing a Google Sheet export, this can be blank. This is a legacy parameter, it is recommended you use one of the following: databaseTable, file, googleWorksheet, salesforce, silverpop
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- file : dict::
- id : integer
- The file id.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- salesforce : dict::
- object_name : string
- The Salesforce object name.
- silverpop : dict::
- list_id : integer
- The Silverpop list id.
- destination : dict::
- path : string
- The schema.tablename to sync to. If you are doing a Google Sheet export, this is the spreadsheet and sheet name separated by a period. i.e. if you have a spreadsheet named “MySpreadsheet” and a sheet called “Sheet1” this field would be “MySpreadsheet.Sheet1”. This is a legacy parameter, it is recommended you use one of the following: databaseTable, googleWorksheet
- database_table : dict::
- schema : string
- The database schema name.
- table : string
- The database table name.
- use_without_schema : boolean
- If true, the table has no schema. Defaults to false.
- google_worksheet : dict::
- spreadsheet : string
- The spreadsheet document name.
- worksheet : string
- The worksheet tab name.
- advanced_options : dict::
- max_errors : integer
- existing_table_rows : string
- diststyle : string
- distkey : string
- sortkey1 : string
- sortkey2 : string
- column_delimiter : string
- column_overrides : dict
- Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.
- escaped : boolean
- If true, escape quotes with a backslash; otherwise, escape quotes by double-quoting. Defaults to false.
- identity_column : string
- row_chunk_size : integer
- wipe_destination_table : boolean
- truncate_long_lines : boolean
- invalid_char_replacement : string
- verify_table_row_counts : boolean
- partition_column_name : string
- partition_schema_name : string
- partition_table_name : string
- partition_table_partition_column_min_name : string
- partition_table_partition_column_max_name : string
- last_modified_column : string
- mysql_catalog_matches_schema : boolean
- chunking_method : string
- The method used to break the data into smaller chunks for transfer. The value can be set to sorted_by_identity_columns or if not set the chunking method will be choosen automatically.
- first_row_is_header : boolean
- export_action : string
- The kind of export action you want to have the export execute. Set to “newsprsht” if you want a new worksheet inside a new spreadsheet. Set to “newwksht” if you want a new worksheet inside an existing spreadsheet. Set to “updatewksht” if you want to overwrite an existing worksheet inside an existing spreadsheet. Set to “appendwksht” if you want to append to the end of an existing worksheet inside an existing spreadsheet.
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
-
Jobs¶
-
class
Jobs
(session_kwargs, client, return_type='civis')¶ Methods
-
delete_projects
(self, id, project_id)¶ Remove a Job from a project
Parameters: - id : integer
The ID of the Job.
- project_id : integer
The ID of the project.
Returns: - None
Response code 204: success
-
delete_runs
(self, id, run_id)¶ Cancel a run
Parameters: - id : integer
The ID of the Job.
- run_id : integer
The ID of the Run.
Returns: - None
Response code 202: success
Revoke the permissions a group has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- group_id : integer
The ID of the group.
Returns: - None
Response code 204: success
Revoke the permissions a user has on this object
Parameters: - id : integer
The ID of the resource that is shared.
- user_id : integer
The ID of the user.
Returns: - None
Response code 204: success
-
get
(self, id)¶ Show basic job info
Parameters: - id : integer
The ID for this job.
Returns: - id : integer
- name : string
- type : string
- from_template_id : integer
- state : string
Whether the job is idle, queued, running, cancelled, or failed.
- created_at : string/date-time
- updated_at : string/date-time
- runs : list::
Information about the most recent runs of the job. - id : integer - state : string - created_at : string/time
The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- hidden : boolean
The hidden status of the item.
- archived : string
The archival status of the requested item(s).
- success_email_subject : string
- success_email_body : string
- running_as_user : string
- run_by_user : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
-
get_runs
(self, id, run_id)¶ Check status of a job
Parameters: - id : integer
The ID of the Job.
- run_id : integer
The ID of the Run.
Returns: - id : integer
- state : string
- created_at : string/time
The time that the run was queued.
- started_at : string/time
The time that the run started.
- finished_at : string/time
The time that the run completed.
- error : string
The error message for this run, if present.
-
list
(self, *, state='DEFAULT', type='DEFAULT', q='DEFAULT', permission='DEFAULT', scheduled='DEFAULT', hidden='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ List Jobs
Parameters: - state : string, optional
The job’s state. One or more of queued, running, succeeded, failed, and cancelled. Specify multiple values as a comma-separated list (e.g., “A,B”).
- type : string, optional
The job’s type. Specify multiple values as a comma-separated list (e.g., “A,B”).
- q : string, optional
Query string to search on the id, name, and job type.
- permission : string, optional
A permissions string, one of “read”, “write”, or “manage”. Lists only jobs for which the current user has that permission.
- scheduled : boolean, optional
If the item is scheduled.
- hidden : boolean, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- archived : string, optional
The archival status of the requested item(s).
- limit : integer, optional
Number of results to return. Defaults to its maximum of 50.
- page_num : integer, optional
Page number of the results to return. Defaults to the first page, 1.
- order : string, optional
The field on which to order the result set. Defaults to updated_at. Must be one of: updated_at.
- order_dir : string, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iterator : bool, 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: - id : integer
- name : string
- type : string
- from_template_id : integer
- state : string
Whether the job is idle, queued, running, cancelled, or failed.
- created_at : string/date-time
- updated_at : string/date-time
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- archived : string
The archival status of the requested item(s).
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
-
list_children
(self, id)¶ Show nested tree of children that this job triggers
Parameters: - id : integer
The ID for this job.
Returns: - id : integer
- name : string
- type : string
- from_template_id : integer
- state : string
- created_at : string/date-time
- updated_at : string/date-time
- runs : list::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- children : list
-
list_parents
(self, id)¶ Show chain of parents as a list that this job triggers from
Parameters: - id : integer
The ID for this job.
Returns: - id : integer
- name : string
- type : string
- from_template_id : integer
- state : string
Whether the job is idle, queued, running, cancelled, or failed.
- created_at : string/date-time
- updated_at : string/date-time
- runs : list::
Information about the most recent runs of the job. - id : integer - state : string - created_at : string/time
The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- last_run : dict::
- id : integer
- state : string
- created_at : string/time
- The time that the run was queued.
- started_at : string/time
- The time that the run started.
- finished_at : string/time
- The time that the run completed.
- error : string
- The error message for this run, if present.
- hidden : boolean
The hidden status of the item.
- archived : string
The archival status of the requested item(s).
- success_email_subject : string
- success_email_body : string
- running_as_user : string
- run_by_user : string
- schedule : dict::
- scheduled : boolean
- If the item is scheduled.
- scheduled_days : list
- Day based on numeric value starting at 0 for Sunday.
- scheduled_hours : list
- Hours of the day it is scheduled on.
- scheduled_minutes : list
- Minutes of the day it is scheduled on.
- scheduled_runs_per_hour : integer
- Alternative to scheduled minutes, number of times to run per hour.
-