API Resources¶
Announcements¶
-
class
Announcements
(session_kwargs, client, return_type='civis')¶ Methods
list
(self, \*[, limit, page_num, order, …])List announcements -
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, …)Remove an App Instance from a project delete_instances_shares_groups
(self, slug, …)Revoke the permissions a group has on this object delete_instances_shares_users
(self, slug, …)Revoke the permissions a user has on this object delete_releases_shares_groups
(self, slug, …)Revoke the permissions a group has on this object delete_releases_shares_users
(self, slug, id, …)Revoke the permissions a user has on this object get
(self, slug)List details of a Decision Application get_instances
(self, id, slug)Return a given app instance get_releases
(self, id, slug)Return a given app release list
(self)List apps list_instances
(self, slug, \*[, archived, …])List the instances of a Decision Application list_instances_projects
(self, id, slug, \*)List the projects an App Instance belongs to list_instances_shares
(self, slug, id)List users and groups permissioned on this object list_releases
(self, slug, \*[, archived, …])List the releases of a particular Decision Application list_releases_shares
(self, slug, id)List users and groups permissioned on this object patch_instances
(self, id, slug, \*[, name])Update a given app instance patch_releases
(self, slug, id, \*[, …])Update an existing Decision Application release post_instances
(self, slug, \*[, name])Create a new instance of an application of the given slug post_releases
(self, slug, …)Create a new Decision Application release put_features
(self, slug, org, features)Update the Decision Application features for a given organization put_instances_archive
(self, id, slug, status)Update the archive status of this object put_instances_projects
(self, id, project_id, …)Add an App Instance to a project put_instances_shares_groups
(self, slug, id, …)Set the permissions groups has on this object put_instances_shares_users
(self, slug, id, …)Set the permissions users have on this object put_releases_archive
(self, id, slug, status)Update the archive status of this object put_releases_shares_groups
(self, slug, id, …)Set the permissions groups has on this object put_releases_shares_users
(self, slug, id, …)Set the permissions users have on this object -
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
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).
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.
-
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).
-
patch_releases
(self, slug, id, *, report_template_id='DEFAULT', resources='DEFAULT')¶ Update an existing Decision Application release
Parameters: - slug : string
The slug for the application.
- id : integer
The unique id of the release.
- report_template_id : integer, optional
ID of the report template for this release.
- resources : dict, optional
A hash of resources associated with this release.
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).
-
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).
-
post_releases
(self, slug, report_template_id, resources)¶ Create a new Decision Application release
Parameters: - slug : string
The slug for the application.
- report_template_id : integer
ID of the report template for this release.
- resources : dict
A hash of resources associated with this release.
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).
-
put_features
(self, slug, org, features)¶ Update the Decision Application features for a given organization
Parameters: - slug : string
The slug for the application.
- org : string
Organization.
- features : dict
App features.
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.
-
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.
-
put_releases_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 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).
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, …)Delete a Cluster Partition get_kubernetes
(self, id)Describe a Kubernetes Cluster get_kubernetes_instance_configs
(self, …)Describe an Instance Config get_kubernetes_partitions
(self, id, …)Describe a Cluster Partition list_kubernetes
(self, \*[, …])List Kubernetes Clusters list_kubernetes_deployment_stats
(self, id)Get stats about deployments associated with a Kubernetes Cluster list_kubernetes_deployments
(self, id, \*[, …])List the deployments associated with a Kubernetes Cluster list_kubernetes_partitions
(self, id)List Cluster Partitions for given cluster patch_kubernetes
(self, id, \*[, is_nat_enabled])Update a Kubernetes Cluster patch_kubernetes_partitions
(self, id, …[, …])Update a Cluster Partition post_kubernetes
(self, \*[, organization_id, …])Create a Kubernetes Cluster post_kubernetes_partitions
(self, id, …)Create a Cluster Partition for given cluster -
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_instance_configs
(self, instance_config_id)¶ Describe an Instance Config
Parameters: - instance_config_id : integer
The ID of this instance config.
Returns: - 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.
-
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.
-
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.
-
patch_kubernetes
(self, id, *, is_nat_enabled='DEFAULT')¶ Update a Kubernetes Cluster
Parameters: - id : integer
The ID of this cluster.
- is_nat_enabled : boolean, optional
Whether this cluster needs a NAT gateway or not.
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.
-
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
(self, *, organization_id='DEFAULT', organization_slug='DEFAULT', is_nat_enabled='DEFAULT')¶ Create a Kubernetes Cluster
Parameters: - organization_id : string, optional
The id of this cluster’s organization.
- organization_slug : string, optional
The slug of this cluster’s organization.
- is_nat_enabled : boolean, optional
Whether this cluster needs a NAT gateway or not.
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.
-
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.
-
Credentials¶
-
class
Credentials
(session_kwargs, client, return_type='civis')¶ Methods
delete_shares_groups
(self, id, group_id)Revoke the permissions a group has on this object delete_shares_users
(self, id, user_id)Revoke the permissions a user has on this object get
(self, id)Get a credential list
(self, \*[, type, remote_host_id, …])List credentials list_shares
(self, id)List users and groups permissioned on this object post
(self, type, username, password, \*[, …])Create a credential post_authenticate
(self, url, …)Authenticate against a remote host post_temporary
(self, id, \*[, duration])Generate a temporary credential for accessing S3 put
(self, id, type, username, password, \*)Update an existing credential put_shares_groups
(self, id, group_ids, …)Set the permissions groups has on this object put_shares_users
(self, id, user_ids, …[, …])Set the permissions users have on this object 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, 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 get
(self, id)Show database information get_whitelist_ips
(self, id, whitelisted_ip_id)View details about a whitelisted IP list
(self)List databases list_advanced_settings
(self, id)Get the advanced settings for this database list_schemas
(self, id)List schemas in this database list_whitelist_ips
(self, id)List whitelisted IPs for the specified database patch_advanced_settings
(self, id, \*[, …])Update the advanced settings for this database post_schemas_scan
(self, id, schema, \*[, …])Creates and enqueues a schema scanner job post_whitelist_ips
(self, id, subnet_mask)Whitelist an IP address put_advanced_settings
(self, id, …)Edit the advanced settings for this database -
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_advanced_settings
(self, id)¶ Get the advanced settings for this database
Parameters: - id : integer
The ID of the database this advanced settings object belongs to.
Returns: - export_caching_enabled : boolean
Whether or not caching is enabled for export jobs run on this database server.
-
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.
-
patch_advanced_settings
(self, id, *, export_caching_enabled='DEFAULT')¶ Update the advanced settings for this database
Parameters: - id : integer
The ID of the database this advanced settings object belongs to.
- export_caching_enabled : boolean, optional
Whether or not caching is enabled for export jobs run on this database server.
Returns: - export_caching_enabled : boolean
Whether or not caching is enabled for export jobs run on this database server.
-
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.
-
put_advanced_settings
(self, id, export_caching_enabled)¶ Edit the advanced settings for this database
Parameters: - id : integer
The ID of the database this advanced settings object belongs to.
- export_caching_enabled : boolean
Whether or not caching is enabled for export jobs run on this database server.
Returns: - export_caching_enabled : boolean
Whether or not caching is enabled for export jobs run on this database server.
-
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 delete_cass_ncoa_runs
(self, id, run_id)Cancel a run delete_cass_ncoa_shares_groups
(self, id, …)Revoke the permissions a group has on this object delete_cass_ncoa_shares_users
(self, id, user_id)Revoke the permissions a user has on this object delete_civis_data_match_projects
(self, id, …)Remove a Civis Data Match Enhancement from a project delete_civis_data_match_runs
(self, id, run_id)Cancel a run delete_civis_data_match_shares_groups
(self, …)Revoke the permissions a group has on this object delete_civis_data_match_shares_users
(self, …)Revoke the permissions a user has on this object delete_data_unification_runs
(self, id, run_id)Deprecation warning! delete_geocode_projects
(self, id, project_id)Remove a Geocode Enhancement from a project delete_geocode_runs
(self, id, run_id)Cancel a run delete_geocode_shares_groups
(self, id, group_id)Revoke the permissions a group has on this object delete_geocode_shares_users
(self, id, user_id)Revoke the permissions a user has on this object delete_table_deduplication_runs
(self, id, run_id)Deprecation warning! get_cass_ncoa
(self, id)Get a CASS/NCOA Enhancement get_cass_ncoa_runs
(self, id, run_id)Check status of a run get_civis_data_match
(self, id)Get a Civis Data Match Enhancement get_civis_data_match_runs
(self, id, run_id)Check status of a run get_data_unification
(self, id)Deprecation warning! get_data_unification_runs
(self, id, run_id)Deprecation warning! get_geocode
(self, id)Get a Geocode Enhancement get_geocode_runs
(self, id, run_id)Check status of a run get_table_deduplication
(self, id)Deprecation warning! get_table_deduplication_runs
(self, id, run_id)Deprecation warning! list
(self, \*[, type, author, status, …])List Enhancements list_cass_ncoa_projects
(self, id, \*[, hidden])List the projects a CASS/NCOA Enhancement belongs to list_cass_ncoa_runs
(self, id, \*[, limit, …])List runs for the given cass_ncoa list_cass_ncoa_runs_logs
(self, id, run_id, \*)Get the logs for a run list_cass_ncoa_runs_outputs
(self, id, run_id, \*)List the outputs for a run list_cass_ncoa_shares
(self, id)List users and groups permissioned on this object list_civis_data_match_projects
(self, id, \*)List the projects a Civis Data Match Enhancement belongs to list_civis_data_match_runs
(self, id, \*[, …])List runs for the given civis_data_match list_civis_data_match_runs_logs
(self, id, …)Get the logs for a run list_civis_data_match_runs_outputs
(self, id, …)List the outputs for a run list_civis_data_match_shares
(self, id)List users and groups permissioned on this object list_data_unification_runs
(self, id, \*[, …])Deprecation warning! list_data_unification_runs_logs
(self, id, …)Deprecation warning! list_data_unification_runs_outputs
(self, id, …)Deprecation warning! list_field_mapping
(self)List the fields in a field mapping for Civis Data Match, Data Unification, and Table Deduplication jobs list_geocode_projects
(self, id, \*[, hidden])List the projects a Geocode Enhancement belongs to list_geocode_runs
(self, id, \*[, limit, …])List runs for the given geocode list_geocode_runs_logs
(self, id, run_id, \*)Get the logs for a run list_geocode_runs_outputs
(self, id, run_id, \*)List the outputs for a run list_geocode_shares
(self, id)List users and groups permissioned on this object list_table_deduplication_runs
(self, id, \*)Deprecation warning! list_table_deduplication_runs_logs
(self, id, …)Deprecation warning! list_table_deduplication_runs_outputs
(self, …)Deprecation warning! list_types
(self)List available enhancement types patch_cass_ncoa
(self, id, \*[, name, …])Update some attributes of this CASS/NCOA Enhancement patch_civis_data_match
(self, id, \*[, name, …])Update some attributes of this Civis Data Match Enhancement patch_data_unification
(self, id, \*[, name, …])Deprecation warning! patch_geocode
(self, id, \*[, name, …])Update some attributes of this Geocode Enhancement patch_table_deduplication
(self, id, \*[, …])Deprecation warning! post_cass_ncoa
(self, name, source, \*[, …])Create a CASS/NCOA Enhancement post_cass_ncoa_cancel
(self, id)Cancel a run post_cass_ncoa_runs
(self, id)Start a run post_civis_data_match
(self, name, …[, …])Create a Civis Data Match Enhancement post_civis_data_match_cancel
(self, id)Cancel a run post_civis_data_match_clone
(self, id, \*[, …])Clone this Civis Data Match Enhancement post_civis_data_match_runs
(self, id)Start a run post_data_unification
(self, name, …[, …])Deprecation warning! post_data_unification_cancel
(self, id)Deprecation warning! post_data_unification_runs
(self, id)Deprecation warning! post_geocode
(self, name, remote_host_id, …)Create a Geocode Enhancement post_geocode_cancel
(self, id)Cancel a run post_geocode_runs
(self, id)Start a run post_table_deduplication
(self, name, …[, …])Deprecation warning! post_table_deduplication_cancel
(self, id)Deprecation warning! post_table_deduplication_runs
(self, id)Deprecation warning! put_cass_ncoa
(self, id, name, source, \*[, …])Replace all attributes of this CASS/NCOA Enhancement put_cass_ncoa_archive
(self, id, status)Update the archive status of this object put_cass_ncoa_projects
(self, id, project_id)Add a CASS/NCOA Enhancement to a project put_cass_ncoa_shares_groups
(self, id, …[, …])Set the permissions groups has on this object put_cass_ncoa_shares_users
(self, id, …[, …])Set the permissions users have on this object put_civis_data_match
(self, id, name, …[, …])Replace all attributes of this Civis Data Match Enhancement put_civis_data_match_archive
(self, id, status)Update the archive status of this object put_civis_data_match_projects
(self, id, …)Add a Civis Data Match Enhancement to a project put_civis_data_match_shares_groups
(self, id, …)Set the permissions groups has on this object put_civis_data_match_shares_users
(self, id, …)Set the permissions users have on this object put_data_unification
(self, id, name, …[, …])Deprecation warning! put_geocode
(self, id, name, remote_host_id, …)Replace all attributes of this Geocode Enhancement put_geocode_archive
(self, id, status)Update the archive status of this object put_geocode_projects
(self, id, project_id)Add a Geocode Enhancement to a project put_geocode_shares_groups
(self, id, …[, …])Set the permissions groups has on this object put_geocode_shares_users
(self, id, user_ids, …)Set the permissions users have on this object put_table_deduplication
(self, id, name, …)Deprecation warning! -
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_projects
(self, id, project_id)¶ Remove a Civis Data Match Enhancement from a project
Parameters: - id : integer
The ID of the Civis Data Match Enhancement.
- project_id : integer
The ID of the project.
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
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_data_unification_runs
(self, id, run_id)¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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.
- archived : boolean
Whether the Civis Data Match Job has been archived.
- 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.
-
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)¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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_projects
(self, id, *, hidden='DEFAULT')¶ List the projects a Civis Data Match Enhancement belongs to
Parameters: - id : integer
The ID of the Civis Data Match 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_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 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_data_unification_runs
(self, id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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', archived='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.
- archived : boolean, optional
Whether the Civis Data Match Job has been archived.
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.
- archived : boolean
Whether the Civis Data Match Job has been archived.
- 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.
-
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')¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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, input_table, match_target_id, output_table, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT', archived='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.
- 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.
- 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.
- 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.
- archived : boolean, optional
Whether the Civis Data Match Job has been archived.
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.
- archived : boolean
Whether the Civis Data Match Job has been archived.
- 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.
-
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_clone
(self, id, *, clone_schedule='DEFAULT', clone_triggers='DEFAULT', clone_notifications='DEFAULT')¶ Clone this Civis Data Match Enhancement
Parameters: - id : integer
The ID for the enhancement.
- clone_schedule : boolean, optional
If true, also copy the schedule to the new enhancement.
- clone_triggers : boolean, optional
If true, also copy the triggers to the new enhancement.
- clone_notifications : boolean, optional
If true, also copy the notifications to the new enhancement.
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.
- archived : boolean
Whether the Civis Data Match Job has been archived.
- 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.
-
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')¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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)¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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, input_table, match_target_id, output_table, *, schedule='DEFAULT', parent_id='DEFAULT', notifications='DEFAULT', max_matches='DEFAULT', threshold='DEFAULT', archived='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.
- 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.
- 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.
- 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.
- archived : boolean, optional
Whether the Civis Data Match Job has been archived.
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.
- archived : boolean
Whether the Civis Data Match Job has been archived.
- 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.
-
put_civis_data_match_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.
- 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.
- archived : boolean
Whether the Civis Data Match Job has been archived.
- 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.
-
put_civis_data_match_projects
(self, id, project_id)¶ Add a Civis Data Match Enhancement to a project
Parameters: - id : integer
The ID of the Civis Data Match 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_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')¶ - Warning: The Data Unification Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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')¶ - Warning: The Table Deduplication Enhancement is deprecated, and slated for removal in the coming months.
- Please reach out to support@civisanalytics.com for more information on transitioning to identity resolution alternatives.
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, author, status, …])List -
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 delete_shares_groups
(self, id, group_id)Revoke the permissions a group has on this object delete_shares_users
(self, id, user_id)Revoke the permissions a user has on this object get
(self, id, \*[, link_expires_at, inline])Get details about a file get_preprocess_csv
(self, id)Get a Preprocess CSV list_projects
(self, id, \*[, hidden])List the projects a File belongs to list_shares
(self, id)List users and groups permissioned on this object patch
(self, id, \*[, name, expires_at])Update details about a file patch_preprocess_csv
(self, id, \*[, …])Update some attributes of this Preprocess CSV post
(self, name, \*[, expires_at])Initiate an upload of a file into the platform post_multipart
(self, name, num_parts, \*[, …])Initiate a multipart upload post_multipart_complete
(self, id)Complete a multipart upload post_preprocess_csv
(self, file_id, \*[, …])Create a Preprocess CSV put
(self, id, name, expires_at)Update details about a file put_preprocess_csv
(self, id, file_id, \*[, …])Replace all attributes of this Preprocess CSV put_preprocess_csv_archive
(self, id, status)Update the archive status of this object put_projects
(self, id, project_id)Add a File to a project put_shares_groups
(self, id, group_ids, …)Set the permissions groups has on this object put_shares_users
(self, id, user_ids, …[, …])Set the permissions users have on this object -
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.
-
get_preprocess_csv
(self, id)¶ Get a Preprocess CSV
Parameters: - id : integer
Returns: - id : integer
The ID of the job created.
- file_id : integer
The ID of the file.
- in_place : boolean
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
- hidden : boolean
The hidden status of the item.
-
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.
-
patch
(self, id, *, name='DEFAULT', expires_at='DEFAULT')¶ Update details about a file
Parameters: - id : integer
The ID of the file.
- name : string, optional
The file name. The extension must match the previous extension.
- expires_at : string/date-time, optional
The date and time the file will expire.
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.
-
patch_preprocess_csv
(self, id, *, file_id='DEFAULT', in_place='DEFAULT', detect_table_columns='DEFAULT', force_character_set_conversion='DEFAULT', include_header='DEFAULT', column_delimiter='DEFAULT')¶ Update some attributes of this Preprocess CSV
Parameters: - id : integer
The ID of the job created.
- file_id : integer, optional
The ID of the file.
- in_place : boolean, optional
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean, optional
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean, optional
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean, optional
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string, optional
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
Returns: - id : integer
The ID of the job created.
- file_id : integer
The ID of the file.
- in_place : boolean
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
- hidden : boolean
The hidden status of the item.
-
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
-
post_preprocess_csv
(self, file_id, *, in_place='DEFAULT', detect_table_columns='DEFAULT', force_character_set_conversion='DEFAULT', include_header='DEFAULT', column_delimiter='DEFAULT', hidden='DEFAULT')¶ Create a Preprocess CSV
Parameters: - file_id : integer
The ID of the file.
- in_place : boolean, optional
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean, optional
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean, optional
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean, optional
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string, optional
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
- hidden : boolean, optional
The hidden status of the item.
Returns: - id : integer
The ID of the job created.
- file_id : integer
The ID of the file.
- in_place : boolean
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
- hidden : boolean
The hidden status of the item.
-
put
(self, id, name, expires_at)¶ Update details about a file
Parameters: - id : integer
The ID of the file.
- name : string
The file name. The extension must match the previous extension.
- expires_at : string/date-time
The date and time the file will expire.
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.
-
put_preprocess_csv
(self, id, file_id, *, in_place='DEFAULT', detect_table_columns='DEFAULT', force_character_set_conversion='DEFAULT', include_header='DEFAULT', column_delimiter='DEFAULT')¶ Replace all attributes of this Preprocess CSV
Parameters: - id : integer
The ID of the job created.
- file_id : integer
The ID of the file.
- in_place : boolean, optional
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean, optional
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean, optional
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean, optional
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string, optional
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
Returns: - id : integer
The ID of the job created.
- file_id : integer
The ID of the file.
- in_place : boolean
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
- hidden : boolean
The hidden status of the item.
-
put_preprocess_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 of the job created.
- file_id : integer
The ID of the file.
- in_place : boolean
If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.
- detect_table_columns : boolean
If true, detect the table columns in the file including the sql types. If false, skip table column detection.Defaults to false.
- force_character_set_conversion : boolean
If true, the file will always be converted to UTF-8 and any character that cannot be converted will be discarded. If false, the character set conversion will only run if the detected character set is not compatible with UTF-8 (e.g., UTF-8, ASCII).
- include_header : boolean
A boolean value indicating whether or not the first row of the file is a header row. If not provided, will attempt to auto-detect whether a header row is present.
- column_delimiter : string
The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.
- hidden : boolean
The hidden status of the item.
-
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
delete_members
(self, id, user_id)Remove a user from a group delete_shares_groups
(self, id, group_id)Revoke the permissions a group has on this object delete_shares_users
(self, id, user_id)Revoke the permissions a user has on this object get
(self, id)Get a Group list
(self, \*[, query, permission, …])List Groups list_shares
(self, id)List users and groups permissioned on this object patch
(self, id, \*[, name, description, …])Update some attributes of this Group post
(self, name, \*[, description, slug, …])Create a Group put
(self, id, name, \*[, description, slug, …])Replace all attributes of this Group put_members
(self, id, user_id)Add a user to a group put_shares_groups
(self, id, group_ids, …)Set the permissions groups has on this object put_shares_users
(self, id, user_ids, …[, …])Set the permissions users have on this object -
delete_members
(self, id, user_id)¶ Remove a user from a group
Parameters: - id : integer
The ID of the group.
- user_id : integer
The ID of the user.
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 a Group
Parameters: - id : integer
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.
- description : string
The description of the group.
- slug : string
The slug for this group.
- organization_id : integer
The ID of the organization this group belongs to.
- organization_name : string
The name of the organization this group belongs to.
- member_count : integer
The total number of members in this group.
- must_agree_to_eula : boolean
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean
The two factor authentication requirement for this group.
- role_ids : list
An array of ids of all the roles this group has.
- default_time_zone : string
The default time zone of this group.
- members : list::
The members of this group. - 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
(self, *, query='DEFAULT', permission='DEFAULT', include_members='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.
- include_members : boolean, optional
Show members of the group.
- 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 ID of the organization this group belongs to.
- organization_name : string
The name of the organization this group belongs to.
- member_count : integer
The total number of members in this group.
- members : list::
The members of this group. - 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 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
(self, id, *, name='DEFAULT', description='DEFAULT', slug='DEFAULT', organization_id='DEFAULT', must_agree_to_eula='DEFAULT', default_otp_required_for_login='DEFAULT', role_ids='DEFAULT', default_time_zone='DEFAULT')¶ Update some attributes of this Group
Parameters: - id : integer
The ID of this group.
- name : string, optional
This group’s name.
- description : string, optional
The description of the group.
- slug : string, optional
The slug for this group.
- organization_id : integer, optional
The ID of the organization this group belongs to.
- must_agree_to_eula : boolean, optional
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean, optional
The two factor authentication requirement for this group.
- role_ids : list, optional
An array of ids of all the roles this group has.
- default_time_zone : string, optional
The default time zone of this group.
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.
- description : string
The description of the group.
- slug : string
The slug for this group.
- organization_id : integer
The ID of the organization this group belongs to.
- organization_name : string
The name of the organization this group belongs to.
- member_count : integer
The total number of members in this group.
- must_agree_to_eula : boolean
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean
The two factor authentication requirement for this group.
- role_ids : list
An array of ids of all the roles this group has.
- default_time_zone : string
The default time zone of this group.
- members : list::
The members of this group. - 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.
-
post
(self, name, *, description='DEFAULT', slug='DEFAULT', organization_id='DEFAULT', must_agree_to_eula='DEFAULT', default_otp_required_for_login='DEFAULT', role_ids='DEFAULT', default_time_zone='DEFAULT')¶ Create a Group
Parameters: - name : string
This group’s name.
- description : string, optional
The description of the group.
- slug : string, optional
The slug for this group.
- organization_id : integer, optional
The ID of the organization this group belongs to.
- must_agree_to_eula : boolean, optional
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean, optional
The two factor authentication requirement for this group.
- role_ids : list, optional
An array of ids of all the roles this group has.
- default_time_zone : string, optional
The default time zone of this group.
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.
- description : string
The description of the group.
- slug : string
The slug for this group.
- organization_id : integer
The ID of the organization this group belongs to.
- organization_name : string
The name of the organization this group belongs to.
- member_count : integer
The total number of members in this group.
- must_agree_to_eula : boolean
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean
The two factor authentication requirement for this group.
- role_ids : list
An array of ids of all the roles this group has.
- default_time_zone : string
The default time zone of this group.
- members : list::
The members of this group. - 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.
-
put
(self, id, name, *, description='DEFAULT', slug='DEFAULT', organization_id='DEFAULT', must_agree_to_eula='DEFAULT', default_otp_required_for_login='DEFAULT', role_ids='DEFAULT', default_time_zone='DEFAULT')¶ Replace all attributes of this Group
Parameters: - id : integer
The ID of this group.
- name : string
This group’s name.
- description : string, optional
The description of the group.
- slug : string, optional
The slug for this group.
- organization_id : integer, optional
The ID of the organization this group belongs to.
- must_agree_to_eula : boolean, optional
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean, optional
The two factor authentication requirement for this group.
- role_ids : list, optional
An array of ids of all the roles this group has.
- default_time_zone : string, optional
The default time zone of this group.
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.
- description : string
The description of the group.
- slug : string
The slug for this group.
- organization_id : integer
The ID of the organization this group belongs to.
- organization_name : string
The name of the organization this group belongs to.
- member_count : integer
The total number of members in this group.
- must_agree_to_eula : boolean
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean
The two factor authentication requirement for this group.
- role_ids : list
An array of ids of all the roles this group has.
- default_time_zone : string
The default time zone of this group.
- members : list::
The members of this group. - 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.
-
put_members
(self, id, user_id)¶ Add a user to a group
Parameters: - id : integer
The ID of the group.
- user_id : integer
The ID of the user.
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.
- description : string
The description of the group.
- slug : string
The slug for this group.
- organization_id : integer
The ID of the organization this group belongs to.
- organization_name : string
The name of the organization this group belongs to.
- member_count : integer
The total number of members in this group.
- must_agree_to_eula : boolean
Whether or not members of this group must sign the EULA.
- default_otp_required_for_login : boolean
The two factor authentication requirement for this group.
- role_ids : list
An array of ids of all the roles this group has.
- default_time_zone : string
The default time zone of this group.
- members : list::
The members of this group. - 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.
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.
-
Imports¶
-
class
Imports
(session_kwargs, client, return_type='civis')¶ Methods
delete_files_runs
(self, id, run_id)Cancel a run delete_projects
(self, id, project_id)Remove an Import from a project delete_shares_groups
(self, id, group_id)Revoke the permissions a group has on this object delete_shares_users
(self, id, user_id)Revoke the permissions a user has on this object get
(self, id)Get details about an import get_batches
(self, id)Get details about a batch import get_files_csv
(self, id)Get a CSV Import get_files_runs
(self, id, run_id)Check status of a run list
(self, \*[, type, author, destination, …])List Imports list_batches
(self, \*[, hidden, limit, …])List batch imports list_files_runs
(self, id, \*[, limit, …])List runs for the given import list_files_runs_logs
(self, id, run_id, \*[, …])Get the logs for a run list_projects
(self, id, \*[, hidden])List the projects an Import belongs to list_runs
(self, id)Get the run history of this import list_runs_logs
(self, id, run_id, \*[, …])Get the logs for a run list_shares
(self, id)List users and groups permissioned on this object patch_files_csv
(self, id, \*[, name, …])Update some attributes of this CSV Import post
(self, name, sync_type, is_outbound, \*)Create a new import configuration post_batches
(self, file_ids, schema, table, …)Upload multiple files to Civis post_cancel
(self, id)Cancel a run post_files
(self, schema, name, …[, …])Initate an import of a tabular file into the platform post_files_csv
(self, source, destination, …)Create a CSV Import post_files_runs
(self, id)Start a run post_runs
(self, id)Run an import post_syncs
(self, id, source, destination, \*)Create a sync put
(self, id, name, sync_type, is_outbound, \*)Update an import put_archive
(self, id, status)Update the archive status of this object put_files_csv
(self, id, source, destination, …)Replace all attributes of this CSV Import put_files_csv_archive
(self, id, status)Update the archive status of this object put_projects
(self, id, project_id)Add an Import to a project put_shares_groups
(self, id, group_ids, …)Set the permissions groups has on this object put_shares_users
(self, id, user_ids, …[, …])Set the permissions users have on this object put_syncs
(self, id, sync_id, source, …[, …])Update a sync put_syncs_archive
(self, id, sync_id, \*[, …])Update the archive status of this sync -
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, 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. For DB Syncs, the first element is an SSL private key credential id, and the second element is the corresponding public key 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. For DB Syncs, the first element is an SSL private key credential id, and the second element is the corresponding public key 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 - 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.
- 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. Default is set to “newsprsht”
- sql_query : string
- If you are doing a Google Sheet export, this is your SQL query.
- contact_lists : string
- soql_query : string
- include_deleted_records : boolean
- 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.
- name : string
The name of the import.
- source : dict::
- file_ids : list
- The file ID(s) to import, if importing Civis file(s).
- storage_path : 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) within the bucket from which to import. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”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.
- loosen_types : boolean
If true, SQL types with precisions/lengths will have these values increased to accomodate data growth in future loads. Type loosening only occurs on table creation. Defaults to false.
- execution : string
In upsert mode, controls the movement of data in upsert mode. If set to “delayed”, the data will be moved after a brief delay. If set to “immediate”, the data will be moved immediately. In non-upsert modes, controls the speed at which detailed column stats appear in the data catalogue. Defaults to “delayed”, to accomodate concurrent upserts to the same table and speedier non-upsert imports.
- redshift_destination_options : dict::
- diststyle : string
- The diststyle to use for the table. One of “even”, “all”, or “key”.
- 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, 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. For DB Syncs, the first element is an SSL private key credential id, and the second element is the corresponding public key 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. For DB Syncs, the first element is an SSL private key credential id, and the second element is the corresponding public key 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
-