Organizations
- class Organizations(session_kwargs, client, return_type='raw')
Civis API
/organizationsendpoint:import civis client = civis.APIClient() # Call client.organizations.<method>(<arguments>) to make a request, e.g.: client.organizations.list_favorites(...)
Methods
delete_favorites(id)Unfavorite an item for your organization
list_favorites(*[, object_id, object_type, ...])List Favorites
post_favorites(object_id, object_type)Favorite an item for your organization
- delete_favorites(id: int) Response
Unfavorite an item for your organization
API URL:
DELETE /organizations/favorites/{id}- Parameters:
- idint
The id of the favorite.
- Returns:
- None
Response code 204: success
- list_favorites(*, object_id: int = None, object_type: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse
List Favorites
API URL:
GET /organizations/favorites- Parameters:
- object_idint, optional
The id of the object. If specified as a query parameter, must also specify object_type parameter.
- object_typestr, optional
The type of the object that is favorited. Valid options: Container Script, Identity Resolution, Import, Python Script, R Script, dbt Script, JavaScript Script, SQL Script, Template Script, Project, Workflow, Table, Tableau Report, Service Report, HTML Report, SQL 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 created_at. Must be one of: created_at, object_type, object_id.
- order_dirstr, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.
- iteratorbool, optional
If True, return a generator (specifically, a
civis.PaginatedResponseobject) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.PaginatedResponse- idint
The id of the favorite.
- object_idint
The id of the object. If specified as a query parameter, must also specify object_type parameter.
- object_typestr
The type of the object that is favorited. Valid options: Container Script, Identity Resolution, Import, Python Script, R Script, dbt Script, JavaScript Script, SQL Script, Template Script, Project, Workflow, Table, Tableau Report, Service Report, HTML Report, SQL Report
- object_namestr
The name of the object that is favorited.
- created_atstr (time)
The time this favorite was created.
- object_updated_atstr (time)
The time the object that is favorited was last updated
- object_author
civis.Response - idint
The ID of this user.
- namestr
This user’s name.
- usernamestr
This user’s username.
- initialsstr
This user’s initials.
- onlinebool
Whether this user is online.
- object_author
- positionint
The rank position of this favorite. Use the patch users/me/favorites/:id/ranking/ endpoints to update.
- post_favorites(object_id: int, object_type: str) Response
Favorite an item for your organization
API URL:
POST /organizations/favorites- Parameters:
- object_idint
The id of the object. If specified as a query parameter, must also specify object_type parameter.
- object_typestr
The type of the object that is favorited. Valid options: Container Script, Identity Resolution, Import, Python Script, R Script, dbt Script, JavaScript Script, SQL Script, Template Script, Project, Workflow, Table, Tableau Report, Service Report, HTML Report, SQL Report
- Returns:
civis.Response- idint
The id of the favorite.
- object_idint
The id of the object. If specified as a query parameter, must also specify object_type parameter.
- object_typestr
The type of the object that is favorited. Valid options: Container Script, Identity Resolution, Import, Python Script, R Script, dbt Script, JavaScript Script, SQL Script, Template Script, Project, Workflow, Table, Tableau Report, Service Report, HTML Report, SQL Report
- object_namestr
The name of the object that is favorited.
- created_atstr (time)
The time this favorite was created.
- object_updated_atstr (time)
The time the object that is favorited was last updated
- object_author
civis.Response - idint
The ID of this user.
- namestr
This user’s name.
- usernamestr
This user’s username.
- initialsstr
This user’s initials.
- onlinebool
Whether this user is online.
- object_author