Aliases
- class Aliases(session_kwargs, client, return_type='raw')
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
Examples
>>> import civis >>> client = civis.APIClient() >>> client.aliases.list_shares(...)
- delete(id: int) Response
Delete an alias
- Parameters:
- idint
The id of the Alias object.
- Returns:
- None
Response code 204: success
Revoke the permissions a group has on this object
- Parameters:
- idint
The ID of the resource that is shared.
- group_idint
The ID of the group.
- Returns:
- None
Response code 204: success
Revoke the permissions a user has on this object
- Parameters:
- idint
The ID of the resource that is shared.
- user_idint
The ID of the user.
- Returns:
- None
Response code 204: success
- get(id: int) Response
Get an Alias
- Parameters:
- idint
- Returns:
civis.Response
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- user_idint
The id of the user who created the alias
- display_namestr
The display name of the Alias object. Defaults to object name if not provided.
- get_object_type(object_type: str, alias: str) Response
Get details about an alias within an FCO type
- Parameters:
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- Returns:
civis.Response
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- user_idint
The id of the user who created the alias
- display_namestr
The display name of the Alias object. Defaults to object name if not provided.
- list(*, object_type: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) list[Response] | PaginatedResponse
List Aliases
- Parameters:
- object_typestr, optional
Filter results by object type. Pass multiple object types with a comma- separatedlist. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- limitint, optional
Number of results to return. Defaults to 50. Maximum allowed is 1000.
- page_numint, optional
Page number of the results to return. Defaults to the first page, 1.
- orderstr, optional
The field on which to order the result set. Defaults to id. Must be one of: id, object_type.
- order_dirstr, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iteratorbool, optional
If True, return a generator (specifically, a
civis.PaginatedResponse
object) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return a list ofcivis.Response
objects, whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.PaginatedResponse
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- user_idint
The id of the user who created the alias
- display_namestr
The display name of the Alias object. Defaults to object name if not provided.
- list_dependencies(id: int, *, user_id: int = None) Response
List dependent objects for this object
- Parameters:
- idint
The ID of the resource that is shared.
- user_idint, optional
ID of target user
- Returns:
civis.Response
- object_typestr
Dependent object type
- fco_typestr
Human readable dependent object type
- idint
Dependent object ID
- namestr
Dependent object name, or nil if the requesting user cannot read this object
- permission_levelstr
Permission level of target user (not user’s groups) for dependent object. Null if no target user or not shareable (e.g. a database table).
- descriptionstr
Additional information about the dependency, if relevant
- shareablebool
Whether or not the requesting user can share this object.
List users and groups permissioned on this object
- Parameters:
- idint
The ID of the resource that is shared.
- Returns:
civis.Response
- readers
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- readers
- writers
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- writers
- owners
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- owners
- total_user_sharesint
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_sharesint
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
- patch(id: int, *, object_id: int = None, object_type: str = None, alias: str = None, display_name: str = None) Response
Update some attributes of this Alias
- Parameters:
- idint
The id of the Alias object.
- object_idint, optional
The id of the object
- object_typestr, optional
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr, optional
The alias of the object
- display_namestr, optional
The display name of the Alias object. Defaults to object name if not provided.
- Returns:
civis.Response
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- user_idint
The id of the user who created the alias
- display_namestr
The display name of the Alias object. Defaults to object name if not provided.
- post(object_id: int, object_type: str, alias: str, *, display_name: str = None) Response
Create an Alias
- Parameters:
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- display_namestr, optional
The display name of the Alias object. Defaults to object name if not provided.
- Returns:
civis.Response
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- user_idint
The id of the user who created the alias
- display_namestr
The display name of the Alias object. Defaults to object name if not provided.
- put(id: int, object_id: int, object_type: str, alias: str, *, display_name: str = None) Response
Replace all attributes of this Alias
- Parameters:
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- display_namestr, optional
The display name of the Alias object. Defaults to object name if not provided.
- Returns:
civis.Response
- idint
The id of the Alias object.
- object_idint
The id of the object
- object_typestr
The type of the object. Valid types include: cass_ncoa, container_script, geocode, identity_resolution, dbt_script, python_script, r_script, javascript_script, sql_script, project, notebook, workflow, template_script, template_report, service, report, tableau and service_report.
- aliasstr
The alias of the object
- user_idint
The id of the user who created the alias
- display_namestr
The display name of the Alias object. Defaults to object name if not provided.
Set the permissions groups has on this object
- Parameters:
- idint
The ID of the resource that is shared.
- group_idsList[int]
An array of one or more group IDs.
- permission_levelstr
Options are: “read”, “write”, or “manage”.
- share_email_bodystr, optional
Custom body text for e-mail sent on a share.
- send_shared_emailbool, optional
Send email to the recipients of a share.
- Returns:
civis.Response
- readers
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- readers
- writers
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- writers
- owners
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- owners
- total_user_sharesint
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_sharesint
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
Set the permissions users have on this object
- Parameters:
- idint
The ID of the resource that is shared.
- user_idsList[int]
An array of one or more user IDs.
- permission_levelstr
Options are: “read”, “write”, or “manage”.
- share_email_bodystr, optional
Custom body text for e-mail sent on a share.
- send_shared_emailbool, optional
Send email to the recipients of a share.
- Returns:
civis.Response
- readers
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- readers
- writers
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- writers
- owners
civis.Response
- usersList[
civis.Response
] id : int
name : str
- usersList[
- groupsList[
civis.Response
] id : int
name : str
- groupsList[
- owners
- total_user_sharesint
For owners, the number of total users shared. For writers and readers, the number of visible users shared.
- total_group_sharesint
For owners, the number of total groups shared. For writers and readers, the number of visible groups shared.
- put_transfer(id: int, user_id: int, include_dependencies: bool, *, email_body: str = None, send_email: bool = None) Response
Transfer ownership of this object to another user
- Parameters:
- idint
The ID of the resource that is shared.
- user_idint
ID of target user
- include_dependenciesbool
Whether or not to give manage permissions on all dependencies
- email_bodystr, optional
Custom body text for e-mail sent on transfer.
- send_emailbool, optional
Send email to the target user of the transfer?
- Returns:
civis.Response
- dependenciesList[
civis.Response
] Dependent objects for this object
- object_typestr
Dependent object type
- fco_typestr
Human readable dependent object type
- idint
Dependent object ID
- namestr
Dependent object name, or nil if the requesting user cannot read this object
- permission_levelstr
Permission level of target user (not user’s groups) for dependent object. Null if no target user or not shareable (e.g. a database table).
- descriptionstr
Additional information about the dependency, if relevant
- sharedbool
Whether dependent object was successfully shared with target user
- dependenciesList[