API Resources

Admin

class Admin(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.admin.list_announcements(...)

Methods

delete_announcements(id)

Delete an announcement

get_announcements(id)

Get a particular announcement

list_announcements(*[, limit, page_num, ...])

List announcements

list_organizations(*[, status, org_type])

List organizations

patch_announcements(id, *[, subject, body, ...])

Edit an announcement

patch_themes(id, *[, name, ...])

Edit a theme

post_announcements(subject, body, *[, ...])

Post an announcement

post_themes(name, settings_json, *[, ...])

Create a theme

delete_announcements(id)

Delete an announcement

Parameters
idinteger

The ID of this announcement

Returns
None

Response code 204: success

get_announcements(id)

Get a particular announcement

Parameters
idinteger

The ID of this announcement

Returns
civis.response.Response
  • idinteger

    The ID of this announcement

  • subjectstring

    The subject of this announcement.

  • bodystring

    The body of this announcement.

  • released_atstring/date-time

    The date and time this announcement was released.

  • created_at : string/date-time

  • updated_at : string/date-time

list_announcements(*, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List announcements

Parameters
limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

The field on which to order the result set. Defaults to released_at. Must be one of: released_at.

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of this announcement

  • subjectstring

    The subject of this announcement.

  • bodystring

    The body of this announcement.

  • released_atstring/date-time

    The date and time this announcement was released.

  • created_at : string/date-time

  • updated_at : string/date-time

list_organizations(*, status='DEFAULT', org_type='DEFAULT')

List organizations

Parameters
statusarray, optional

The status of the organization (active/trial/inactive).

org_typearray, optional

The organization type (platform/ads/survey_vendor/other).

Returns
civis.response.Response
  • idinteger

    The ID of this organization.

  • namestring

    The name of this organization.

  • slugstring

    The slug of this organization.

  • account_manager_idinteger

    The user ID of the Account Manager.

  • cs_specialist_idinteger

    The user ID of the Client Success Specialist.

  • statusstring

    The status of the organization (active/trial/inactive).

  • org_typestring

    The organization type (platform/ads/survey_vendor/other).

  • custom_brandingstring

    The custom branding settings.

  • contract_sizeinteger

    The monthly contract size.

  • max_analyst_usersinteger

    The max number of full platform users for the org.

  • max_report_usersinteger

    The max number of report-only platform users for the org.

  • verticalstring

    The business vertical that the organization belongs to.

  • cs_metadatastring

    Additional metadata about the organization in JSON format.

  • remove_footer_in_emailsboolean

    If true, emails sent by platform will not include Civis text.

  • salesforce_account_idstring

    The SalesForce Account ID for this organization.

  • tableau_site_idstring

    The Tableau Site ID for this organization.

  • fedramp_enabledboolean

    Flag denoting whether this organization is FedRAMP compliant.

  • created_by_idinteger

    The ID of the user who created this organization

  • last_updated_by_idinteger

    The ID of the user who last updated this organization

  • advanced_settingsdict::
    • dedicated_dj_pool_enabledboolean

      If true, the Organization has a dedicated delayed jobs pool. Defaults to false.

  • tableau_refresh_historylist

    The number of tableau refreshes used this month.

patch_announcements(id, *, subject='DEFAULT', body='DEFAULT', released_at='DEFAULT')

Edit an announcement

Parameters
idinteger

The ID of this announcement

subjectstring, optional

The subject of this announcement.

bodystring, optional

The body of this announcement.

released_atstring/date-time, optional

The date and time this announcement was released.

Returns
civis.response.Response
  • idinteger

    The ID of this announcement

  • subjectstring

    The subject of this announcement.

  • bodystring

    The body of this announcement.

  • released_atstring/date-time

    The date and time this announcement was released.

  • created_at : string/date-time

  • updated_at : string/date-time

patch_themes(id, *, name='DEFAULT', organization_ids='DEFAULT', settings_json='DEFAULT', logo_file_id='DEFAULT')

Edit a theme

Parameters
idinteger

The ID of this theme.

namestring, optional

The name of this theme.

organization_idslist, optional

List of organization ID’s allowed to see this theme.

settings_jsonstring, optional

The JSON-encoded theme configuration.

logo_file_idstring, optional

The ID of the logo image file.

Returns
civis.response.Response
  • idinteger

    The ID of this theme.

  • namestring

    The name of this theme.

  • organization_idslist

    List of organization ID’s allowed to use this theme.

  • settingsstring

    The theme configuration object.

  • logo_filedict::
    • idinteger

      The ID of the logo image file.

    • download_urlstring

      The URL of the logo image file.

  • created_at : string/date-time

  • updated_at : string/date-time

post_announcements(subject, body, *, released_at='DEFAULT')

Post an announcement

Parameters
subjectstring

The subject of this announcement.

bodystring

The body of this announcement.

released_atstring/date-time, optional

The date and time this announcement was released.

Returns
civis.response.Response
  • idinteger

    The ID of this announcement

  • subjectstring

    The subject of this announcement.

  • bodystring

    The body of this announcement.

  • released_atstring/date-time

    The date and time this announcement was released.

  • created_at : string/date-time

  • updated_at : string/date-time

post_themes(name, settings_json, *, organization_ids='DEFAULT', logo_file_id='DEFAULT')

Create a theme

Parameters
namestring

The name of this theme.

settings_jsonstring

The JSON-encoded theme configuration.

organization_idslist, optional

List of organization ID’s allowed to see this theme.

logo_file_idstring, optional

The ID of the logo image file.

Returns
civis.response.Response
  • idinteger

    The ID of this theme.

  • namestring

    The name of this theme.

  • organization_idslist

    List of organization ID’s allowed to use this theme.

  • settingsstring

    The theme configuration object.

  • logo_filedict::
    • idinteger

      The ID of the logo image file.

    • download_urlstring

      The URL of the logo image file.

  • created_at : string/date-time

  • updated_at : string/date-time

Aliases

class Aliases(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.aliases.list_shares(...)

Methods

delete(id)

Delete an alias

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

get(id)

Get an Alias

get_object_type(object_type, alias)

Get details about an alias within an FCO type

list(*[, object_type, limit, page_num, ...])

List Aliases

list_dependencies(id, *[, user_id])

List dependent objects for this object

list_shares(id)

List users and groups permissioned on this object

patch(id, *[, object_id, object_type, ...])

Update some attributes of this Alias

post(object_id, object_type, alias, *[, ...])

Create an Alias

put(id, object_id, object_type, alias, *[, ...])

Replace all attributes of this Alias

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

Set the permissions groups has on this object

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

Set the permissions users have on this object

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

Transfer ownership of this object to another user

delete(id)

Delete an alias

Parameters
idinteger

The id of the Alias object.

Returns
None

Response code 204: success

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

get(id)

Get an Alias

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The id of the Alias object.

  • object_idinteger

    The id of the object

  • object_typestring

    The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

  • aliasstring

    The alias of the object

  • user_idinteger

    The id of the user who created the alias

  • display_namestring

    The display name of the Alias object. Defaults to object name if not provided.

get_object_type(object_type, alias)

Get details about an alias within an FCO type

Parameters
object_typestring

The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

aliasstring

The alias of the object

Returns
civis.response.Response
  • idinteger

    The id of the Alias object.

  • object_idinteger

    The id of the object

  • object_typestring

    The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

  • aliasstring

    The alias of the object

  • user_idinteger

    The id of the user who created the alias

  • display_namestring

    The display name of the Alias object. Defaults to object name if not provided.

list(*, object_type='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List Aliases

Parameters
object_typestring, optional

Filter results by object type. Pass multiple object types with a comma- separatedlist. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The id of the Alias object.

  • object_idinteger

    The id of the object

  • object_typestring

    The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

  • aliasstring

    The alias of the object

  • user_idinteger

    The id of the user who created the alias

  • display_namestring

    The display name of the Alias object. Defaults to object name if not provided.

list_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

patch(id, *, object_id='DEFAULT', object_type='DEFAULT', alias='DEFAULT', display_name='DEFAULT')

Update some attributes of this Alias

Parameters
idinteger

The id of the Alias object.

object_idinteger, optional

The id of the object

object_typestring, optional

The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

aliasstring, optional

The alias of the object

display_namestring, optional

The display name of the Alias object. Defaults to object name if not provided.

Returns
civis.response.Response
  • idinteger

    The id of the Alias object.

  • object_idinteger

    The id of the object

  • object_typestring

    The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

  • aliasstring

    The alias of the object

  • user_idinteger

    The id of the user who created the alias

  • display_namestring

    The display name of the Alias object. Defaults to object name if not provided.

post(object_id, object_type, alias, *, display_name='DEFAULT')

Create an Alias

Parameters
object_idinteger

The id of the object

object_typestring

The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

aliasstring

The alias of the object

display_namestring, optional

The display name of the Alias object. Defaults to object name if not provided.

Returns
civis.response.Response
  • idinteger

    The id of the Alias object.

  • object_idinteger

    The id of the object

  • object_typestring

    The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

  • aliasstring

    The alias of the object

  • user_idinteger

    The id of the user who created the alias

  • display_namestring

    The display name of the Alias object. Defaults to object name if not provided.

put(id, object_id, object_type, alias, *, display_name='DEFAULT')

Replace all attributes of this Alias

Parameters
idinteger

The id of the Alias object.

object_idinteger

The id of the object

object_typestring

The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

aliasstring

The alias of the object

display_namestring, optional

The display name of the Alias object. Defaults to object name if not provided.

Returns
civis.response.Response
  • idinteger

    The id of the Alias object.

  • object_idinteger

    The id of the object

  • object_typestring

    The type of the object. Valid types include: cass_ncoa, container_script, geocode, python_script, r_script, salesforce_export, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.

  • aliasstring

    The alias of the object

  • user_idinteger

    The id of the user who created the alias

  • display_namestring

    The display name of the Alias object. Defaults to object name if not provided.

put_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_transfer(id, user_id, include_dependencies, *, email_body='DEFAULT', send_email='DEFAULT')

Transfer ownership of this object to another user

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

ID of target user

include_dependenciesboolean

Whether or not to give manage permissions on all dependencies

email_bodystring, optional

Custom body text for e-mail sent on transfer.

send_emailboolean, optional

Send email to the target user of the transfer?

Returns
civis.response.Response
  • dependencieslist::

    Dependent objects for this object - object_type : string

    Dependent object type

    • fco_typestring

      Human readable dependent object type

    • idinteger

      Dependent object ID

    • namestring

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

    • permission_levelstring

      Permission level of target user (not user’s groups) for dependent object, or null if no target user

    • sharedboolean

      Whether dependent object was successfully shared with target user

Announcements

class Announcements(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.announcements.list(...)

Methods

list(*[, limit, page_num, order, order_dir, ...])

List announcements

list(*, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List announcements

Parameters
limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

The field on which to order the result set. Defaults to released_at. Must be one of: released_at.

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of this announcement

  • subjectstring

    The subject of this announcement.

  • bodystring

    The body of this announcement.

  • released_atstring/date-time

    The date and time this announcement was released.

  • created_at : string/date-time

  • updated_at : string/date-time

Clusters

class Clusters(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.clusters.list_kubernetes(...)

Methods

delete_kubernetes_partitions(id, ...)

Delete a Cluster Partition

get_kubernetes(id, *[, include_usage_stats])

Describe a Kubernetes Cluster

get_kubernetes_instance_configs(...[, ...])

Describe an Instance Config

get_kubernetes_partitions(id, ...[, ...])

Describe a Cluster Partition

list_kubernetes(*[, organization_slug, ...])

List Kubernetes Clusters

list_kubernetes_deployment_stats(id)

Get stats about deployments associated with a Kubernetes Cluster

list_kubernetes_deployments(id, *[, ...])

List the deployments associated with a Kubernetes Cluster

list_kubernetes_instance_configs_active_workloads(id, *)

List active workloads in an Instance Config

list_kubernetes_instance_configs_historical_graphs(...)

Get graphs of historical resource usage in an Instance Config

list_kubernetes_instance_configs_user_statistics(...)

Get statistics about the current users of an Instance Config

list_kubernetes_partitions(id, *[, ...])

List Cluster Partitions for given cluster

patch_kubernetes(id, *[, raw_cluster_slug, ...])

Update a Kubernetes Cluster

patch_kubernetes_partitions(id, ...[, ...])

Update a Cluster Partition

post_kubernetes(*[, organization_id, ...])

Create a Kubernetes Cluster

post_kubernetes_partitions(id, ...)

Create a Cluster Partition for given cluster

delete_kubernetes_partitions(id, cluster_partition_id)

Delete a Cluster Partition

Parameters
idinteger

The ID of the cluster which this partition belongs to.

cluster_partition_idinteger

The ID of this cluster partition.

Returns
None

Response code 204: success

get_kubernetes(id, *, include_usage_stats='DEFAULT')

Describe a Kubernetes Cluster

Parameters
idinteger
include_usage_statsboolean, optional

When true, usage stats are returned in instance config objects. Defaults to false.

Returns
civis.response.Response
  • idinteger

    The ID of this cluster.

  • organization_idstring

    The id of this cluster’s organization.

  • organization_namestring

    The name of this cluster’s organization.

  • organization_slugstring

    The slug of this cluster’s organization.

  • raw_cluster_slugstring

    The slug of this cluster’s raw configuration.

  • custom_partitionsboolean

    Whether this cluster has a custom partition configuration.

  • cluster_partitionslist::

    List of cluster partitions associated with this cluster. - cluster_partition_id : integer

    The ID of this cluster partition.

    • namestring

      The name of the cluster partition.

    • labelslist

      Labels associated with this partition.

    • instance_configslist::

      The instances configured for this cluster partition. - instance_config_id : integer

      The ID of this InstanceConfig.

      • instance_typestring

        An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

      • min_instancesinteger

        The minimum number of instances of that type in this cluster.

      • max_instancesinteger

        The maximum number of instances of that type in this cluster.

      • instance_max_memoryinteger

        The amount of memory (RAM) available to a single instance of that type in megabytes.

      • instance_max_cpuinteger

        The number of processor shares available to a single instance of that type in millicores.

      • instance_max_diskinteger

        The amount of disk available to a single instance of that type in gigabytes.

      • usage_statsdict::
        • pending_memory_requestedinteger

          The sum of memory requests (in MB) for pending deployments in this instance config.

        • pending_cpu_requestedinteger

          The sum of cpu requests (in millicores) for pending deployments in this instance config.

        • running_memory_requestedinteger

          The sum of memory requests (in MB) for running deployments in this instance config.

        • running_cpu_requestedinteger

          The sum of cpu requests (in millicores) for running deployments in this instance config.

        • pending_deploymentsinteger

          The number of pending deployments in this instance config.

        • running_deploymentsinteger

          The number of running deployments in this instance config.

    • default_instance_config_idinteger

      The id of the InstanceConfig that is the default for this partition.

  • is_nat_enabledboolean

    Whether this cluster needs a NAT gateway or not.

  • hoursnumber/float

    The number of hours used this month for this cluster.

get_kubernetes_instance_configs(instance_config_id, *, include_usage_stats='DEFAULT')

Describe an Instance Config

Parameters
instance_config_idinteger

The ID of this instance config.

include_usage_statsboolean, optional

When true, usage stats are returned in instance config objects. Defaults to false.

Returns
civis.response.Response
  • instance_config_idinteger

    The ID of this InstanceConfig.

  • instance_typestring

    An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

  • min_instancesinteger

    The minimum number of instances of that type in this cluster.

  • max_instancesinteger

    The maximum number of instances of that type in this cluster.

  • instance_max_memoryinteger

    The amount of memory (RAM) available to a single instance of that type in megabytes.

  • instance_max_cpuinteger

    The number of processor shares available to a single instance of that type in millicores.

  • instance_max_diskinteger

    The amount of disk available to a single instance of that type in gigabytes.

  • usage_statsdict::
    • pending_memory_requestedinteger

      The sum of memory requests (in MB) for pending deployments in this instance config.

    • pending_cpu_requestedinteger

      The sum of cpu requests (in millicores) for pending deployments in this instance config.

    • running_memory_requestedinteger

      The sum of memory requests (in MB) for running deployments in this instance config.

    • running_cpu_requestedinteger

      The sum of cpu requests (in millicores) for running deployments in this instance config.

    • pending_deploymentsinteger

      The number of pending deployments in this instance config.

    • running_deploymentsinteger

      The number of running deployments in this instance config.

  • cluster_partition_idinteger

    The ID of this InstanceConfig’s cluster partition

  • cluster_partition_namestring

    The name of this InstanceConfig’s cluster partition

get_kubernetes_partitions(id, cluster_partition_id, *, include_usage_stats='DEFAULT')

Describe a Cluster Partition

Parameters
idinteger

The ID of the cluster which this partition belongs to.

cluster_partition_idinteger

The ID of this cluster partition.

include_usage_statsboolean, optional

When true, usage stats are returned in instance config objects. Defaults to false.

Returns
civis.response.Response
  • cluster_partition_idinteger

    The ID of this cluster partition.

  • namestring

    The name of the cluster partition.

  • labelslist

    Labels associated with this partition.

  • instance_configslist::

    The instances configured for this cluster partition. - instance_config_id : integer

    The ID of this InstanceConfig.

    • instance_typestring

      An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

    • min_instancesinteger

      The minimum number of instances of that type in this cluster.

    • max_instancesinteger

      The maximum number of instances of that type in this cluster.

    • instance_max_memoryinteger

      The amount of memory (RAM) available to a single instance of that type in megabytes.

    • instance_max_cpuinteger

      The number of processor shares available to a single instance of that type in millicores.

    • instance_max_diskinteger

      The amount of disk available to a single instance of that type in gigabytes.

    • usage_statsdict::
      • pending_memory_requestedinteger

        The sum of memory requests (in MB) for pending deployments in this instance config.

      • pending_cpu_requestedinteger

        The sum of cpu requests (in millicores) for pending deployments in this instance config.

      • running_memory_requestedinteger

        The sum of memory requests (in MB) for running deployments in this instance config.

      • running_cpu_requestedinteger

        The sum of cpu requests (in millicores) for running deployments in this instance config.

      • pending_deploymentsinteger

        The number of pending deployments in this instance config.

      • running_deploymentsinteger

        The number of running deployments in this instance config.

  • default_instance_config_idinteger

    The id of the InstanceConfig that is the default for this partition.

list_kubernetes(*, organization_slug='DEFAULT', raw_cluster_slug='DEFAULT', exclude_inactive_orgs='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List Kubernetes Clusters

Parameters
organization_slugstring, optional

The slug of this cluster’s organization.

raw_cluster_slugstring, optional

The slug of this cluster’s raw configuration.

exclude_inactive_orgsboolean, optional

When true, excludes KubeClusters associated with inactive orgs. Defaults to false.

limitinteger, optional

Number of results to return. Defaults to its maximum of 50.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of this cluster.

  • organization_idstring

    The id of this cluster’s organization.

  • organization_namestring

    The name of this cluster’s organization.

  • organization_slugstring

    The slug of this cluster’s organization.

  • raw_cluster_slugstring

    The slug of this cluster’s raw configuration.

  • custom_partitionsboolean

    Whether this cluster has a custom partition configuration.

  • cluster_partitionslist::

    List of cluster partitions associated with this cluster. - cluster_partition_id : integer

    The ID of this cluster partition.

    • namestring

      The name of the cluster partition.

    • labelslist

      Labels associated with this partition.

    • instance_configslist::

      The instances configured for this cluster partition. - instance_config_id : integer

      The ID of this InstanceConfig.

      • instance_typestring

        An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

      • min_instancesinteger

        The minimum number of instances of that type in this cluster.

      • max_instancesinteger

        The maximum number of instances of that type in this cluster.

      • instance_max_memoryinteger

        The amount of memory (RAM) available to a single instance of that type in megabytes.

      • instance_max_cpuinteger

        The number of processor shares available to a single instance of that type in millicores.

      • instance_max_diskinteger

        The amount of disk available to a single instance of that type in gigabytes.

      • usage_statsdict::
        • pending_memory_requestedinteger

          The sum of memory requests (in MB) for pending deployments in this instance config.

        • pending_cpu_requestedinteger

          The sum of cpu requests (in millicores) for pending deployments in this instance config.

        • running_memory_requestedinteger

          The sum of memory requests (in MB) for running deployments in this instance config.

        • running_cpu_requestedinteger

          The sum of cpu requests (in millicores) for running deployments in this instance config.

        • pending_deploymentsinteger

          The number of pending deployments in this instance config.

        • running_deploymentsinteger

          The number of running deployments in this instance config.

    • default_instance_config_idinteger

      The id of the InstanceConfig that is the default for this partition.

  • is_nat_enabledboolean

    Whether this cluster needs a NAT gateway or not.

list_kubernetes_deployment_stats(id)

Get stats about deployments associated with a Kubernetes Cluster

Parameters
idinteger

The ID of this cluster.

Returns
civis.response.Response
  • base_typestring

    The base type of this deployment

  • statestring

    State of the deployment

  • countinteger

    Number of deployments of base type and state

  • total_cpuinteger

    Total amount of CPU in millicores for deployments of base type and state

  • total_memoryinteger

    Total amount of Memory in megabytes for deployments of base type and state

list_kubernetes_deployments(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
idinteger

The id of the cluster.

base_typestring, optional

If specified, return deployments of these base types. It accepts a comma- separated list, possible values are ‘Notebook’, ‘Service’, ‘Run’.

statestring, optional

If specified, return deployments in these states. It accepts a comma- separated list, possible values are pending, running, terminated, sleeping

limitinteger, optional

Number of results to return. Defaults to its maximum of 50.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The id of this deployment.

  • namestring

    The name of the deployment.

  • base_idinteger

    The id of the base object associated with the deployment.

  • base_typestring

    The base type of this deployment.

  • statestring

    The state of the deployment.

  • cpuinteger

    The CPU in millicores required by the deployment.

  • memoryinteger

    The memory in MB required by the deployment.

  • disk_spaceinteger

    The disk space in GB required by the deployment.

  • instance_typestring

    The EC2 instance type requested for the deployment.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • max_memory_usagenumber/float

    If the deployment has finished, the maximum amount of memory used during the deployment, in MB.

  • max_cpu_usagenumber/float

    If the deployment has finished, the maximum amount of cpu used during the deployment, in millicores.

  • created_at : string/time

  • updated_at : string/time

list_kubernetes_instance_configs_active_workloads(id, *, state='DEFAULT')

List active workloads in an Instance Config

Parameters
idinteger

The id of the instance config.

statestring, optional

If specified, return workloads in these states. It accepts a comma- separated list, possible values are pending, running

Returns
civis.response.Response
  • idinteger

    The id of this deployment.

  • base_typestring

    The base type of this deployment.

  • base_idinteger

    The id of the base object associated with this deployment.

  • base_object_namestring

    The name of the base object associated with this deployment. Null if you do not have permission to read the object.

  • job_typestring

    If the base object is a job run you have permission to read, the type of the job. One of “python_script”, “r_script”, “container_script”, or “custom_script”.

  • job_idinteger

    If the base object is a job run you have permission to read, the id of the job.

  • job_cancel_requested_atstring/time

    If the base object is a job run you have permission to read, and it was requested to be cancelled, the timestamp of that request.

  • statestring

    The state of this deployment.

  • cpuinteger

    The CPU in millicores requested by this deployment.

  • memoryinteger

    The memory in MB requested by this deployment.

  • disk_spaceinteger

    The disk space in GB requested by this deployment.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • created_atstring/time

    The timestamp of when the deployment began.

  • cancellableboolean

    True if you have permission to cancel this deployment.

list_kubernetes_instance_configs_historical_graphs(instance_config_id, *, timeframe='DEFAULT')

Get graphs of historical resource usage in an Instance Config

Parameters
instance_config_idinteger

The ID of this instance config.

timeframestring, optional

The span of time that the graphs cover. Must be one of 1_day, 1_week.

Returns
civis.response.Response
  • cpu_graph_urlstring

    URL for the graph of historical CPU usage in this instance config.

  • mem_graph_urlstring

    URL for the graph of historical memory usage in this instance config.

list_kubernetes_instance_configs_user_statistics(instance_config_id, *, order='DEFAULT', order_dir='DEFAULT')

Get statistics about the current users of an Instance Config

Parameters
instance_config_idinteger

The ID of this instance config.

orderstring, optional

The field on which to order the result set. Defaults to running_deployments. Must be one of pending_memory_requested, pending_cpu_requested, running_memory_requested, running_cpu_requested, pending_deployments, running_deployments.

order_dirstring, optional

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

Returns
civis.response.Response
  • user_idstring

    The owning user’s ID

  • user_namestring

    The owning user’s name

  • pending_deploymentsinteger

    The number of deployments belonging to the owning user in “pending” state

  • pending_memory_requestedinteger

    The sum of memory requests (in MB) for deployments belonging to the owning user in “pending” state

  • pending_cpu_requestedinteger

    The sum of CPU requests (in millicores) for deployments belonging to the owning user in “pending” state

  • running_deploymentsinteger

    The number of deployments belonging to the owning user in “running” state

  • running_memory_requestedinteger

    The sum of memory requests (in MB) for deployments belonging to the owning user in “running” state

  • running_cpu_requestedinteger

    The sum of CPU requests (in millicores) for deployments belonging to the owning user in “running” state

list_kubernetes_partitions(id, *, include_usage_stats='DEFAULT')

List Cluster Partitions for given cluster

Parameters
idinteger
include_usage_statsboolean, optional

When true, usage stats are returned in instance config objects. Defaults to false.

Returns
civis.response.Response
  • cluster_partition_idinteger

    The ID of this cluster partition.

  • namestring

    The name of the cluster partition.

  • labelslist

    Labels associated with this partition.

  • instance_configslist::

    The instances configured for this cluster partition. - instance_config_id : integer

    The ID of this InstanceConfig.

    • instance_typestring

      An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

    • min_instancesinteger

      The minimum number of instances of that type in this cluster.

    • max_instancesinteger

      The maximum number of instances of that type in this cluster.

    • instance_max_memoryinteger

      The amount of memory (RAM) available to a single instance of that type in megabytes.

    • instance_max_cpuinteger

      The number of processor shares available to a single instance of that type in millicores.

    • instance_max_diskinteger

      The amount of disk available to a single instance of that type in gigabytes.

    • usage_statsdict::
      • pending_memory_requestedinteger

        The sum of memory requests (in MB) for pending deployments in this instance config.

      • pending_cpu_requestedinteger

        The sum of cpu requests (in millicores) for pending deployments in this instance config.

      • running_memory_requestedinteger

        The sum of memory requests (in MB) for running deployments in this instance config.

      • running_cpu_requestedinteger

        The sum of cpu requests (in millicores) for running deployments in this instance config.

      • pending_deploymentsinteger

        The number of pending deployments in this instance config.

      • running_deploymentsinteger

        The number of running deployments in this instance config.

  • default_instance_config_idinteger

    The id of the InstanceConfig that is the default for this partition.

patch_kubernetes(id, *, raw_cluster_slug='DEFAULT', is_nat_enabled='DEFAULT')

Update a Kubernetes Cluster

Parameters
idinteger

The ID of this cluster.

raw_cluster_slugstring, optional

The slug of this cluster’s raw configuration.

is_nat_enabledboolean, optional

Whether this cluster needs a NAT gateway or not.

Returns
civis.response.Response
  • idinteger

    The ID of this cluster.

  • organization_idstring

    The id of this cluster’s organization.

  • organization_namestring

    The name of this cluster’s organization.

  • organization_slugstring

    The slug of this cluster’s organization.

  • raw_cluster_slugstring

    The slug of this cluster’s raw configuration.

  • custom_partitionsboolean

    Whether this cluster has a custom partition configuration.

  • cluster_partitionslist::

    List of cluster partitions associated with this cluster. - cluster_partition_id : integer

    The ID of this cluster partition.

    • namestring

      The name of the cluster partition.

    • labelslist

      Labels associated with this partition.

    • instance_configslist::

      The instances configured for this cluster partition. - instance_config_id : integer

      The ID of this InstanceConfig.

      • instance_typestring

        An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

      • min_instancesinteger

        The minimum number of instances of that type in this cluster.

      • max_instancesinteger

        The maximum number of instances of that type in this cluster.

      • instance_max_memoryinteger

        The amount of memory (RAM) available to a single instance of that type in megabytes.

      • instance_max_cpuinteger

        The number of processor shares available to a single instance of that type in millicores.

      • instance_max_diskinteger

        The amount of disk available to a single instance of that type in gigabytes.

      • usage_statsdict::
        • pending_memory_requestedinteger

          The sum of memory requests (in MB) for pending deployments in this instance config.

        • pending_cpu_requestedinteger

          The sum of cpu requests (in millicores) for pending deployments in this instance config.

        • running_memory_requestedinteger

          The sum of memory requests (in MB) for running deployments in this instance config.

        • running_cpu_requestedinteger

          The sum of cpu requests (in millicores) for running deployments in this instance config.

        • pending_deploymentsinteger

          The number of pending deployments in this instance config.

        • running_deploymentsinteger

          The number of running deployments in this instance config.

    • default_instance_config_idinteger

      The id of the InstanceConfig that is the default for this partition.

  • is_nat_enabledboolean

    Whether this cluster needs a NAT gateway or not.

  • hoursnumber/float

    The number of hours used this month for this cluster.

patch_kubernetes_partitions(id, cluster_partition_id, *, instance_configs='DEFAULT', name='DEFAULT', labels='DEFAULT')

Update a Cluster Partition

Parameters
idinteger

The ID of the cluster which this partition belongs to.

cluster_partition_idinteger

The ID of this cluster partition.

instance_configslist, 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, c5.18xlarge, and p2.xlarge.

  • min_instancesinteger

    The minimum number of instances of that type in this cluster.

  • max_instancesinteger

    The maximum number of instances of that type in this cluster.

namestring, optional

The name of the cluster partition.

labelslist, optional

Labels associated with this partition.

Returns
civis.response.Response
  • cluster_partition_idinteger

    The ID of this cluster partition.

  • namestring

    The name of the cluster partition.

  • labelslist

    Labels associated with this partition.

  • instance_configslist::

    The instances configured for this cluster partition. - instance_config_id : integer

    The ID of this InstanceConfig.

    • instance_typestring

      An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

    • min_instancesinteger

      The minimum number of instances of that type in this cluster.

    • max_instancesinteger

      The maximum number of instances of that type in this cluster.

    • instance_max_memoryinteger

      The amount of memory (RAM) available to a single instance of that type in megabytes.

    • instance_max_cpuinteger

      The number of processor shares available to a single instance of that type in millicores.

    • instance_max_diskinteger

      The amount of disk available to a single instance of that type in gigabytes.

    • usage_statsdict::
      • pending_memory_requestedinteger

        The sum of memory requests (in MB) for pending deployments in this instance config.

      • pending_cpu_requestedinteger

        The sum of cpu requests (in millicores) for pending deployments in this instance config.

      • running_memory_requestedinteger

        The sum of memory requests (in MB) for running deployments in this instance config.

      • running_cpu_requestedinteger

        The sum of cpu requests (in millicores) for running deployments in this instance config.

      • pending_deploymentsinteger

        The number of pending deployments in this instance config.

      • running_deploymentsinteger

        The number of running deployments in this instance config.

  • default_instance_config_idinteger

    The id of the InstanceConfig that is the default for this partition.

post_kubernetes(*, organization_id='DEFAULT', organization_slug='DEFAULT', raw_cluster_slug='DEFAULT', is_nat_enabled='DEFAULT')

Create a Kubernetes Cluster

Parameters
organization_idstring, optional

The id of this cluster’s organization.

organization_slugstring, optional

The slug of this cluster’s organization.

raw_cluster_slugstring, optional

The slug of this cluster’s raw configuration.

is_nat_enabledboolean, optional

Whether this cluster needs a NAT gateway or not.

Returns
civis.response.Response
  • idinteger

    The ID of this cluster.

  • organization_idstring

    The id of this cluster’s organization.

  • organization_namestring

    The name of this cluster’s organization.

  • organization_slugstring

    The slug of this cluster’s organization.

  • raw_cluster_slugstring

    The slug of this cluster’s raw configuration.

  • custom_partitionsboolean

    Whether this cluster has a custom partition configuration.

  • cluster_partitionslist::

    List of cluster partitions associated with this cluster. - cluster_partition_id : integer

    The ID of this cluster partition.

    • namestring

      The name of the cluster partition.

    • labelslist

      Labels associated with this partition.

    • instance_configslist::

      The instances configured for this cluster partition. - instance_config_id : integer

      The ID of this InstanceConfig.

      • instance_typestring

        An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

      • min_instancesinteger

        The minimum number of instances of that type in this cluster.

      • max_instancesinteger

        The maximum number of instances of that type in this cluster.

      • instance_max_memoryinteger

        The amount of memory (RAM) available to a single instance of that type in megabytes.

      • instance_max_cpuinteger

        The number of processor shares available to a single instance of that type in millicores.

      • instance_max_diskinteger

        The amount of disk available to a single instance of that type in gigabytes.

      • usage_statsdict::
        • pending_memory_requestedinteger

          The sum of memory requests (in MB) for pending deployments in this instance config.

        • pending_cpu_requestedinteger

          The sum of cpu requests (in millicores) for pending deployments in this instance config.

        • running_memory_requestedinteger

          The sum of memory requests (in MB) for running deployments in this instance config.

        • running_cpu_requestedinteger

          The sum of cpu requests (in millicores) for running deployments in this instance config.

        • pending_deploymentsinteger

          The number of pending deployments in this instance config.

        • running_deploymentsinteger

          The number of running deployments in this instance config.

    • default_instance_config_idinteger

      The id of the InstanceConfig that is the default for this partition.

  • is_nat_enabledboolean

    Whether this cluster needs a NAT gateway or not.

  • hoursnumber/float

    The number of hours used this month for this cluster.

post_kubernetes_partitions(id, instance_configs, name, labels)

Create a Cluster Partition for given cluster

Parameters
idinteger

The ID of the cluster which this partition belongs to.

instance_configslist::

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, c5.18xlarge, and p2.xlarge.

  • min_instancesinteger

    The minimum number of instances of that type in this cluster.

  • max_instancesinteger

    The maximum number of instances of that type in this cluster.

namestring

The name of the cluster partition.

labelslist

Labels associated with this partition.

Returns
civis.response.Response
  • cluster_partition_idinteger

    The ID of this cluster partition.

  • namestring

    The name of the cluster partition.

  • labelslist

    Labels associated with this partition.

  • instance_configslist::

    The instances configured for this cluster partition. - instance_config_id : integer

    The ID of this InstanceConfig.

    • instance_typestring

      An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and p2.xlarge.

    • min_instancesinteger

      The minimum number of instances of that type in this cluster.

    • max_instancesinteger

      The maximum number of instances of that type in this cluster.

    • instance_max_memoryinteger

      The amount of memory (RAM) available to a single instance of that type in megabytes.

    • instance_max_cpuinteger

      The number of processor shares available to a single instance of that type in millicores.

    • instance_max_diskinteger

      The amount of disk available to a single instance of that type in gigabytes.

    • usage_statsdict::
      • pending_memory_requestedinteger

        The sum of memory requests (in MB) for pending deployments in this instance config.

      • pending_cpu_requestedinteger

        The sum of cpu requests (in millicores) for pending deployments in this instance config.

      • running_memory_requestedinteger

        The sum of memory requests (in MB) for running deployments in this instance config.

      • running_cpu_requestedinteger

        The sum of cpu requests (in millicores) for running deployments in this instance config.

      • pending_deploymentsinteger

        The number of pending deployments in this instance config.

      • running_deploymentsinteger

        The number of running deployments in this instance config.

  • default_instance_config_idinteger

    The id of the InstanceConfig that is the default for this partition.

Credentials

class Credentials(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.credentials.list_types(...)

Methods

delete(id)

Delete a credential

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

get(id)

Get a credential

list(*[, type, remote_host_id, default, ...])

List credentials

list_dependencies(id, *[, user_id])

List dependent objects for this object

list_shares(id)

List users and groups permissioned on this object

list_types()

Get list of Credential Types

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

Update some attributes of a credential

post(type, username, password, *[, name, ...])

Create a credential

post_authenticate(url, remote_host_type, ...)

Authenticate against a remote host

post_temporary(id, *[, duration])

Generate a temporary credential for accessing S3

put(id, type, username, password, *[, name, ...])

Update an existing credential

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

Set the permissions groups has on this object

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

Set the permissions users have on this object

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

Transfer ownership of this object to another user

delete(id)

Delete a credential

Parameters
idinteger

The ID of the credential.

Returns
None

Response code 204: success

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

get(id)

Get a credential

Parameters
idinteger

The ID of the credential.

Returns
civis.response.Response
  • idinteger

    The ID of the credential.

  • namestring

    The name identifying the credential

  • typestring

    The credential’s type.

  • usernamestring

    The username for the credential.

  • descriptionstring

    A long description of the credential.

  • ownerstring

    The username of the user who this credential belongs to. Using user.username is preferred.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host associated with this credential.

  • remote_host_namestring

    The name of the remote host associated with this credential.

  • statestring

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstring/time

    The creation time for this credential.

  • updated_atstring/time

    The last modification time for this credential.

  • defaultboolean

    Whether or not the credential is a default. Only for Database credentials.

list(*, type='DEFAULT', remote_host_id='DEFAULT', default='DEFAULT', system_credentials='DEFAULT', users='DEFAULT', name='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List credentials

Parameters
typestring, optional

The type (or types) of credentials to return. One or more of: Amazon Web Services S3, Bitbucket, CASS/NCOA PAF, Certificate, Civis Platform, Custom, Database, Google, Github, Salesforce User, Salesforce Client, and TableauUser. Specify multiple values as a comma-separated list (e.g., “A,B”).

remote_host_idinteger, optional

The ID of the remote host associated with the credentials to return.

defaultboolean, optional

If true, will return a list with a single credential which is the current user’s default credential.

system_credentialsboolean, optional

If true, will only return system credentials. System credentials can only be created and viewed by Civis Admins.

usersstring, optional

A comma-separated list of user ids. If specified, returns set of credentials owned by the users that requesting user has at least read access on.

namestring, optional

If specified, will be used to filter the credentials returned. Will search across name and will return any full name containing the search string.

limitinteger, optional

Number of results to return. Defaults to its maximum of 1000.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of the credential.

  • namestring

    The name identifying the credential

  • typestring

    The credential’s type.

  • usernamestring

    The username for the credential.

  • descriptionstring

    A long description of the credential.

  • ownerstring

    The username of the user who this credential belongs to. Using user.username is preferred.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host associated with this credential.

  • remote_host_namestring

    The name of the remote host associated with this credential.

  • statestring

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstring/time

    The creation time for this credential.

  • updated_atstring/time

    The last modification time for this credential.

  • defaultboolean

    Whether or not the credential is a default. Only for Database credentials.

list_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

list_types()

Get list of Credential Types

Returns
civis.response.Response
  • typeslist

    list of acceptable credential types

patch(id, *, name='DEFAULT', type='DEFAULT', description='DEFAULT', username='DEFAULT', password='DEFAULT', remote_host_id='DEFAULT', user_id='DEFAULT', state='DEFAULT', system_credential='DEFAULT', default='DEFAULT')

Update some attributes of a credential

Parameters
idinteger

The ID of the credential.

namestring, optional

The name identifying the credential.

typestring, optional

The type of credential. Note: only these credentials can be created or edited via this API [“Amazon Web Services S3”, “CASS/NCOA PAF”, “Certificate”, “Civis Platform”, “Custom”, “Database”, “Google”, “Salesforce User”, “Salesforce Client”, “TableauUser”]

descriptionstring, optional

A long description of the credential.

usernamestring, optional

The username for the credential.

passwordstring, optional

The password for the credential.

remote_host_idinteger, optional

The ID of the remote host associated with the credential.

user_idinteger, optional

The ID of the user the credential is created for. Note: This attribute is only accepted if you are a Civis Admin User.

statestring, optional

The U.S. state for the credential. Only for VAN credentials.

system_credentialboolean, optional

Boolean flag that sets a credential to be a system credential. System credentials can only be created by Civis Admins and will create a credential owned by the Civis Robot user.

defaultboolean, optional

Whether or not the credential is a default. Only for Database credentials.

Returns
civis.response.Response
  • idinteger

    The ID of the credential.

  • namestring

    The name identifying the credential

  • typestring

    The credential’s type.

  • usernamestring

    The username for the credential.

  • descriptionstring

    A long description of the credential.

  • ownerstring

    The username of the user who this credential belongs to. Using user.username is preferred.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host associated with this credential.

  • remote_host_namestring

    The name of the remote host associated with this credential.

  • statestring

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstring/time

    The creation time for this credential.

  • updated_atstring/time

    The last modification time for this credential.

  • defaultboolean

    Whether or not the credential is a default. Only for Database credentials.

post(type, username, password, *, name='DEFAULT', description='DEFAULT', remote_host_id='DEFAULT', user_id='DEFAULT', state='DEFAULT', system_credential='DEFAULT', default='DEFAULT')

Create a credential

Parameters
typestring

The type of credential. Note: only these credentials can be created or edited via this API [“Amazon Web Services S3”, “CASS/NCOA PAF”, “Certificate”, “Civis Platform”, “Custom”, “Database”, “Google”, “Salesforce User”, “Salesforce Client”, “TableauUser”]

usernamestring

The username for the credential.

passwordstring

The password for the credential.

namestring, optional

The name identifying the credential.

descriptionstring, optional

A long description of the credential.

remote_host_idinteger, optional

The ID of the remote host associated with the credential.

user_idinteger, optional

The ID of the user the credential is created for. Note: This attribute is only accepted if you are a Civis Admin User.

statestring, optional

The U.S. state for the credential. Only for VAN credentials.

system_credentialboolean, optional

Boolean flag that sets a credential to be a system credential. System credentials can only be created by Civis Admins and will create a credential owned by the Civis Robot user.

defaultboolean, optional

Whether or not the credential is a default. Only for Database credentials.

Returns
civis.response.Response
  • idinteger

    The ID of the credential.

  • namestring

    The name identifying the credential

  • typestring

    The credential’s type.

  • usernamestring

    The username for the credential.

  • descriptionstring

    A long description of the credential.

  • ownerstring

    The username of the user who this credential belongs to. Using user.username is preferred.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host associated with this credential.

  • remote_host_namestring

    The name of the remote host associated with this credential.

  • statestring

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstring/time

    The creation time for this credential.

  • updated_atstring/time

    The last modification time for this credential.

  • defaultboolean

    Whether or not the credential is a default. Only for Database credentials.

post_authenticate(url, remote_host_type, username, password)

Authenticate against a remote host

Parameters
urlstring

The URL to your host.

remote_host_typestring

The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

usernamestring

The username for the credential.

passwordstring

The password for the credential.

Returns
civis.response.Response
  • idinteger

    The ID of the credential.

  • namestring

    The name identifying the credential

  • typestring

    The credential’s type.

  • usernamestring

    The username for the credential.

  • descriptionstring

    A long description of the credential.

  • ownerstring

    The username of the user who this credential belongs to. Using user.username is preferred.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host associated with this credential.

  • remote_host_namestring

    The name of the remote host associated with this credential.

  • statestring

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstring/time

    The creation time for this credential.

  • updated_atstring/time

    The last modification time for this credential.

  • defaultboolean

    Whether or not the credential is a default. Only for Database credentials.

post_temporary(id, *, duration='DEFAULT')

Generate a temporary credential for accessing S3

Parameters
idinteger

The ID of the credential.

durationinteger, 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
civis.response.Response
  • access_keystring

    The identifier of the credential.

  • secret_access_keystring

    The secret part of the credential.

  • session_tokenstring

    The session token identifier.

put(id, type, username, password, *, name='DEFAULT', description='DEFAULT', remote_host_id='DEFAULT', user_id='DEFAULT', state='DEFAULT', system_credential='DEFAULT', default='DEFAULT')

Update an existing credential

Parameters
idinteger

The ID of the credential.

typestring

The type of credential. Note: only these credentials can be created or edited via this API [“Amazon Web Services S3”, “CASS/NCOA PAF”, “Certificate”, “Civis Platform”, “Custom”, “Database”, “Google”, “Salesforce User”, “Salesforce Client”, “TableauUser”]

usernamestring

The username for the credential.

passwordstring

The password for the credential.

namestring, optional

The name identifying the credential.

descriptionstring, optional

A long description of the credential.

remote_host_idinteger, optional

The ID of the remote host associated with the credential.

user_idinteger, optional

The ID of the user the credential is created for. Note: This attribute is only accepted if you are a Civis Admin User.

statestring, optional

The U.S. state for the credential. Only for VAN credentials.

system_credentialboolean, optional

Boolean flag that sets a credential to be a system credential. System credentials can only be created by Civis Admins and will create a credential owned by the Civis Robot user.

defaultboolean, optional

Whether or not the credential is a default. Only for Database credentials.

Returns
civis.response.Response
  • idinteger

    The ID of the credential.

  • namestring

    The name identifying the credential

  • typestring

    The credential’s type.

  • usernamestring

    The username for the credential.

  • descriptionstring

    A long description of the credential.

  • ownerstring

    The username of the user who this credential belongs to. Using user.username is preferred.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host associated with this credential.

  • remote_host_namestring

    The name of the remote host associated with this credential.

  • statestring

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstring/time

    The creation time for this credential.

  • updated_atstring/time

    The last modification time for this credential.

  • defaultboolean

    Whether or not the credential is a default. Only for Database credentials.

put_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_transfer(id, user_id, include_dependencies, *, email_body='DEFAULT', send_email='DEFAULT')

Transfer ownership of this object to another user

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

ID of target user

include_dependenciesboolean

Whether or not to give manage permissions on all dependencies

email_bodystring, optional

Custom body text for e-mail sent on transfer.

send_emailboolean, optional

Send email to the target user of the transfer?

Returns
civis.response.Response
  • dependencieslist::

    Dependent objects for this object - object_type : string

    Dependent object type

    • fco_typestring

      Human readable dependent object type

    • idinteger

      Dependent object ID

    • namestring

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

    • permission_levelstring

      Permission level of target user (not user’s groups) for dependent object, or null if no target user

    • sharedboolean

      Whether dependent object was successfully shared with target user

Databases

class Databases(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.databases.list(...)

Methods

get(id)

Show database information

get_whitelist_ips(id, whitelisted_ip_id)

View details about a whitelisted IP

list()

List databases

list_advanced_settings(id)

Get the advanced settings for this database

list_schemas(id, *[, name, credential_id])

List schemas in this database

list_whitelist_ips(id)

List whitelisted IPs for the specified database

patch_advanced_settings(id, *[, ...])

Update the advanced settings for this database

post_schemas_scan(id, schema, *[, ...])

Creates and enqueues a schema scanner job

put_advanced_settings(id, export_caching_enabled)

Edit the advanced settings for this database

get(id)

Show database information

Parameters
idinteger

The ID for the database.

Returns
civis.response.Response
  • idinteger

    The ID for the database.

  • namestring

    The name of the database.

  • adapterstring

    The type of the database.

get_whitelist_ips(id, whitelisted_ip_id)

View details about a whitelisted IP

Parameters
idinteger

The ID of the database this rule is applied to.

whitelisted_ip_idinteger

The ID of this whitelisted IP address.

Returns
civis.response.Response
  • idinteger

    The ID of this whitelisted IP address.

  • remote_host_idinteger

    The ID of the database this rule is applied to.

  • security_group_idstring

    The ID of the security group this rule is applied to.

  • subnet_maskstring

    The subnet mask that is allowed by this rule.

  • authorized_bystring

    The user who authorized this rule.

  • is_activeboolean

    True if the rule is applied, false if it has been revoked.

  • created_atstring/time

    The time this rule was created.

  • updated_atstring/time

    The time this rule was last updated.

list()

List databases

Returns
civis.response.Response
  • idinteger

    The ID for the database.

  • namestring

    The name of the database.

  • adapterstring

    The type of the database.

list_advanced_settings(id)

Get the advanced settings for this database

Parameters
idinteger

The ID of the database this advanced settings object belongs to.

Returns
civis.response.Response
  • export_caching_enabledboolean

    Whether or not caching is enabled for export jobs run on this database server.

list_schemas(id, *, name='DEFAULT', credential_id='DEFAULT')

List schemas in this database

Parameters
idinteger

The ID of the database.

namestring, optional

If specified, will be used to filter the schemas returned. Substring matching is supported (e.g., “name=schema” will return both “schema1” and “schema2”).

credential_idinteger, optional

If provided, schemas will be filtered based on the given credential.

Returns
civis.response.Response
  • schemastring

    The name of a schema.

list_whitelist_ips(id)

List whitelisted IPs for the specified database

Parameters
idinteger

The ID for the database.

Returns
civis.response.Response
  • idinteger

    The ID of this whitelisted IP address.

  • remote_host_idinteger

    The ID of the database this rule is applied to.

  • security_group_idstring

    The ID of the security group this rule is applied to.

  • subnet_maskstring

    The subnet mask that is allowed by this rule.

  • created_atstring/time

    The time this rule was created.

  • updated_atstring/time

    The time this rule was last updated.

patch_advanced_settings(id, *, export_caching_enabled='DEFAULT')

Update the advanced settings for this database

Parameters
idinteger

The ID of the database this advanced settings object belongs to.

export_caching_enabledboolean, optional

Whether or not caching is enabled for export jobs run on this database server.

Returns
civis.response.Response
  • export_caching_enabledboolean

    Whether or not caching is enabled for export jobs run on this database server.

post_schemas_scan(id, schema, *, stats_priority='DEFAULT')

Creates and enqueues a schema scanner job

Parameters
idinteger

The ID of the database.

schemastring

The name of the schema.

stats_prioritystring, 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
civis.response.Response
  • job_idinteger

    The ID of the job created.

  • run_idinteger

    The ID of the run created.

put_advanced_settings(id, export_caching_enabled)

Edit the advanced settings for this database

Parameters
idinteger

The ID of the database this advanced settings object belongs to.

export_caching_enabledboolean

Whether or not caching is enabled for export jobs run on this database server.

Returns
civis.response.Response
  • export_caching_enabledboolean

    Whether or not caching is enabled for export jobs run on this database server.

Endpoints

class Endpoints(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.endpoints.list(...)

Methods

list()

List API endpoints

list()

List API endpoints

Returns
None

Response code 200: success

Enhancements

class Enhancements(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.enhancements.post_civis_data_match(...)

Methods

delete_cass_ncoa_projects(id, project_id)

Remove a CASS/NCOA Enhancement from a project

delete_cass_ncoa_runs(id, run_id)

Cancel a run

delete_cass_ncoa_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_cass_ncoa_shares_users(id, user_id)

Revoke the permissions a user has on this object

delete_civis_data_match_projects(id, project_id)

Remove a Civis Data Match Enhancement from a project

delete_civis_data_match_runs(id, run_id)

Cancel a run

delete_civis_data_match_shares_groups(id, ...)

Revoke the permissions a group has on this object

delete_civis_data_match_shares_users(id, user_id)

Revoke the permissions a user has on this object

delete_geocode_projects(id, project_id)

Remove a Geocode Enhancement from a project

delete_geocode_runs(id, run_id)

Cancel a run

delete_geocode_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_geocode_shares_users(id, user_id)

Revoke the permissions a user has on this object

get_cass_ncoa(id)

Get a CASS/NCOA Enhancement

get_cass_ncoa_runs(id, run_id)

Check status of a run

get_civis_data_match(id)

Get a Civis Data Match Enhancement

get_civis_data_match_runs(id, run_id)

Check status of a run

get_geocode(id)

Get a Geocode Enhancement

get_geocode_runs(id, run_id)

Check status of a run

list(*[, type, author, status, archived, ...])

List Enhancements

list_cass_ncoa_dependencies(id, *[, user_id])

List dependent objects for this object

list_cass_ncoa_projects(id, *[, hidden])

List the projects a CASS/NCOA Enhancement belongs to

list_cass_ncoa_runs(id, *[, limit, ...])

List runs for the given cass_ncoa

list_cass_ncoa_runs_logs(id, run_id, *[, ...])

Get the logs for a run

list_cass_ncoa_runs_outputs(id, run_id, *[, ...])

List the outputs for a run

list_cass_ncoa_shares(id)

List users and groups permissioned on this object

list_civis_data_match_dependencies(id, *[, ...])

List dependent objects for this object

list_civis_data_match_projects(id, *[, hidden])

List the projects a Civis Data Match Enhancement belongs to

list_civis_data_match_runs(id, *[, limit, ...])

List runs for the given civis_data_match

list_civis_data_match_runs_logs(id, run_id, *)

Get the logs for a run

list_civis_data_match_runs_outputs(id, run_id, *)

List the outputs for a run

list_civis_data_match_shares(id)

List users and groups permissioned on this object

list_field_mapping()

List the fields in a field mapping for Civis Data Match, Data Unification, and Table Deduplication jobs

list_geocode_dependencies(id, *[, user_id])

List dependent objects for this object

list_geocode_projects(id, *[, hidden])

List the projects a Geocode Enhancement belongs to

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

List runs for the given geocode

list_geocode_runs_logs(id, run_id, *[, ...])

Get the logs for a run

list_geocode_runs_outputs(id, run_id, *[, ...])

List the outputs for a run

list_geocode_shares(id)

List users and groups permissioned on this object

list_types()

List available enhancement types

patch_cass_ncoa(id, *[, name, schedule, ...])

Update some attributes of this CASS/NCOA Enhancement

patch_civis_data_match(id, *[, name, ...])

Update some attributes of this Civis Data Match Enhancement

patch_geocode(id, *[, name, schedule, ...])

Update some attributes of this Geocode Enhancement

post_cass_ncoa(name, source, *[, schedule, ...])

Create a CASS/NCOA Enhancement

post_cass_ncoa_cancel(id)

Cancel a run

post_cass_ncoa_runs(id)

Start a run

post_civis_data_match(name, ...[, schedule, ...])

Create a Civis Data Match Enhancement

post_civis_data_match_cancel(id)

Cancel a run

post_civis_data_match_clone(id, *[, ...])

Clone this Civis Data Match Enhancement

post_civis_data_match_runs(id)

Start a run

post_geocode(name, remote_host_id, ...[, ...])

Create a Geocode Enhancement

post_geocode_cancel(id)

Cancel a run

post_geocode_runs(id)

Start a run

put_cass_ncoa(id, name, source, *[, ...])

Replace all attributes of this CASS/NCOA Enhancement

put_cass_ncoa_archive(id, status)

Update the archive status of this object

put_cass_ncoa_projects(id, project_id)

Add a CASS/NCOA Enhancement to a project

put_cass_ncoa_shares_groups(id, group_ids, ...)

Set the permissions groups has on this object

put_cass_ncoa_shares_users(id, user_ids, ...)

Set the permissions users have on this object

put_cass_ncoa_transfer(id, user_id, ...[, ...])

Transfer ownership of this object to another user

put_civis_data_match(id, name, ...[, ...])

Replace all attributes of this Civis Data Match Enhancement

put_civis_data_match_archive(id, status)

Update the archive status of this object

put_civis_data_match_projects(id, project_id)

Add a Civis Data Match Enhancement to a project

put_civis_data_match_shares_groups(id, ...)

Set the permissions groups has on this object

put_civis_data_match_shares_users(id, ...[, ...])

Set the permissions users have on this object

put_civis_data_match_transfer(id, user_id, ...)

Transfer ownership of this object to another user

put_geocode(id, name, remote_host_id, ...[, ...])

Replace all attributes of this Geocode Enhancement

put_geocode_archive(id, status)

Update the archive status of this object

put_geocode_projects(id, project_id)

Add a Geocode Enhancement to a project

put_geocode_shares_groups(id, group_ids, ...)

Set the permissions groups has on this object

put_geocode_shares_users(id, user_ids, ...)

Set the permissions users have on this object

put_geocode_transfer(id, user_id, ...[, ...])

Transfer ownership of this object to another user

delete_cass_ncoa_projects(id, project_id)

Remove a CASS/NCOA Enhancement from a project

Parameters
idinteger

The ID of the CASS/NCOA Enhancement.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

delete_cass_ncoa_runs(id, run_id)

Cancel a run

Parameters
idinteger

The ID of the cass_ncoa.

run_idinteger

The ID of the run.

Returns
None

Response code 202: success

delete_cass_ncoa_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_cass_ncoa_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

delete_civis_data_match_projects(id, project_id)

Remove a Civis Data Match Enhancement from a project

Parameters
idinteger

The ID of the Civis Data Match Enhancement.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

delete_civis_data_match_runs(id, run_id)

Cancel a run

Parameters
idinteger

The ID of the civis_data_match.

run_idinteger

The ID of the run.

Returns
None

Response code 202: success

delete_civis_data_match_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_civis_data_match_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

delete_geocode_projects(id, project_id)

Remove a Geocode Enhancement from a project

Parameters
idinteger

The ID of the Geocode Enhancement.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

delete_geocode_runs(id, run_id)

Cancel a run

Parameters
idinteger

The ID of the geocode.

run_idinteger

The ID of the run.

Returns
None

Response code 202: success

delete_geocode_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_geocode_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

get_cass_ncoa(id)

Get a CASS/NCOA Enhancement

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • sourcedict::
    • database_tabledict::
      • schemastring

        The schema name of the source table.

      • tablestring

        The name of the source table.

      • remote_host_idinteger

        The ID of the database host for the table.

      • credential_idinteger

        The id of the credentials to be used when performing the enhancement.

      • multipart_keylist

        The source table primary key.

  • destinationdict::
    • database_tabledict::
      • schemastring

        The schema name for the output data.

      • tablestring

        The table name for the output data.

  • column_mappingdict::
    • address1string

      The first address line.

    • address2string

      The second address line.

    • citystring

      The city of an address.

    • statestring

      The state of an address.

    • zipstring

      The zip code of an address.

    • namestring

      The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

    • companystring

      The name of the company located at this address.

  • use_default_column_mappingboolean

    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_ncoaboolean

    Whether to update addresses for records matching the National Change of Address (NCOA) database.

  • ncoa_credential_idinteger

    Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

  • output_levelstring

    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_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

get_cass_ncoa_runs(id, run_id)

Check status of a run

Parameters
idinteger

The ID of the cass_ncoa.

run_idinteger

The ID of the run.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • cass_ncoa_idinteger

    The ID of the cass_ncoa.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

get_civis_data_match(id)

Get a Civis Data Match Enhancement

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • my_permission_levelstring

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

  • input_field_mappingdict

    The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

  • input_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • match_target_idinteger

    The ID of the Civis Data match target. See /match_targets for IDs.

  • output_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • max_matchesinteger

    The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

  • thresholdnumber/float

    The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

  • archivedboolean

    Whether the Civis Data Match Job has been archived.

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

get_civis_data_match_runs(id, run_id)

Check status of a run

Parameters
idinteger

The ID of the civis_data_match.

run_idinteger

The ID of the run.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • civis_data_match_idinteger

    The ID of the civis_data_match.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

get_geocode(id)

Get a Geocode Enhancement

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host.

  • credential_idinteger

    The ID of the remote host credential.

  • source_schema_and_tablestring

    The source database schema and table.

  • multipart_keylist

    The source table primary key.

  • limiting_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • target_schemastring

    The output table schema.

  • target_tablestring

    The output table name.

  • countrystring

    The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

  • providerstring

    The geocoding provider; one of postgis, nominatim, and geocoder_ca.

  • output_addressboolean

    Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

get_geocode_runs(id, run_id)

Check status of a run

Parameters
idinteger

The ID of the geocode.

run_idinteger

The ID of the run.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • geocode_idinteger

    The ID of the geocode.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list(*, type='DEFAULT', author='DEFAULT', status='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List Enhancements

Parameters
typestring, optional

If specified, return items of these types.

authorstring, optional

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

statusstring, optional

If specified, returns items with one of these statuses. It accepts a comma- separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.

archivedstring, optional

The archival status of the requested item(s).

limitinteger, optional

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

page_numinteger, optional

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

orderstring, 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_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • archivedstring

    The archival status of the requested item(s).

list_cass_ncoa_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_cass_ncoa_projects(id, *, hidden='DEFAULT')

List the projects a CASS/NCOA Enhancement belongs to

Parameters
idinteger

The ID of the CASS/NCOA Enhancement.

hiddenboolean, optional

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

Returns
civis.response.Response
  • idinteger

    The ID for this project.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • namestring

    The name of this project.

  • descriptionstring

    A description of the project.

  • userslist::

    Users who can see the project. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • auto_share : boolean

  • created_at : string/time

  • updated_at : string/time

  • archivedstring

    The archival status of the requested item(s).

list_cass_ncoa_runs(id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List runs for the given cass_ncoa

Parameters
idinteger

The ID of the cass_ncoa.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of the run.

  • cass_ncoa_idinteger

    The ID of the cass_ncoa.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list_cass_ncoa_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the cass_ncoa.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_cass_ncoa_runs_outputs(id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List the outputs for a run

Parameters
idinteger

The ID of the job.

run_idinteger

The ID of the run.

limitinteger, optional

Number of results to return. Defaults to its maximum of 50.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • object_typestring

    The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue

  • object_idinteger

    The ID of the output.

  • namestring

    The name of the output.

  • linkstring

    The hypermedia link to the output.

  • value : string

list_cass_ncoa_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

list_civis_data_match_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_civis_data_match_projects(id, *, hidden='DEFAULT')

List the projects a Civis Data Match Enhancement belongs to

Parameters
idinteger

The ID of the Civis Data Match Enhancement.

hiddenboolean, optional

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

Returns
civis.response.Response
  • idinteger

    The ID for this project.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • namestring

    The name of this project.

  • descriptionstring

    A description of the project.

  • userslist::

    Users who can see the project. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • auto_share : boolean

  • created_at : string/time

  • updated_at : string/time

  • archivedstring

    The archival status of the requested item(s).

list_civis_data_match_runs(id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List runs for the given civis_data_match

Parameters
idinteger

The ID of the civis_data_match.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of the run.

  • civis_data_match_idinteger

    The ID of the civis_data_match.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list_civis_data_match_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the civis_data_match.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_civis_data_match_runs_outputs(id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List the outputs for a run

Parameters
idinteger

The ID of the job.

run_idinteger

The ID of the run.

limitinteger, optional

Number of results to return. Defaults to its maximum of 50.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • object_typestring

    The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue

  • object_idinteger

    The ID of the output.

  • namestring

    The name of the output.

  • linkstring

    The hypermedia link to the output.

  • value : string

list_civis_data_match_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

list_field_mapping()

List the fields in a field mapping for Civis Data Match, Data Unification, and Table Deduplication jobs

Returns
civis.response.Response
  • fieldstring

    The name of the field.

  • descriptionstring

    The description of the field.

list_geocode_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_geocode_projects(id, *, hidden='DEFAULT')

List the projects a Geocode Enhancement belongs to

Parameters
idinteger

The ID of the Geocode Enhancement.

hiddenboolean, optional

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

Returns
civis.response.Response
  • idinteger

    The ID for this project.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • namestring

    The name of this project.

  • descriptionstring

    A description of the project.

  • userslist::

    Users who can see the project. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • auto_share : boolean

  • created_at : string/time

  • updated_at : string/time

  • archivedstring

    The archival status of the requested item(s).

list_geocode_runs(id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List runs for the given geocode

Parameters
idinteger

The ID of the geocode.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of the run.

  • geocode_idinteger

    The ID of the geocode.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list_geocode_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the geocode.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_geocode_runs_outputs(id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List the outputs for a run

Parameters
idinteger

The ID of the job.

run_idinteger

The ID of the run.

limitinteger, optional

Number of results to return. Defaults to its maximum of 50.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • object_typestring

    The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue

  • object_idinteger

    The ID of the output.

  • namestring

    The name of the output.

  • linkstring

    The hypermedia link to the output.

  • value : string

list_geocode_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

list_types()

List available enhancement types

Returns
civis.response.Response
  • namestring

    The name of the type.

patch_cass_ncoa(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
idinteger

The ID for the enhancement.

namestring, optional

The name of the enhancement job.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

sourcedict, optional::
  • database_tabledict::
    • schemastring

      The schema name of the source table.

    • tablestring

      The name of the source table.

    • remote_host_idinteger

      The ID of the database host for the table.

    • credential_idinteger

      The id of the credentials to be used when performing the enhancement.

    • multipart_keylist

      The source table primary key.

destinationdict, optional::
  • database_tabledict::
    • schemastring

      The schema name for the output data.

    • tablestring

      The table name for the output data.

column_mappingdict, optional::
  • address1string

    The first address line.

  • address2string

    The second address line.

  • citystring

    The city of an address.

  • statestring

    The state of an address.

  • zipstring

    The zip code of an address.

  • namestring

    The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

  • companystring

    The name of the company located at this address.

use_default_column_mappingboolean, 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_ncoaboolean, optional

Whether to update addresses for records matching the National Change of Address (NCOA) database.

ncoa_credential_idinteger, optional

Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

output_levelstring, 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_sqlstring, optional

The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • sourcedict::
    • database_tabledict::
      • schemastring

        The schema name of the source table.

      • tablestring

        The name of the source table.

      • remote_host_idinteger

        The ID of the database host for the table.

      • credential_idinteger

        The id of the credentials to be used when performing the enhancement.

      • multipart_keylist

        The source table primary key.

  • destinationdict::
    • database_tabledict::
      • schemastring

        The schema name for the output data.

      • tablestring

        The table name for the output data.

  • column_mappingdict::
    • address1string

      The first address line.

    • address2string

      The second address line.

    • citystring

      The city of an address.

    • statestring

      The state of an address.

    • zipstring

      The zip code of an address.

    • namestring

      The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

    • companystring

      The name of the company located at this address.

  • use_default_column_mappingboolean

    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_ncoaboolean

    Whether to update addresses for records matching the National Change of Address (NCOA) database.

  • ncoa_credential_idinteger

    Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

  • output_levelstring

    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_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

patch_civis_data_match(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
idinteger

The ID for the enhancement.

namestring, optional

The name of the enhancement job.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

input_field_mappingdict, optional

The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

input_tabledict, optional::
  • database_namestring

    The Redshift database name for the table.

  • schemastring

    The schema name for the table.

  • tablestring

    The table name.

match_target_idinteger, optional

The ID of the Civis Data match target. See /match_targets for IDs.

output_tabledict, optional::
  • database_namestring

    The Redshift database name for the table.

  • schemastring

    The schema name for the table.

  • tablestring

    The table name.

max_matchesinteger, optional

The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

thresholdnumber/float, optional

The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

archivedboolean, optional

Whether the Civis Data Match Job has been archived.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • my_permission_levelstring

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

  • input_field_mappingdict

    The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

  • input_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • match_target_idinteger

    The ID of the Civis Data match target. See /match_targets for IDs.

  • output_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • max_matchesinteger

    The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

  • thresholdnumber/float

    The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

  • archivedboolean

    Whether the Civis Data Match Job has been archived.

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

patch_geocode(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
idinteger

The ID for the enhancement.

namestring, optional

The name of the enhancement job.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

remote_host_idinteger, optional

The ID of the remote host.

credential_idinteger, optional

The ID of the remote host credential.

source_schema_and_tablestring, optional

The source database schema and table.

multipart_keylist, optional

The source table primary key.

limiting_sqlstring, optional

The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

target_schemastring, optional

The output table schema.

target_tablestring, optional

The output table name.

countrystring, optional

The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

providerstring, optional

The geocoding provider; one of postgis, nominatim, and geocoder_ca.

output_addressboolean, optional

Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host.

  • credential_idinteger

    The ID of the remote host credential.

  • source_schema_and_tablestring

    The source database schema and table.

  • multipart_keylist

    The source table primary key.

  • limiting_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • target_schemastring

    The output table schema.

  • target_tablestring

    The output table name.

  • countrystring

    The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

  • providerstring

    The geocoding provider; one of postgis, nominatim, and geocoder_ca.

  • output_addressboolean

    Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

post_cass_ncoa(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
namestring

The name of the enhancement job.

sourcedict::
  • database_tabledict::
    • schemastring

      The schema name of the source table.

    • tablestring

      The name of the source table.

    • remote_host_idinteger

      The ID of the database host for the table.

    • credential_idinteger

      The id of the credentials to be used when performing the enhancement.

    • multipart_keylist

      The source table primary key.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

destinationdict, optional::
  • database_tabledict::
    • schemastring

      The schema name for the output data.

    • tablestring

      The table name for the output data.

column_mappingdict, optional::
  • address1string

    The first address line.

  • address2string

    The second address line.

  • citystring

    The city of an address.

  • statestring

    The state of an address.

  • zipstring

    The zip code of an address.

  • namestring

    The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

  • companystring

    The name of the company located at this address.

use_default_column_mappingboolean, 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_ncoaboolean, optional

Whether to update addresses for records matching the National Change of Address (NCOA) database.

ncoa_credential_idinteger, optional

Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

output_levelstring, 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_sqlstring, optional

The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • sourcedict::
    • database_tabledict::
      • schemastring

        The schema name of the source table.

      • tablestring

        The name of the source table.

      • remote_host_idinteger

        The ID of the database host for the table.

      • credential_idinteger

        The id of the credentials to be used when performing the enhancement.

      • multipart_keylist

        The source table primary key.

  • destinationdict::
    • database_tabledict::
      • schemastring

        The schema name for the output data.

      • tablestring

        The table name for the output data.

  • column_mappingdict::
    • address1string

      The first address line.

    • address2string

      The second address line.

    • citystring

      The city of an address.

    • statestring

      The state of an address.

    • zipstring

      The zip code of an address.

    • namestring

      The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

    • companystring

      The name of the company located at this address.

  • use_default_column_mappingboolean

    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_ncoaboolean

    Whether to update addresses for records matching the National Change of Address (NCOA) database.

  • ncoa_credential_idinteger

    Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

  • output_levelstring

    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_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

post_cass_ncoa_cancel(id)

Cancel a run

Parameters
idinteger

The ID of the job.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • statestring

    The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

post_cass_ncoa_runs(id)

Start a run

Parameters
idinteger

The ID of the cass_ncoa.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • cass_ncoa_idinteger

    The ID of the cass_ncoa.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

post_civis_data_match(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
namestring

The name of the enhancement job.

input_field_mappingdict

The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

input_tabledict::
  • database_namestring

    The Redshift database name for the table.

  • schemastring

    The schema name for the table.

  • tablestring

    The table name.

match_target_idinteger

The ID of the Civis Data match target. See /match_targets for IDs.

output_tabledict::
  • database_namestring

    The Redshift database name for the table.

  • schemastring

    The schema name for the table.

  • tablestring

    The table name.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

max_matchesinteger, optional

The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

thresholdnumber/float, optional

The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

archivedboolean, optional

Whether the Civis Data Match Job has been archived.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • my_permission_levelstring

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

  • input_field_mappingdict

    The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

  • input_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • match_target_idinteger

    The ID of the Civis Data match target. See /match_targets for IDs.

  • output_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • max_matchesinteger

    The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

  • thresholdnumber/float

    The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

  • archivedboolean

    Whether the Civis Data Match Job has been archived.

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

post_civis_data_match_cancel(id)

Cancel a run

Parameters
idinteger

The ID of the job.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • statestring

    The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

post_civis_data_match_clone(id, *, clone_schedule='DEFAULT', clone_triggers='DEFAULT', clone_notifications='DEFAULT')

Clone this Civis Data Match Enhancement

Parameters
idinteger

The ID for the enhancement.

clone_scheduleboolean, optional

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

clone_triggersboolean, optional

If true, also copy the triggers to the new enhancement.

clone_notificationsboolean, optional

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

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • my_permission_levelstring

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

  • input_field_mappingdict

    The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

  • input_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • match_target_idinteger

    The ID of the Civis Data match target. See /match_targets for IDs.

  • output_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • max_matchesinteger

    The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

  • thresholdnumber/float

    The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

  • archivedboolean

    Whether the Civis Data Match Job has been archived.

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

post_civis_data_match_runs(id)

Start a run

Parameters
idinteger

The ID of the civis_data_match.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • civis_data_match_idinteger

    The ID of the civis_data_match.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

post_geocode(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
namestring

The name of the enhancement job.

remote_host_idinteger

The ID of the remote host.

credential_idinteger

The ID of the remote host credential.

source_schema_and_tablestring

The source database schema and table.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

multipart_keylist, optional

The source table primary key.

limiting_sqlstring, optional

The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

target_schemastring, optional

The output table schema.

target_tablestring, optional

The output table name.

countrystring, optional

The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

providerstring, optional

The geocoding provider; one of postgis, nominatim, and geocoder_ca.

output_addressboolean, optional

Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host.

  • credential_idinteger

    The ID of the remote host credential.

  • source_schema_and_tablestring

    The source database schema and table.

  • multipart_keylist

    The source table primary key.

  • limiting_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • target_schemastring

    The output table schema.

  • target_tablestring

    The output table name.

  • countrystring

    The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

  • providerstring

    The geocoding provider; one of postgis, nominatim, and geocoder_ca.

  • output_addressboolean

    Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

post_geocode_cancel(id)

Cancel a run

Parameters
idinteger

The ID of the job.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • statestring

    The state of the run, one of ‘queued’, ‘running’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

post_geocode_runs(id)

Start a run

Parameters
idinteger

The ID of the geocode.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • geocode_idinteger

    The ID of the geocode.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

put_cass_ncoa(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
idinteger

The ID for the enhancement.

namestring

The name of the enhancement job.

sourcedict::
  • database_tabledict::
    • schemastring

      The schema name of the source table.

    • tablestring

      The name of the source table.

    • remote_host_idinteger

      The ID of the database host for the table.

    • credential_idinteger

      The id of the credentials to be used when performing the enhancement.

    • multipart_keylist

      The source table primary key.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

destinationdict, optional::
  • database_tabledict::
    • schemastring

      The schema name for the output data.

    • tablestring

      The table name for the output data.

column_mappingdict, optional::
  • address1string

    The first address line.

  • address2string

    The second address line.

  • citystring

    The city of an address.

  • statestring

    The state of an address.

  • zipstring

    The zip code of an address.

  • namestring

    The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

  • companystring

    The name of the company located at this address.

use_default_column_mappingboolean, 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_ncoaboolean, optional

Whether to update addresses for records matching the National Change of Address (NCOA) database.

ncoa_credential_idinteger, optional

Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

output_levelstring, 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_sqlstring, optional

The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • sourcedict::
    • database_tabledict::
      • schemastring

        The schema name of the source table.

      • tablestring

        The name of the source table.

      • remote_host_idinteger

        The ID of the database host for the table.

      • credential_idinteger

        The id of the credentials to be used when performing the enhancement.

      • multipart_keylist

        The source table primary key.

  • destinationdict::
    • database_tabledict::
      • schemastring

        The schema name for the output data.

      • tablestring

        The table name for the output data.

  • column_mappingdict::
    • address1string

      The first address line.

    • address2string

      The second address line.

    • citystring

      The city of an address.

    • statestring

      The state of an address.

    • zipstring

      The zip code of an address.

    • namestring

      The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

    • companystring

      The name of the company located at this address.

  • use_default_column_mappingboolean

    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_ncoaboolean

    Whether to update addresses for records matching the National Change of Address (NCOA) database.

  • ncoa_credential_idinteger

    Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

  • output_levelstring

    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_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

put_cass_ncoa_archive(id, status)

Update the archive status of this object

Parameters
idinteger

The ID of the object.

statusboolean

The desired archived status of the object.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • sourcedict::
    • database_tabledict::
      • schemastring

        The schema name of the source table.

      • tablestring

        The name of the source table.

      • remote_host_idinteger

        The ID of the database host for the table.

      • credential_idinteger

        The id of the credentials to be used when performing the enhancement.

      • multipart_keylist

        The source table primary key.

  • destinationdict::
    • database_tabledict::
      • schemastring

        The schema name for the output data.

      • tablestring

        The table name for the output data.

  • column_mappingdict::
    • address1string

      The first address line.

    • address2string

      The second address line.

    • citystring

      The city of an address.

    • statestring

      The state of an address.

    • zipstring

      The zip code of an address.

    • namestring

      The full name of the resident at this address. If needed, separate multiple columns with +, e.g. first_name+last_name

    • companystring

      The name of the company located at this address.

  • use_default_column_mappingboolean

    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_ncoaboolean

    Whether to update addresses for records matching the National Change of Address (NCOA) database.

  • ncoa_credential_idinteger

    Credential to use when performing NCOA updates. Required if ‘performNcoa’ is true.

  • output_levelstring

    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_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

put_cass_ncoa_projects(id, project_id)

Add a CASS/NCOA Enhancement to a project

Parameters
idinteger

The ID of the CASS/NCOA Enhancement.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

put_cass_ncoa_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_cass_ncoa_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_cass_ncoa_transfer(id, user_id, include_dependencies, *, email_body='DEFAULT', send_email='DEFAULT')

Transfer ownership of this object to another user

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

ID of target user

include_dependenciesboolean

Whether or not to give manage permissions on all dependencies

email_bodystring, optional

Custom body text for e-mail sent on transfer.

send_emailboolean, optional

Send email to the target user of the transfer?

Returns
civis.response.Response
  • dependencieslist::

    Dependent objects for this object - object_type : string

    Dependent object type

    • fco_typestring

      Human readable dependent object type

    • idinteger

      Dependent object ID

    • namestring

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

    • permission_levelstring

      Permission level of target user (not user’s groups) for dependent object, or null if no target user

    • sharedboolean

      Whether dependent object was successfully shared with target user

put_civis_data_match(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
idinteger

The ID for the enhancement.

namestring

The name of the enhancement job.

input_field_mappingdict

The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

input_tabledict::
  • database_namestring

    The Redshift database name for the table.

  • schemastring

    The schema name for the table.

  • tablestring

    The table name.

match_target_idinteger

The ID of the Civis Data match target. See /match_targets for IDs.

output_tabledict::
  • database_namestring

    The Redshift database name for the table.

  • schemastring

    The schema name for the table.

  • tablestring

    The table name.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

max_matchesinteger, optional

The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

thresholdnumber/float, optional

The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

archivedboolean, optional

Whether the Civis Data Match Job has been archived.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • my_permission_levelstring

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

  • input_field_mappingdict

    The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

  • input_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • match_target_idinteger

    The ID of the Civis Data match target. See /match_targets for IDs.

  • output_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • max_matchesinteger

    The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

  • thresholdnumber/float

    The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

  • archivedboolean

    Whether the Civis Data Match Job has been archived.

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

put_civis_data_match_archive(id, status)

Update the archive status of this object

Parameters
idinteger

The ID of the object.

statusboolean

The desired archived status of the object.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • my_permission_levelstring

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

  • input_field_mappingdict

    The field (i.e., column) mapping for the input table. See https://api.civisanalytics.com/enhancements/field-mapping for a list of valid field types and descriptions. Each field type should be mapped to a string specifying a column name in the input table. For field types that support multiple values (e.g., the “phone” field), a list of column names can be provided (e.g., {“phone”: [“home_phone”, “mobile_phone”], …}).

  • input_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • match_target_idinteger

    The ID of the Civis Data match target. See /match_targets for IDs.

  • output_tabledict::
    • database_namestring

      The Redshift database name for the table.

    • schemastring

      The schema name for the table.

    • tablestring

      The table name.

  • max_matchesinteger

    The maximum number of matches per record in the input table to return. Must be between 0 and 10. 0 returns all matches.

  • thresholdnumber/float

    The score threshold (between 0 and 1). Matches below this threshold will not be returned. The default value is 0.5.

  • archivedboolean

    Whether the Civis Data Match Job has been archived.

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

put_civis_data_match_projects(id, project_id)

Add a Civis Data Match Enhancement to a project

Parameters
idinteger

The ID of the Civis Data Match Enhancement.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

put_civis_data_match_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_civis_data_match_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_civis_data_match_transfer(id, user_id, include_dependencies, *, email_body='DEFAULT', send_email='DEFAULT')

Transfer ownership of this object to another user

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

ID of target user

include_dependenciesboolean

Whether or not to give manage permissions on all dependencies

email_bodystring, optional

Custom body text for e-mail sent on transfer.

send_emailboolean, optional

Send email to the target user of the transfer?

Returns
civis.response.Response
  • dependencieslist::

    Dependent objects for this object - object_type : string

    Dependent object type

    • fco_typestring

      Human readable dependent object type

    • idinteger

      Dependent object ID

    • namestring

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

    • permission_levelstring

      Permission level of target user (not user’s groups) for dependent object, or null if no target user

    • sharedboolean

      Whether dependent object was successfully shared with target user

put_geocode(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
idinteger

The ID for the enhancement.

namestring

The name of the enhancement job.

remote_host_idinteger

The ID of the remote host.

credential_idinteger

The ID of the remote host credential.

source_schema_and_tablestring

The source database schema and table.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

parent_idinteger, optional

Parent ID that triggers this enhancement.

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

multipart_keylist, optional

The source table primary key.

limiting_sqlstring, optional

The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

target_schemastring, optional

The output table schema.

target_tablestring, optional

The output table name.

countrystring, optional

The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

providerstring, optional

The geocoding provider; one of postgis, nominatim, and geocoder_ca.

output_addressboolean, optional

Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host.

  • credential_idinteger

    The ID of the remote host credential.

  • source_schema_and_tablestring

    The source database schema and table.

  • multipart_keylist

    The source table primary key.

  • limiting_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • target_schemastring

    The output table schema.

  • target_tablestring

    The output table name.

  • countrystring

    The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

  • providerstring

    The geocoding provider; one of postgis, nominatim, and geocoder_ca.

  • output_addressboolean

    Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

put_geocode_archive(id, status)

Update the archive status of this object

Parameters
idinteger

The ID of the object.

statusboolean

The desired archived status of the object.

Returns
civis.response.Response
  • idinteger

    The ID for the enhancement.

  • namestring

    The name of the enhancement job.

  • typestring

    The type of the enhancement (e.g CASS-NCOA)

  • created_atstring/time

    The time this enhancement was created.

  • updated_atstring/time

    The time the enhancement was last updated.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • statestring

    The status of the enhancement’s last run

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • parent_idinteger

    Parent ID that triggers this enhancement.

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • remote_host_idinteger

    The ID of the remote host.

  • credential_idinteger

    The ID of the remote host credential.

  • source_schema_and_tablestring

    The source database schema and table.

  • multipart_keylist

    The source table primary key.

  • limiting_sqlstring

    The limiting SQL for the source table. “WHERE” should be omitted (e.g. state=’IL’).

  • target_schemastring

    The output table schema.

  • target_tablestring

    The output table name.

  • countrystring

    The country of the addresses to be geocoded; either ‘us’ or ‘ca’.

  • providerstring

    The geocoding provider; one of postgis, nominatim, and geocoder_ca.

  • output_addressboolean

    Whether to output the parsed address. Only guaranteed for the ‘postgis’ provider.

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

put_geocode_projects(id, project_id)

Add a Geocode Enhancement to a project

Parameters
idinteger

The ID of the Geocode Enhancement.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

put_geocode_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_geocode_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_geocode_transfer(id, user_id, include_dependencies, *, email_body='DEFAULT', send_email='DEFAULT')

Transfer ownership of this object to another user

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

ID of target user

include_dependenciesboolean

Whether or not to give manage permissions on all dependencies

email_bodystring, optional

Custom body text for e-mail sent on transfer.

send_emailboolean, optional

Send email to the target user of the transfer?

Returns
civis.response.Response
  • dependencieslist::

    Dependent objects for this object - object_type : string

    Dependent object type

    • fco_typestring

      Human readable dependent object type

    • idinteger

      Dependent object ID

    • namestring

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

    • permission_levelstring

      Permission level of target user (not user’s groups) for dependent object, or null if no target user

    • sharedboolean

      Whether dependent object was successfully shared with target user

Exports

class Exports(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.exports.list(...)

Methods

delete_files_csv_runs(id, run_id)

Cancel a run

get_files_csv(id)

Get a CSV Export

get_files_csv_runs(id, run_id)

Check status of a run

list(*[, type, status, author, hidden, ...])

List

list_files_csv_runs(id, *[, limit, ...])

List runs for the given csv_export

list_files_csv_runs_logs(id, run_id, *[, ...])

Get the logs for a run

list_files_csv_runs_outputs(id, run_id, *[, ...])

List the outputs for a run

patch_files_csv(id, *[, name, source, ...])

Update some attributes of this CSV Export

post_files_csv(source, destination, *[, ...])

Create a CSV Export

post_files_csv_runs(id)

Start a run

put_files_csv(id, source, destination, *[, ...])

Replace all attributes of this CSV Export

put_files_csv_archive(id, status)

Update the archive status of this object

delete_files_csv_runs(id, run_id)

Cancel a run

Parameters
idinteger

The ID of the csv_export.

run_idinteger

The ID of the run.

Returns
None

Response code 202: success

get_files_csv(id)

Get a CSV Export

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID of this Csv Export job.

  • namestring

    The name of this Csv Export job.

  • sourcedict::
    • sqlstring

      The SQL query for this Csv Export job

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

  • destinationdict::
    • filename_prefixstring

      The prefix of the name of the file returned to the user.

    • storage_pathdict::
      • file_pathstring

        The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

      • storage_host_idinteger

        The ID of the destination storage host.

      • credential_idinteger

        The ID of the credentials for the destination storage host.

      • existing_filesstring

        Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

  • include_headerboolean

    A boolean value indicating whether or not the header should be included. Defaults to true.

  • compressionstring

    The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

  • column_delimiterstring

    The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • hiddenboolean

    A boolean value indicating whether or not this request should be hidden. Defaults to false.

  • force_multifileboolean

    Whether or not the csv should be split into multiple files. Default: false

  • max_file_sizeinteger

    The max file size, in MB, created files will be. Only available when force_multifile is true.

  • my_permission_levelstring

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

get_files_csv_runs(id, run_id)

Check status of a run

Parameters
idinteger

The ID of the csv_export.

run_idinteger

The ID of the run.

Returns
civis.response.Response
  • id : integer

  • state : string

  • created_atstring/time

    The time that the run was queued.

  • started_atstring/time

    The time that the run started.

  • finished_atstring/time

    The time that the run completed.

  • errorstring

    The error message for this run, if present.

  • output_cached_onstring/time

    The time that the output was originally exported, if a cache entry was used by the run.

list(*, type='DEFAULT', status='DEFAULT', author='DEFAULT', hidden='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List

Parameters
typestring, optional

If specified, return exports of these types. It accepts a comma-separated list, possible values are ‘database’ and ‘gdoc’.

statusstring, optional

If specified, returns export with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.

authorstring, optional

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

hiddenboolean, optional

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

archivedstring, optional

The archival status of the requested item(s).

limitinteger, optional

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

page_numinteger, optional

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

orderstring, 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_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID for this export.

  • namestring

    The name of this export.

  • typestring

    The type of export.

  • created_atstring/time

    The creation time for this export.

  • updated_atstring/time

    The last modification time for this export.

  • state : string

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

list_files_csv_runs(id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List runs for the given csv_export

Parameters
idinteger

The ID of the csv_export.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • id : integer

  • state : string

  • created_atstring/time

    The time that the run was queued.

  • started_atstring/time

    The time that the run started.

  • finished_atstring/time

    The time that the run completed.

  • errorstring

    The error message for this run, if present.

list_files_csv_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the csv_export.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_files_csv_runs_outputs(id, run_id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List the outputs for a run

Parameters
idinteger

The ID of the csv_export.

run_idinteger

The ID of the run.

limitinteger, optional

Number of results to return. Defaults to its maximum of 50.

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • object_typestring

    The type of the output. Valid values are File, Table, Report, Project, Credential, or JSONValue

  • object_idinteger

    The ID of the output.

  • namestring

    The name of the output.

  • linkstring

    The hypermedia link to the output.

  • value : string

patch_files_csv(id, *, name='DEFAULT', source='DEFAULT', destination='DEFAULT', include_header='DEFAULT', compression='DEFAULT', column_delimiter='DEFAULT', hidden='DEFAULT', force_multifile='DEFAULT', max_file_size='DEFAULT')

Update some attributes of this CSV Export

Parameters
idinteger

The ID of this Csv Export job.

namestring, optional

The name of this Csv Export job.

sourcedict, optional::
  • sqlstring

    The SQL query for this Csv Export job

  • remote_host_idinteger

    The ID of the destination database host.

  • credential_idinteger

    The ID of the credentials for the destination database.

destinationdict, optional::
  • filename_prefixstring

    The prefix of the name of the file returned to the user.

  • storage_pathdict::
    • file_pathstring

      The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

    • storage_host_idinteger

      The ID of the destination storage host.

    • credential_idinteger

      The ID of the credentials for the destination storage host.

    • existing_filesstring

      Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

include_headerboolean, optional

A boolean value indicating whether or not the header should be included. Defaults to true.

compressionstring, optional

The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

column_delimiterstring, optional

The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

hiddenboolean, optional

A boolean value indicating whether or not this request should be hidden. Defaults to false.

force_multifileboolean, optional

Whether or not the csv should be split into multiple files. Default: false

max_file_sizeinteger, optional

The max file size, in MB, created files will be. Only available when force_multifile is true.

Returns
civis.response.Response
  • idinteger

    The ID of this Csv Export job.

  • namestring

    The name of this Csv Export job.

  • sourcedict::
    • sqlstring

      The SQL query for this Csv Export job

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

  • destinationdict::
    • filename_prefixstring

      The prefix of the name of the file returned to the user.

    • storage_pathdict::
      • file_pathstring

        The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

      • storage_host_idinteger

        The ID of the destination storage host.

      • credential_idinteger

        The ID of the credentials for the destination storage host.

      • existing_filesstring

        Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

  • include_headerboolean

    A boolean value indicating whether or not the header should be included. Defaults to true.

  • compressionstring

    The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

  • column_delimiterstring

    The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • hiddenboolean

    A boolean value indicating whether or not this request should be hidden. Defaults to false.

  • force_multifileboolean

    Whether or not the csv should be split into multiple files. Default: false

  • max_file_sizeinteger

    The max file size, in MB, created files will be. Only available when force_multifile is true.

  • my_permission_levelstring

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

post_files_csv(source, destination, *, name='DEFAULT', include_header='DEFAULT', compression='DEFAULT', column_delimiter='DEFAULT', hidden='DEFAULT', force_multifile='DEFAULT', max_file_size='DEFAULT')

Create a CSV Export

Parameters
sourcedict::
  • sqlstring

    The SQL query for this Csv Export job

  • remote_host_idinteger

    The ID of the destination database host.

  • credential_idinteger

    The ID of the credentials for the destination database.

destinationdict::
  • filename_prefixstring

    The prefix of the name of the file returned to the user.

  • storage_pathdict::
    • file_pathstring

      The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

    • storage_host_idinteger

      The ID of the destination storage host.

    • credential_idinteger

      The ID of the credentials for the destination storage host.

    • existing_filesstring

      Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

namestring, optional

The name of this Csv Export job.

include_headerboolean, optional

A boolean value indicating whether or not the header should be included. Defaults to true.

compressionstring, optional

The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

column_delimiterstring, optional

The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

hiddenboolean, optional

A boolean value indicating whether or not this request should be hidden. Defaults to false.

force_multifileboolean, optional

Whether or not the csv should be split into multiple files. Default: false

max_file_sizeinteger, optional

The max file size, in MB, created files will be. Only available when force_multifile is true.

Returns
civis.response.Response
  • idinteger

    The ID of this Csv Export job.

  • namestring

    The name of this Csv Export job.

  • sourcedict::
    • sqlstring

      The SQL query for this Csv Export job

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

  • destinationdict::
    • filename_prefixstring

      The prefix of the name of the file returned to the user.

    • storage_pathdict::
      • file_pathstring

        The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

      • storage_host_idinteger

        The ID of the destination storage host.

      • credential_idinteger

        The ID of the credentials for the destination storage host.

      • existing_filesstring

        Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

  • include_headerboolean

    A boolean value indicating whether or not the header should be included. Defaults to true.

  • compressionstring

    The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

  • column_delimiterstring

    The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • hiddenboolean

    A boolean value indicating whether or not this request should be hidden. Defaults to false.

  • force_multifileboolean

    Whether or not the csv should be split into multiple files. Default: false

  • max_file_sizeinteger

    The max file size, in MB, created files will be. Only available when force_multifile is true.

  • my_permission_levelstring

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

post_files_csv_runs(id)

Start a run

Parameters
idinteger

The ID of the csv_export.

Returns
civis.response.Response
  • id : integer

  • state : string

  • created_atstring/time

    The time that the run was queued.

  • started_atstring/time

    The time that the run started.

  • finished_atstring/time

    The time that the run completed.

  • errorstring

    The error message for this run, if present.

  • output_cached_onstring/time

    The time that the output was originally exported, if a cache entry was used by the run.

put_files_csv(id, source, destination, *, name='DEFAULT', include_header='DEFAULT', compression='DEFAULT', column_delimiter='DEFAULT', hidden='DEFAULT', force_multifile='DEFAULT', max_file_size='DEFAULT')

Replace all attributes of this CSV Export

Parameters
idinteger

The ID of this Csv Export job.

sourcedict::
  • sqlstring

    The SQL query for this Csv Export job

  • remote_host_idinteger

    The ID of the destination database host.

  • credential_idinteger

    The ID of the credentials for the destination database.

destinationdict::
  • filename_prefixstring

    The prefix of the name of the file returned to the user.

  • storage_pathdict::
    • file_pathstring

      The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

    • storage_host_idinteger

      The ID of the destination storage host.

    • credential_idinteger

      The ID of the credentials for the destination storage host.

    • existing_filesstring

      Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

namestring, optional

The name of this Csv Export job.

include_headerboolean, optional

A boolean value indicating whether or not the header should be included. Defaults to true.

compressionstring, optional

The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

column_delimiterstring, optional

The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

hiddenboolean, optional

A boolean value indicating whether or not this request should be hidden. Defaults to false.

force_multifileboolean, optional

Whether or not the csv should be split into multiple files. Default: false

max_file_sizeinteger, optional

The max file size, in MB, created files will be. Only available when force_multifile is true.

Returns
civis.response.Response
  • idinteger

    The ID of this Csv Export job.

  • namestring

    The name of this Csv Export job.

  • sourcedict::
    • sqlstring

      The SQL query for this Csv Export job

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

  • destinationdict::
    • filename_prefixstring

      The prefix of the name of the file returned to the user.

    • storage_pathdict::
      • file_pathstring

        The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

      • storage_host_idinteger

        The ID of the destination storage host.

      • credential_idinteger

        The ID of the credentials for the destination storage host.

      • existing_filesstring

        Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

  • include_headerboolean

    A boolean value indicating whether or not the header should be included. Defaults to true.

  • compressionstring

    The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

  • column_delimiterstring

    The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • hiddenboolean

    A boolean value indicating whether or not this request should be hidden. Defaults to false.

  • force_multifileboolean

    Whether or not the csv should be split into multiple files. Default: false

  • max_file_sizeinteger

    The max file size, in MB, created files will be. Only available when force_multifile is true.

  • my_permission_levelstring

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

put_files_csv_archive(id, status)

Update the archive status of this object

Parameters
idinteger

The ID of the object.

statusboolean

The desired archived status of the object.

Returns
civis.response.Response
  • idinteger

    The ID of this Csv Export job.

  • namestring

    The name of this Csv Export job.

  • sourcedict::
    • sqlstring

      The SQL query for this Csv Export job

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

  • destinationdict::
    • filename_prefixstring

      The prefix of the name of the file returned to the user.

    • storage_pathdict::
      • file_pathstring

        The path within the bucket where the exported file will be saved. E.g. the file_path for “s3://mybucket/files/all/” would be “/files/all/”

      • storage_host_idinteger

        The ID of the destination storage host.

      • credential_idinteger

        The ID of the credentials for the destination storage host.

      • existing_filesstring

        Notifies the job of what to do in the case that the exported file already exists at the provided path.One of: fail, append, overwrite. Default: fail. If “append” is specified,the new file will always be added to the provided path. If “overwrite” is specifiedall existing files at the provided path will be deleted and the new file will be added.By default, or if “fail” is specified, the export will fail if a file exists at the provided path.

  • include_headerboolean

    A boolean value indicating whether or not the header should be included. Defaults to true.

  • compressionstring

    The compression of the output file. Valid arguments are “gzip” and “none”. Defaults to “gzip”.

  • column_delimiterstring

    The column delimiter for the output file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • hiddenboolean

    A boolean value indicating whether or not this request should be hidden. Defaults to false.

  • force_multifileboolean

    Whether or not the csv should be split into multiple files. Default: false

  • max_file_sizeinteger

    The max file size, in MB, created files will be. Only available when force_multifile is true.

  • my_permission_levelstring

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

Files

class Files(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.files.list_projects(...)

Methods

delete_projects(id, project_id)

Remove a File from a project

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

get(id, *[, link_expires_at, inline])

Get details about a file

get_preprocess_csv(id)

Get a Preprocess CSV

list_dependencies(id, *[, user_id])

List dependent objects for this object

list_projects(id, *[, hidden])

List the projects a File belongs to

list_shares(id)

List users and groups permissioned on this object

patch(id, *[, name, expires_at])

Update details about a file

patch_preprocess_csv(id, *[, file_id, ...])

Update some attributes of this Preprocess CSV

post(name, *[, expires_at])

Initiate an upload of a file into the platform

post_multipart(name, num_parts, *[, expires_at])

Initiate a multipart upload

post_multipart_complete(id)

Complete a multipart upload

post_preprocess_csv(file_id, *[, in_place, ...])

Create a Preprocess CSV

put(id, name, expires_at)

Update details about a file

put_preprocess_csv(id, file_id, *[, ...])

Replace all attributes of this Preprocess CSV

put_preprocess_csv_archive(id, status)

Update the archive status of this object

put_projects(id, project_id)

Add a File to a project

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

Set the permissions groups has on this object

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

Set the permissions users have on this object

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

Transfer ownership of this object to another user

delete_projects(id, project_id)

Remove a File from a project

Parameters
idinteger

The ID of the File.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

get(id, *, link_expires_at='DEFAULT', inline='DEFAULT')

Get details about a file

Parameters
idinteger

The ID of the file.

link_expires_atstring, 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.

inlineboolean, optional

If true, will return a url that can be displayed inline in HTML

Returns
civis.response.Response
  • idinteger

    The ID of the file.

  • namestring

    The file name.

  • created_atstring/date-time

    The date and time the file was created.

  • file_sizeinteger

    The file size.

  • expires_atstring/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.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • download_urlstring

    A JSON string containing information about the URL of the file.

  • file_urlstring

    The URL that may be used to download the file.

  • detected_infodict::
    • include_headerboolean

      A boolean value indicating whether or not the first row of the file is a header row.

    • column_delimiterstring

      The column delimiter for the file. One of “comma”, “tab”, or “pipe”.

    • compressionstring

      The type of compression of the file. One of “gzip”, or “none”.

    • table_columnslist::

      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_typestring

        The SQL type of the column.

get_preprocess_csv(id)

Get a Preprocess CSV

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID of the job created.

  • file_idinteger

    The ID of the file.

  • in_placeboolean

    If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

  • detect_table_columnsboolean

    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_conversionboolean

    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_headerboolean

    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_delimiterstring

    The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

  • hiddenboolean

    The hidden status of the item.

list_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_projects(id, *, hidden='DEFAULT')

List the projects a File belongs to

Parameters
idinteger

The ID of the File.

hiddenboolean, optional

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

Returns
civis.response.Response
  • idinteger

    The ID for this project.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • namestring

    The name of this project.

  • descriptionstring

    A description of the project.

  • userslist::

    Users who can see the project. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • auto_share : boolean

  • created_at : string/time

  • updated_at : string/time

  • archivedstring

    The archival status of the requested item(s).

list_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

patch(id, *, name='DEFAULT', expires_at='DEFAULT')

Update details about a file

Parameters
idinteger

The ID of the file.

namestring, optional

The file name. The extension must match the previous extension.

expires_atstring/date-time, optional

The date and time the file will expire.

Returns
civis.response.Response
  • idinteger

    The ID of the file.

  • namestring

    The file name.

  • created_atstring/date-time

    The date and time the file was created.

  • file_sizeinteger

    The file size.

  • expires_atstring/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.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • download_urlstring

    A JSON string containing information about the URL of the file.

  • file_urlstring

    The URL that may be used to download the file.

  • detected_infodict::
    • include_headerboolean

      A boolean value indicating whether or not the first row of the file is a header row.

    • column_delimiterstring

      The column delimiter for the file. One of “comma”, “tab”, or “pipe”.

    • compressionstring

      The type of compression of the file. One of “gzip”, or “none”.

    • table_columnslist::

      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_typestring

        The SQL type of the column.

patch_preprocess_csv(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
idinteger

The ID of the job created.

file_idinteger, optional

The ID of the file.

in_placeboolean, optional

If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

detect_table_columnsboolean, 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_conversionboolean, 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_headerboolean, 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_delimiterstring, optional

The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

Returns
civis.response.Response
  • idinteger

    The ID of the job created.

  • file_idinteger

    The ID of the file.

  • in_placeboolean

    If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

  • detect_table_columnsboolean

    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_conversionboolean

    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_headerboolean

    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_delimiterstring

    The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

  • hiddenboolean

    The hidden status of the item.

post(name, *, expires_at='DEFAULT')

Initiate an upload of a file into the platform

Parameters
namestring

The file name.

expires_atstring/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
civis.response.Response
  • idinteger

    The ID of the file.

  • namestring

    The file name.

  • created_atstring/date-time

    The date and time the file was created.

  • file_sizeinteger

    The file size.

  • expires_atstring/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_urlstring

    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_fieldsdict

    A hash containing the form fields to be included with the POST request.

post_multipart(name, num_parts, *, expires_at='DEFAULT')

Initiate a multipart upload

Parameters
namestring

The file name.

num_partsinteger

The number of parts in which the file will be uploaded. This parameter determines the number of presigned URLs that are returned.

expires_atstring/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
civis.response.Response
  • idinteger

    The ID of the file.

  • namestring

    The file name.

  • created_atstring/date-time

    The date and time the file was created.

  • file_sizeinteger

    The file size.

  • expires_atstring/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_urlslist

    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(id)

Complete a multipart upload

Parameters
idinteger

The ID of the file.

Returns
None

Response code 204: success

post_preprocess_csv(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_idinteger

The ID of the file.

in_placeboolean, optional

If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

detect_table_columnsboolean, 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_conversionboolean, 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_headerboolean, 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_delimiterstring, optional

The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

hiddenboolean, optional

The hidden status of the item.

Returns
civis.response.Response
  • idinteger

    The ID of the job created.

  • file_idinteger

    The ID of the file.

  • in_placeboolean

    If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

  • detect_table_columnsboolean

    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_conversionboolean

    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_headerboolean

    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_delimiterstring

    The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

  • hiddenboolean

    The hidden status of the item.

put(id, name, expires_at)

Update details about a file

Parameters
idinteger

The ID of the file.

namestring

The file name. The extension must match the previous extension.

expires_atstring/date-time

The date and time the file will expire.

Returns
civis.response.Response
  • idinteger

    The ID of the file.

  • namestring

    The file name.

  • created_atstring/date-time

    The date and time the file was created.

  • file_sizeinteger

    The file size.

  • expires_atstring/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.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • download_urlstring

    A JSON string containing information about the URL of the file.

  • file_urlstring

    The URL that may be used to download the file.

  • detected_infodict::
    • include_headerboolean

      A boolean value indicating whether or not the first row of the file is a header row.

    • column_delimiterstring

      The column delimiter for the file. One of “comma”, “tab”, or “pipe”.

    • compressionstring

      The type of compression of the file. One of “gzip”, or “none”.

    • table_columnslist::

      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_typestring

        The SQL type of the column.

put_preprocess_csv(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
idinteger

The ID of the job created.

file_idinteger

The ID of the file.

in_placeboolean, optional

If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

detect_table_columnsboolean, 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_conversionboolean, 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_headerboolean, 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_delimiterstring, optional

The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

Returns
civis.response.Response
  • idinteger

    The ID of the job created.

  • file_idinteger

    The ID of the file.

  • in_placeboolean

    If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

  • detect_table_columnsboolean

    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_conversionboolean

    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_headerboolean

    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_delimiterstring

    The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

  • hiddenboolean

    The hidden status of the item.

put_preprocess_csv_archive(id, status)

Update the archive status of this object

Parameters
idinteger

The ID of the object.

statusboolean

The desired archived status of the object.

Returns
civis.response.Response
  • idinteger

    The ID of the job created.

  • file_idinteger

    The ID of the file.

  • in_placeboolean

    If true, the file is cleaned in place. If false, a new file ID is created. Defaults to true.

  • detect_table_columnsboolean

    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_conversionboolean

    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_headerboolean

    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_delimiterstring

    The column delimiter for the file. One of “comma”, “tab”, or “pipe”. If not provided, the column delimiter will be auto-detected.

  • hiddenboolean

    The hidden status of the item.

put_projects(id, project_id)

Add a File to a project

Parameters
idinteger

The ID of the File.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

put_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_transfer(id, user_id, include_dependencies, *, email_body='DEFAULT', send_email='DEFAULT')

Transfer ownership of this object to another user

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

ID of target user

include_dependenciesboolean

Whether or not to give manage permissions on all dependencies

email_bodystring, optional

Custom body text for e-mail sent on transfer.

send_emailboolean, optional

Send email to the target user of the transfer?

Returns
civis.response.Response
  • dependencieslist::

    Dependent objects for this object - object_type : string

    Dependent object type

    • fco_typestring

      Human readable dependent object type

    • idinteger

      Dependent object ID

    • namestring

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

    • permission_levelstring

      Permission level of target user (not user’s groups) for dependent object, or null if no target user

    • sharedboolean

      Whether dependent object was successfully shared with target user

Git_Repos

class Git_Repos(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.git_repos.list(...)

Methods

delete(id)

Remove the bookmark on a git repository

get(id)

Get a bookmarked git repository

list(*[, limit, page_num, order, order_dir, ...])

List bookmarked git repositories

list_refs(id)

Get all branches and tags of a bookmarked git repository

post(repo_url)

Bookmark a git repository

delete(id)

Remove the bookmark on a git repository

Parameters
idinteger

The ID for this git repository.

Returns
None

Response code 204: success

get(id)

Get a bookmarked git repository

Parameters
idinteger

The ID for this git repository.

Returns
civis.response.Response
  • idinteger

    The ID for this git repository.

  • repo_urlstring

    The URL for this git repository.

  • created_at : string/time

  • updated_at : string/time

list(*, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List bookmarked git repositories

Parameters
limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID for this git repository.

  • repo_urlstring

    The URL for this git repository.

  • created_at : string/time

  • updated_at : string/time

list_refs(id)

Get all branches and tags of a bookmarked git repository

Parameters
idinteger

The ID for this git repository.

Returns
civis.response.Response
  • brancheslist

    List of branch names of this git repository.

  • tagslist

    List of tag names of this git repository.

post(repo_url)

Bookmark a git repository

Parameters
repo_urlstring

The URL for this git repository.

Returns
civis.response.Response
  • idinteger

    The ID for this git repository.

  • repo_urlstring

    The URL for this git repository.

  • created_at : string/time

  • updated_at : string/time

Groups

class Groups(session_kwargs, client, return_type='civis')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.groups.list(...)

Methods

delete_members(id, user_id)

Remove a user from a group

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

get(id)

Get a Group

list(*[, query, permission, ...])

List Groups

list_child_groups(id)

Get child groups of this group

list_shares(id)

List users and groups permissioned on this object

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

Update some attributes of this Group

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

Create a Group

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

Replace all attributes of this Group

put_members(id, user_id)

Add a user to a group

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

Set the permissions groups has on this object

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

Set the permissions users have on this object

delete_members(id, user_id)

Remove a user from a group

Parameters
idinteger

The ID of the group.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

get(id)

Get a Group

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID of this group.

  • namestring

    This group’s name.

  • created_atstring/time

    The date and time when this group was created.

  • updated_atstring/time

    The date and time when this group was last updated.

  • descriptionstring

    The description of the group.

  • slugstring

    The slug for this group.

  • organization_idinteger

    The ID of the organization this group belongs to.

  • organization_namestring

    The name of the organization this group belongs to.

  • member_countinteger

    The number of active members in this group.

  • total_member_countinteger

    The total number of members in this group.

  • must_agree_to_eulaboolean

    Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

  • default_otp_required_for_loginboolean

    The two factor authentication requirement for this group.

  • role_idslist

    An array of ids of all the roles this group has.

  • default_time_zonestring

    The default time zone of this group.

  • default_jobs_labelstring

    The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_notebooks_labelstring

    The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_services_labelstring

    The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • last_updated_by_idinteger

    The ID of the user who last updated this group.

  • created_by_idinteger

    The ID of the user who created this group.

  • memberslist::

    The members of this group. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

    • emailstring

      This user’s email address.

    • primary_group_idinteger

      The ID of the primary group of this user.

    • activeboolean

      The account status of this user.

list(*, query='DEFAULT', permission='DEFAULT', include_members='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List Groups

Parameters
querystring, 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”).

permissionstring, optional

A permissions string, one of “read”, “write”, or “manage”. Lists only groups for which the current user has that permission.

include_membersboolean, optional

Show members of the group.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of this group.

  • namestring

    This group’s name.

  • created_atstring/time

    The date and time when this group was created.

  • updated_atstring/time

    The date and time when this group was last updated.

  • slugstring

    The slug for this group.

  • organization_idinteger

    The ID of the organization this group belongs to.

  • organization_namestring

    The name of the organization this group belongs to.

  • member_countinteger

    The number of active members in this group.

  • total_member_countinteger

    The total number of members in this group.

  • last_updated_by_idinteger

    The ID of the user who last updated this group.

  • created_by_idinteger

    The ID of the user who created this group.

  • memberslist::

    The members of this group. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

list_child_groups(id)

Get child groups of this group

Parameters
idinteger

The ID of this group.

Returns
civis.response.Response
  • manageablelist::
    • id : integer

    • name : string

  • writeablelist::
    • id : integer

    • name : string

  • readablelist::
    • id : integer

    • name : string

list_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

patch(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', default_jobs_label='DEFAULT', default_notebooks_label='DEFAULT', default_services_label='DEFAULT')

Update some attributes of this Group

Parameters
idinteger

The ID of this group.

namestring, optional

This group’s name.

descriptionstring, optional

The description of the group.

slugstring, optional

The slug for this group.

organization_idinteger, optional

The ID of the organization this group belongs to.

must_agree_to_eulaboolean, optional

Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

default_otp_required_for_loginboolean, optional

The two factor authentication requirement for this group.

role_idslist, optional

An array of ids of all the roles this group has.

default_time_zonestring, optional

The default time zone of this group.

default_jobs_labelstring, optional

The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

default_notebooks_labelstring, optional

The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

default_services_labelstring, optional

The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

Returns
civis.response.Response
  • idinteger

    The ID of this group.

  • namestring

    This group’s name.

  • created_atstring/time

    The date and time when this group was created.

  • updated_atstring/time

    The date and time when this group was last updated.

  • descriptionstring

    The description of the group.

  • slugstring

    The slug for this group.

  • organization_idinteger

    The ID of the organization this group belongs to.

  • organization_namestring

    The name of the organization this group belongs to.

  • member_countinteger

    The number of active members in this group.

  • total_member_countinteger

    The total number of members in this group.

  • must_agree_to_eulaboolean

    Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

  • default_otp_required_for_loginboolean

    The two factor authentication requirement for this group.

  • role_idslist

    An array of ids of all the roles this group has.

  • default_time_zonestring

    The default time zone of this group.

  • default_jobs_labelstring

    The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_notebooks_labelstring

    The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_services_labelstring

    The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • last_updated_by_idinteger

    The ID of the user who last updated this group.

  • created_by_idinteger

    The ID of the user who created this group.

  • memberslist::

    The members of this group. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

    • emailstring

      This user’s email address.

    • primary_group_idinteger

      The ID of the primary group of this user.

    • activeboolean

      The account status of this user.

post(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', default_jobs_label='DEFAULT', default_notebooks_label='DEFAULT', default_services_label='DEFAULT')

Create a Group

Parameters
namestring

This group’s name.

descriptionstring, optional

The description of the group.

slugstring, optional

The slug for this group.

organization_idinteger, optional

The ID of the organization this group belongs to.

must_agree_to_eulaboolean, optional

Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

default_otp_required_for_loginboolean, optional

The two factor authentication requirement for this group.

role_idslist, optional

An array of ids of all the roles this group has.

default_time_zonestring, optional

The default time zone of this group.

default_jobs_labelstring, optional

The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

default_notebooks_labelstring, optional

The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

default_services_labelstring, optional

The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

Returns
civis.response.Response
  • idinteger

    The ID of this group.

  • namestring

    This group’s name.

  • created_atstring/time

    The date and time when this group was created.

  • updated_atstring/time

    The date and time when this group was last updated.

  • descriptionstring

    The description of the group.

  • slugstring

    The slug for this group.

  • organization_idinteger

    The ID of the organization this group belongs to.

  • organization_namestring

    The name of the organization this group belongs to.

  • member_countinteger

    The number of active members in this group.

  • total_member_countinteger

    The total number of members in this group.

  • must_agree_to_eulaboolean

    Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

  • default_otp_required_for_loginboolean

    The two factor authentication requirement for this group.

  • role_idslist

    An array of ids of all the roles this group has.

  • default_time_zonestring

    The default time zone of this group.

  • default_jobs_labelstring

    The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_notebooks_labelstring

    The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_services_labelstring

    The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • last_updated_by_idinteger

    The ID of the user who last updated this group.

  • created_by_idinteger

    The ID of the user who created this group.

  • memberslist::

    The members of this group. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

    • emailstring

      This user’s email address.

    • primary_group_idinteger

      The ID of the primary group of this user.

    • activeboolean

      The account status of this user.

put(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', default_jobs_label='DEFAULT', default_notebooks_label='DEFAULT', default_services_label='DEFAULT')

Replace all attributes of this Group

Parameters
idinteger

The ID of this group.

namestring

This group’s name.

descriptionstring, optional

The description of the group.

slugstring, optional

The slug for this group.

organization_idinteger, optional

The ID of the organization this group belongs to.

must_agree_to_eulaboolean, optional

Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

default_otp_required_for_loginboolean, optional

The two factor authentication requirement for this group.

role_idslist, optional

An array of ids of all the roles this group has.

default_time_zonestring, optional

The default time zone of this group.

default_jobs_labelstring, optional

The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

default_notebooks_labelstring, optional

The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

default_services_labelstring, optional

The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

Returns
civis.response.Response
  • idinteger

    The ID of this group.

  • namestring

    This group’s name.

  • created_atstring/time

    The date and time when this group was created.

  • updated_atstring/time

    The date and time when this group was last updated.

  • descriptionstring

    The description of the group.

  • slugstring

    The slug for this group.

  • organization_idinteger

    The ID of the organization this group belongs to.

  • organization_namestring

    The name of the organization this group belongs to.

  • member_countinteger

    The number of active members in this group.

  • total_member_countinteger

    The total number of members in this group.

  • must_agree_to_eulaboolean

    Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

  • default_otp_required_for_loginboolean

    The two factor authentication requirement for this group.

  • role_idslist

    An array of ids of all the roles this group has.

  • default_time_zonestring

    The default time zone of this group.

  • default_jobs_labelstring

    The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_notebooks_labelstring

    The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_services_labelstring

    The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • last_updated_by_idinteger

    The ID of the user who last updated this group.

  • created_by_idinteger

    The ID of the user who created this group.

  • memberslist::

    The members of this group. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

    • emailstring

      This user’s email address.

    • primary_group_idinteger

      The ID of the primary group of this user.

    • activeboolean

      The account status of this user.

put_members(id, user_id)

Add a user to a group

Parameters
idinteger

The ID of the group.

user_idinteger

The ID of the user.

Returns
civis.response.Response
  • idinteger

    The ID of this group.

  • namestring

    This group’s name.

  • created_atstring/time

    The date and time when this group was created.

  • updated_atstring/time

    The date and time when this group was last updated.

  • descriptionstring

    The description of the group.

  • slugstring

    The slug for this group.

  • organization_idinteger

    The ID of the organization this group belongs to.

  • organization_namestring

    The name of the organization this group belongs to.

  • member_countinteger

    The number of active members in this group.

  • total_member_countinteger

    The total number of members in this group.

  • must_agree_to_eulaboolean

    Whether or not members of this group must sign the EULA. Deprecated: all users must agree to the EULA, regardless of this attribute.

  • default_otp_required_for_loginboolean

    The two factor authentication requirement for this group.

  • role_idslist

    An array of ids of all the roles this group has.

  • default_time_zonestring

    The default time zone of this group.

  • default_jobs_labelstring

    The default partition label for jobs of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_notebooks_labelstring

    The default partition label for notebooks of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • default_services_labelstring

    The default partition label for services of this group. Only available if custom_partitions feature flag is set. Do not use this attribute as it may break in the future.

  • last_updated_by_idinteger

    The ID of the user who last updated this group.

  • created_by_idinteger

    The ID of the user who created this group.

  • memberslist::

    The members of this group. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

    • emailstring

      This user’s email address.

    • primary_group_idinteger

      The ID of the primary group of this user.

    • activeboolean

      The account status of this user.

put_shares_groups(id, group_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions groups has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idslist

An array of one or more group IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

put_shares_users(id, user_ids, permission_level, *, share_email_body='DEFAULT', send_shared_email='DEFAULT')

Set the permissions users have on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idslist

An array of one or more user IDs.

permission_levelstring

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

share_email_bodystring, optional

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

send_shared_emailboolean, optional

Send email to the recipients of a share.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

    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')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.imports.list_shares(...)

Methods

delete_files_csv_runs(id, run_id)

Cancel a run

delete_files_runs(id, run_id)

Cancel a run

delete_projects(id, project_id)

Remove an Import from a project

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

get(id)

Get details about an import

get_batches(id)

Get details about a batch import

get_files_csv(id)

Get a CSV Import

get_files_csv_runs(id, run_id)

Check status of a run

get_files_runs(id, run_id)

Check status of a run

list(*[, type, destination, source, status, ...])

List Imports

list_batches(*[, hidden, limit, page_num, ...])

List batch imports

list_dependencies(id, *[, user_id])

List dependent objects for this object

list_files_csv_runs(id, *[, limit, ...])

List runs for the given csv_import

list_files_csv_runs_logs(id, run_id, *[, ...])

Get the logs for a run

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

List runs for the given import

list_files_runs_logs(id, run_id, *[, ...])

Get the logs for a run

list_projects(id, *[, hidden])

List the projects an Import belongs to

list_runs(id)

Get the run history of this import

list_runs_logs(id, run_id, *[, last_id, limit])

Get the logs for a run

list_shares(id)

List users and groups permissioned on this object

patch_files_csv(id, *[, name, source, ...])

Update some attributes of this CSV Import

post(name, sync_type, is_outbound, *[, ...])

Create a new import configuration

post_batches(file_ids, schema, table, ...[, ...])

Upload multiple files to Civis

post_cancel(id)

Cancel a run

post_files(schema, name, remote_host_id, ...)

Initate an import of a tabular file into the platform

post_files_csv(source, destination, ...[, ...])

Create a CSV Import

post_files_csv_runs(id)

Start a run

post_files_runs(id)

Start a run

post_runs(id)

Run an import

post_syncs(id, source, destination, *[, ...])

Create a sync

put(id, name, sync_type, is_outbound, *[, ...])

Update an import

put_archive(id, status)

Update the archive status of this object

put_files_csv(id, source, destination, ...)

Replace all attributes of this CSV Import

put_files_csv_archive(id, status)

Update the archive status of this object

put_projects(id, project_id)

Add an Import to a project

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

Set the permissions groups has on this object

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

Set the permissions users have on this object

put_syncs(id, sync_id, source, destination, *)

Update a sync

put_syncs_archive(id, sync_id, *[, status])

Update the archive status of this sync

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

Transfer ownership of this object to another user

delete_files_csv_runs(id, run_id)

Cancel a run

Parameters
idinteger

The ID of the csv_import.

run_idinteger

The ID of the run.

Returns
None

Response code 202: success

delete_files_runs(id, run_id)

Cancel a run

Parameters
idinteger

The ID of the import.

run_idinteger

The ID of the run.

Returns
None

Response code 202: success

delete_projects(id, project_id)

Remove an Import from a project

Parameters
idinteger

The ID of the Import.

project_idinteger

The ID of the project.

Returns
None

Response code 204: success

delete_shares_groups(id, group_id)

Revoke the permissions a group has on this object

Parameters
idinteger

The ID of the resource that is shared.

group_idinteger

The ID of the group.

Returns
None

Response code 204: success

delete_shares_users(id, user_id)

Revoke the permissions a user has on this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger

The ID of the user.

Returns
None

Response code 204: success

get(id)

Get details about an import

Parameters
idinteger

The ID for the import.

Returns
civis.response.Response
  • namestring

    The name of the import.

  • sync_typestring

    The type of sync to perform; one of Dbsync, AutoImport, GdocImport, GdocExport, and Salesforce.

  • sourcedict::
    • remote_host_id : integer

    • credential_id : integer

    • additional_credentialslist

      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

  • destinationdict::
    • remote_host_id : integer

    • credential_id : integer

    • additional_credentialslist

      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

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • parent_idinteger

    Parent id to trigger this import from

  • idinteger

    The ID for the import.

  • is_outbound : boolean

  • job_typestring

    The job type of this import.

  • syncslist::

    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
            This attribute is no longer available; defaults to false
            but cannot be used.
    - file : dict::
        - id : integer
            The file id.
    - google_worksheet : dict::
        - spreadsheet : string
            The spreadsheet document name.
        - spreadsheet_id : string
            The spreadsheet document id.
        - worksheet : string
            The worksheet tab name.
        - worksheet_id : integer
            The worksheet tab id.
    - salesforce : dict::
        - object_name : string
            The Salesforce object name.
    
    • destinationdict::
      • pathstring

        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_tabledict::
        • schemastring

          The database schema name.

        • tablestring

          The database table name.

        • use_without_schemaboolean

          This attribute is no longer available; defaults to false but cannot be used.

      • google_worksheetdict::
        • spreadsheetstring

          The spreadsheet document name.

        • spreadsheet_idstring

          The spreadsheet document id.

        • worksheetstring

          The worksheet tab name.

        • worksheet_idinteger

          The worksheet tab id.

    • advanced_optionsdict::
      • max_errors : integer

      • existing_table_rows : string

      • diststyle : string

      • distkey : string

      • sortkey1 : string

      • sortkey2 : string

      • column_delimiter : string

      • column_overridesdict

        Hash used for overriding auto-detected names and types, with keys being the index of the column being overridden.

      • escapedboolean

        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_namestring

        This parameter is deprecated

      • partition_schema_namestring

        This parameter is deprecated

      • partition_table_namestring

        This parameter is deprecated

      • partition_table_partition_column_min_namestring

        This parameter is deprecated

      • partition_table_partition_column_max_namestring

        This parameter is deprecated

      • last_modified_column : string

      • mysql_catalog_matches_schemaboolean

        This attribute is no longer available; defaults to true but cannot be used.

      • chunking_methodstring

        This parameter is deprecated

      • first_row_is_header : boolean

      • export_actionstring

        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_querystring

        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_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • running_asdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • next_run_atstring/time

    The time of the next scheduled run.

  • time_zonestring

    The time zone of this import.

  • hiddenboolean

    The hidden status of the item.

  • archivedstring

    The archival status of the requested item(s).

  • my_permission_levelstring

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

get_batches(id)

Get details about a batch import

Parameters
idinteger

The ID for the import.

Returns
civis.response.Response
  • idinteger

    The ID for the import.

  • schemastring

    The destination schema name. This schema must already exist in Redshift.

  • tablestring

    The destination table name, without the schema prefix. This table must already exist in Redshift.

  • remote_host_idinteger

    The ID of the destination database host.

  • statestring

    The state of the run; one of “queued”, “running”, “succeeded”, “failed”, or “cancelled”.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error returned by the run, if any.

  • hiddenboolean

    The hidden status of the item.

get_files_csv(id)

Get a CSV Import

Parameters
idinteger
Returns
civis.response.Response
  • idinteger

    The ID for the import.

  • namestring

    The name of the import.

  • sourcedict::
    • file_idslist

      The file ID(s) to import, if importing Civis file(s).

    • storage_pathdict::
      • storage_host_idinteger

        The ID of the source storage host.

      • credential_idinteger

        The ID of the credentials for the source storage host.

      • file_pathslist

        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.).

  • destinationdict::
    • schemastring

      The destination schema name.

    • tablestring

      The destination table name.

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

    • primary_keyslist

      A list of column(s) which together uniquely identify a row in the destination table.These columns must not contain NULL values. If the import mode is “upsert”, this field is required;see the Civis Helpdesk article on “Advanced CSV Imports via the Civis API” for more information.

    • last_modified_keyslist

      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_headerboolean

    A boolean value indicating whether or not the first row of the source file is a header row.

  • column_delimiterstring

    The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • escapedboolean

    A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.

  • compressionstring

    The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.

  • existing_table_rowsstring

    The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.

  • max_errorsinteger

    The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.

  • table_columnslist::

    An array of hashes corresponding to the columns in the order they appear in the source file. Each hash should have keys for database column “name” and “sqlType”.This parameter is required if the table does not exist, the table is being dropped, or the columns in the source file do not appear in the same order as in the destination table.The “sqlType” key is not required when appending to an existing table. - name : string

    The column name.

    • sql_typestring

      The SQL type of the column.

  • loosen_typesboolean

    If true, SQL types with precisions/lengths will have these values increased to accommodate data growth in future loads. Type loosening only occurs on table creation. Defaults to false.

  • executionstring

    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 accommodate concurrent upserts to the same table and speedier non-upsert imports.

  • redshift_destination_optionsdict::
    • diststylestring

      The diststyle to use for the table. One of “even”, “all”, or “key”.

    • distkeystring

      Distkey for this table in Redshift

    • sortkeyslist

      Sortkeys for this table in Redshift. Please provide a maximum of two.

  • hiddenboolean

    The hidden status of the item.

  • my_permission_levelstring

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

get_files_csv_runs(id, run_id)

Check status of a run

Parameters
idinteger

The ID of the csv_import.

run_idinteger

The ID of the run.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • csv_import_idinteger

    The ID of the csv_import.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

get_files_runs(id, run_id)

Check status of a run

Parameters
idinteger

The ID of the import.

run_idinteger

The ID of the run.

Returns
civis.response.Response
  • idinteger

    The ID of the run.

  • import_idinteger

    The ID of the import.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list(*, type='DEFAULT', destination='DEFAULT', source='DEFAULT', status='DEFAULT', author='DEFAULT', hidden='DEFAULT', archived='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List Imports

Parameters
typestring, optional

If specified, return imports of these types. It accepts a comma-separated list, possible values are ‘AutoImport’, ‘DbSync’, ‘Salesforce’, ‘GdocImport’.

destinationstring, optional

If specified, returns imports with one of these destinations. It accepts a comma-separated list of remote host ids.

sourcestring, 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’.

statusstring, optional

If specified, returns imports with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.

authorstring, optional

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

hiddenboolean, optional

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

archivedstring, optional

The archival status of the requested item(s).

limitinteger, optional

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

page_numinteger, optional

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

orderstring, 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_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • namestring

    The name of the import.

  • sync_typestring

    The type of sync to perform; one of Dbsync, AutoImport, GdocImport, GdocExport, and Salesforce.

  • sourcedict::
    • remote_host_id : integer

    • credential_id : integer

    • additional_credentialslist

      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

  • destinationdict::
    • remote_host_id : integer

    • credential_id : integer

    • additional_credentialslist

      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

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • idinteger

    The ID for the import.

  • is_outbound : boolean

  • job_typestring

    The job type of this import.

  • state : string

  • created_at : string/date-time

  • updated_at : string/date-time

  • last_rundict::
    • id : integer

    • state : string

    • created_atstring/time

      The time that the run was queued.

    • started_atstring/time

      The time that the run started.

    • finished_atstring/time

      The time that the run completed.

    • errorstring

      The error message for this run, if present.

  • userdict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • time_zonestring

    The time zone of this import.

  • archivedstring

    The archival status of the requested item(s).

list_batches(*, hidden='DEFAULT', limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List batch imports

Parameters
hiddenboolean, optional

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

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID for the import.

  • schemastring

    The destination schema name. This schema must already exist in Redshift.

  • tablestring

    The destination table name, without the schema prefix. This table must already exist in Redshift.

  • remote_host_idinteger

    The ID of the destination database host.

  • statestring

    The state of the run; one of “queued”, “running”, “succeeded”, “failed”, or “cancelled”.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error returned by the run, if any.

list_dependencies(id, *, user_id='DEFAULT')

List dependent objects for this object

Parameters
idinteger

The ID of the resource that is shared.

user_idinteger, optional

ID of target user

Returns
civis.response.Response
  • object_typestring

    Dependent object type

  • fco_typestring

    Human readable dependent object type

  • idinteger

    Dependent object ID

  • namestring

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

  • permission_levelstring

    Permission level of target user (not user’s groups) for dependent object, or null if no target user

  • shareableboolean

    Whether or not the requesting user can share this object.

list_files_csv_runs(id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List runs for the given csv_import

Parameters
idinteger

The ID of the csv_import.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of the run.

  • csv_import_idinteger

    The ID of the csv_import.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list_files_csv_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the csv_import.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_files_runs(id, *, limit='DEFAULT', page_num='DEFAULT', order='DEFAULT', order_dir='DEFAULT', iterator='DEFAULT')

List runs for the given import

Parameters
idinteger

The ID of the import.

limitinteger, optional

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

page_numinteger, optional

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

orderstring, optional

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

order_dirstring, optional

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

iteratorbool, optional

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

Returns
civis.response.PaginatedResponse
  • idinteger

    The ID of the run.

  • import_idinteger

    The ID of the import.

  • statestring

    The state of the run, one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • is_cancel_requestedboolean

    True if run cancel requested, else false.

  • started_atstring/time

    The time the last run started at.

  • finished_atstring/time

    The time the last run completed.

  • errorstring

    The error, if any, returned by the run.

list_files_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the import.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_projects(id, *, hidden='DEFAULT')

List the projects an Import belongs to

Parameters
idinteger

The ID of the Import.

hiddenboolean, optional

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

Returns
civis.response.Response
  • idinteger

    The ID for this project.

  • authordict::
    • idinteger

      The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • namestring

    The name of this project.

  • descriptionstring

    A description of the project.

  • userslist::

    Users who can see the project. - id : integer

    The ID of this user.

    • namestring

      This user’s name.

    • usernamestring

      This user’s username.

    • initialsstring

      This user’s initials.

    • onlineboolean

      Whether this user is online.

  • auto_share : boolean

  • created_at : string/time

  • updated_at : string/time

  • archivedstring

    The archival status of the requested item(s).

list_runs(id)

Get the run history of this import

Parameters
idinteger
Returns
civis.response.Response
  • id : integer

  • state : string

  • created_atstring/time

    The time that the run was queued.

  • started_atstring/time

    The time that the run started.

  • finished_atstring/time

    The time that the run completed.

  • errorstring

    The error message for this run, if present.

list_runs_logs(id, run_id, *, last_id='DEFAULT', limit='DEFAULT')

Get the logs for a run

Parameters
idinteger

The ID of the import.

run_idinteger

The ID of the run.

last_idinteger, 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.

limitinteger, optional

The maximum number of log messages to return. Default of 10000.

Returns
civis.response.Response
  • idinteger

    The ID of the log.

  • created_atstring/date-time

    The time the log was created.

  • messagestring

    The log message.

  • levelstring

    The level of the log. One of unknown,fatal,error,warn,info,debug.

list_shares(id)

List users and groups permissioned on this object

Parameters
idinteger

The ID of the resource that is shared.

Returns
civis.response.Response
  • readersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • writersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • ownersdict::
    • userslist::
      • id : integer

      • name : string

    • groupslist::
      • id : integer

      • name : string

  • total_user_sharesinteger

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

  • total_group_sharesinteger

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

patch_files_csv(id, *, name='DEFAULT', source='DEFAULT', destination='DEFAULT', first_row_is_header='DEFAULT', column_delimiter='DEFAULT', escaped='DEFAULT', compression='DEFAULT', existing_table_rows='DEFAULT', max_errors='DEFAULT', table_columns='DEFAULT', loosen_types='DEFAULT', execution='DEFAULT', redshift_destination_options='DEFAULT')

Update some attributes of this CSV Import

Parameters
idinteger

The ID for the import.

namestring, optional

The name of the import.

sourcedict, optional::
  • file_idslist

    The file ID(s) to import, if importing Civis file(s).

  • storage_pathdict::
    • storage_host_idinteger

      The ID of the source storage host.

    • credential_idinteger

      The ID of the credentials for the source storage host.

    • file_pathslist

      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.).

destinationdict, optional::
  • schemastring

    The destination schema name.

  • tablestring

    The destination table name.

  • remote_host_idinteger

    The ID of the destination database host.

  • credential_idinteger

    The ID of the credentials for the destination database.

  • primary_keyslist

    A list of column(s) which together uniquely identify a row in the destination table.These columns must not contain NULL values. If the import mode is “upsert”, this field is required;see the Civis Helpdesk article on “Advanced CSV Imports via the Civis API” for more information.

  • last_modified_keyslist

    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_headerboolean, optional

A boolean value indicating whether or not the first row of the source file is a header row.

column_delimiterstring, optional

The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

escapedboolean, optional

A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.

compressionstring, optional

The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.

existing_table_rowsstring, optional

The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.

max_errorsinteger, optional

The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.

table_columnslist, optional::

An array of hashes corresponding to the columns in the order they appear in the source file. Each hash should have keys for database column “name” and “sqlType”.This parameter is required if the table does not exist, the table is being dropped, or the columns in the source file do not appear in the same order as in the destination table.The “sqlType” key is not required when appending to an existing table. - name : string

The column name.

  • sql_typestring

    The SQL type of the column.

loosen_typesboolean, optional

If true, SQL types with precisions/lengths will have these values increased to accommodate data growth in future loads. Type loosening only occurs on table creation. Defaults to false.

executionstring, optional

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 accommodate concurrent upserts to the same table and speedier non-upsert imports.

redshift_destination_optionsdict, optional::
  • diststylestring

    The diststyle to use for the table. One of “even”, “all”, or “key”.

  • distkeystring

    Distkey for this table in Redshift

  • sortkeyslist

    Sortkeys for this table in Redshift. Please provide a maximum of two.

Returns
civis.response.Response
  • idinteger

    The ID for the import.

  • namestring

    The name of the import.

  • sourcedict::
    • file_idslist

      The file ID(s) to import, if importing Civis file(s).

    • storage_pathdict::
      • storage_host_idinteger

        The ID of the source storage host.

      • credential_idinteger

        The ID of the credentials for the source storage host.

      • file_pathslist

        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.).

  • destinationdict::
    • schemastring

      The destination schema name.

    • tablestring

      The destination table name.

    • remote_host_idinteger

      The ID of the destination database host.

    • credential_idinteger

      The ID of the credentials for the destination database.

    • primary_keyslist

      A list of column(s) which together uniquely identify a row in the destination table.These columns must not contain NULL values. If the import mode is “upsert”, this field is required;see the Civis Helpdesk article on “Advanced CSV Imports via the Civis API” for more information.

    • last_modified_keyslist

      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_headerboolean

    A boolean value indicating whether or not the first row of the source file is a header row.

  • column_delimiterstring

    The column delimiter for the file. Valid arguments are “comma”, “tab”, and “pipe”. Defaults to “comma”.

  • escapedboolean

    A boolean value indicating whether or not the source file has quotes escaped with a backslash.Defaults to false.

  • compressionstring

    The type of compression of the source file. Valid arguments are “gzip” and “none”. Defaults to “none”.

  • existing_table_rowsstring

    The behavior if a destination table with the requested name already exists. One of “fail”, “truncate”, “append”, “drop”, or “upsert”.Defaults to “fail”.

  • max_errorsinteger

    The maximum number of rows with errors to ignore before failing. This option is not supported for Postgres databases.

  • table_columnslist::

    An array of hashes corresponding to the columns in the order they appear in the source file. Each hash should have keys for database column “name” and “sqlType”.This parameter is required if the table does not exist, the table is being dropped, or the columns in the source file do not appear in the same order as in the destination table.The “sqlType” key is not required when appending to an existing table. - name : string

    The column name.

    • sql_typestring

      The SQL type of the column.

  • loosen_typesboolean

    If true, SQL types with precisions/lengths will have these values increased to accommodate data growth in future loads. Type loosening only occurs on table creation. Defaults to false.

  • executionstring

    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 accommodate concurrent upserts to the same table and speedier non-upsert imports.

  • redshift_destination_optionsdict::
    • diststylestring

      The diststyle to use for the table. One of “even”, “all”, or “key”.

    • distkeystring

      Distkey for this table in Redshift

    • sortkeyslist

      Sortkeys for this table in Redshift. Please provide a maximum of two.

  • hiddenboolean

    The hidden status of the item.

  • my_permission_levelstring

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

post(name, sync_type, is_outbound, *, source='DEFAULT', destination='DEFAULT', schedule='DEFAULT', notifications='DEFAULT', parent_id='DEFAULT', next_run_at='DEFAULT', time_zone='DEFAULT', hidden='DEFAULT')

Create a new import configuration

Parameters
namestring

The name of the import.

sync_typestring

The type of sync to perform; one of Dbsync, AutoImport, GdocImport, GdocExport, and Salesforce.

is_outboundboolean
sourcedict, optional::
  • remote_host_id : integer

  • credential_id : integer

  • additional_credentialslist

    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.

destinationdict, optional::
  • remote_host_id : integer

  • credential_id : integer

  • additional_credentialslist

    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.

scheduledict, optional::
  • scheduledboolean

    If the item is scheduled.

  • scheduled_dayslist

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

  • scheduled_hourslist

    Hours of the day it is scheduled on.

  • scheduled_minuteslist

    Minutes of the day it is scheduled on.

  • scheduled_runs_per_hourinteger

    Alternative to scheduled minutes, number of times to run per hour.

  • scheduled_days_of_monthlist

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

notificationsdict, optional::
  • urlslist

    URLs to receive a POST request at job completion

  • success_email_subjectstring

    Custom subject line for success e-mail.

  • success_email_bodystring

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

  • success_email_addresseslist

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

  • success_email_from_namestring

    Name from which success emails are sent; defaults to “Civis.”

  • success_email_reply_tostring

    Address for replies to success emails; defaults to the author of the job.

  • failure_email_addresseslist

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

  • stall_warning_minutesinteger

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

  • success_onboolean

    If success email notifications are on.

  • failure_onboolean

    If failure email notifications are on.

parent_idinteger, optional

Parent id to trigger this import from

next_run_atstring/time, optional

The time of the next scheduled run.

time_zonestring, optional

The time zone of this import.

hiddenboolean, optional

The hidden status of the item.

Returns
civis.response.Response
  • namestring

    The name of the import.

  • sync_typestring

    The type of sync to perform; one of Dbsync, AutoImport, GdocImport, GdocExport, and Salesforce.

  • sourcedict::
    • remote_host_id : integer

    • credential_id : integer

    • additional_credentialslist

      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

  • destinationdict::
    • remote_host_id : integer

    • credential_id : integer

    • additional_credentialslist

      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

  • scheduledict::
    • scheduledboolean

      If the item is scheduled.

    • scheduled_dayslist

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

    • scheduled_hourslist

      Hours of the day it is scheduled on.

    • scheduled_minuteslist

      Minutes of the day it is scheduled on.

    • scheduled_runs_per_hourinteger

      Alternative to scheduled minutes, number of times to run per hour.

    • scheduled_days_of_monthlist

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

  • notificationsdict::
    • urlslist

      URLs to receive a POST request at job completion

    • success_email_subjectstring

      Custom subject line for success e-mail.

    • success_email_bodystring

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

    • success_email_addresseslist

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

    • success_email_from_namestring

      Name from which success emails are sent; defaults to “Civis.”

    • success_email_reply_tostring

      Address for replies to success emails; defaults to the author of the job.

    • failure_email_addresseslist

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

    • stall_warning_minutesinteger

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

    • success_onboolean

      If success email notifications are on.

    • failure_onboolean

      If failure email notifications are on.

  • parent_idinteger

    Parent id to trigger this import from

  • idinteger

    The ID for the import.

  • is_outbound : boolean

  • job_typestring

    The job type of this import.

  • syncslist::

    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
            This attribute is no longer available; defaults to false
            but cannot be used.