Models
- class Models(session_kwargs, client, return_type='raw')
Methods
delete_builds
(id, build_id)Cancel a build
delete_projects
(id, project_id)Remove a Model 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)Retrieve model configuration
get_builds
(id, build_id)Check status of a build
list
(*[, model_name, training_table_name, ...])List
list_builds
(id, *[, limit, page_num, order, ...])List builds for the given Model job
list_builds_logs
(id, build_id, *[, last_id, ...])Get the logs for a build
list_dependencies
(id, *[, user_id])List dependent objects for this object
list_projects
(id, *[, hidden])List the projects a Model belongs to
list_schedules
(id)Show the model build schedule
list_shares
(id)List users and groups permissioned on this object
List all available model types
put_archive
(id, status)Update the archive status of this object
put_projects
(id, project_id)Add a Model 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
Examples
>>> import civis >>> client = civis.APIClient() >>> client.models.list_types(...)
- delete_builds(id: int, build_id: int) Response
Cancel a build
- Parameters:
- idint
The ID of the Model job.
- build_idint
The ID of the build.
- Returns:
- None
Response code 202: success
- delete_projects(id: int, project_id: int) Response
Remove a Model from a project
- Parameters:
- idint
The ID of the Model.
- project_idint
The ID of the project.
- 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
Retrieve model configuration
- Parameters:
- idint
The ID of the model.
- Returns:
civis.Response
- idint
The ID of the model.
- table_namestr
The qualified name of the table containing the training set from which to build the model.
- database_idint
The ID of the database holding the training set table used to build the model.
- credential_idint
The ID of the credential used to read the target table. Defaults to the user’s default credential.
- model_namestr
The name of the model.
- descriptionstr
A description of the model.
- interaction_termsbool
Whether to search for interaction terms.
- box_cox_transformationbool
Whether to transform data so that it assumes a normal distribution. Valid only with continuous models.
- model_type_idint
The ID of the model’s type.
- primary_keystr
The unique ID (primary key) of the training dataset.
- dependent_variablestr
The dependent variable of the training dataset.
- dependent_variable_orderList[str]
The order of dependent variables, especially useful for Ordinal Modeling.
- excluded_columnsList[str]
A list of columns which will be considered ineligible to be independent variables.
- limiting_sqlstr
A custom SQL WHERE clause used to filter the rows used to build the model. (e.g., “id > 105”).
- active_build_idint
The ID of the current active build, the build used to score predictions.
- cross_validation_parameters
civis.Response
Cross validation parameter grid for tree methods, e.g. {“n_estimators”: [100, 200, 500], “learning_rate”: [0.01, 0.1], “max_depth”: [2, 3]}.
- cross_validation_parameters
- number_of_foldsint
Number of folds for cross validation. Default value is 5.
- notifications
civis.Response
- urlsList[str]
URLs to receive a POST request at job completion
- success_email_subjectstr
Custom subject line for success e-mail.
- success_email_bodystr
Custom body text for success e-mail, written in Markdown.
- success_email_addressesList[str]
Addresses to notify by e-mail when the job completes successfully.
- success_email_from_namestr
Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_tostr
Address for replies to success emails; defaults to the author of the job.
- failure_email_addressesList[str]
Addresses to notify by e-mail when the job fails.
- stall_warning_minutesint
Stall warning emails will be sent after this amount of minutes.
- success_onbool
If success email notifications are on. Defaults to user’s preferences.
- failure_onbool
If failure email notifications are on. Defaults to user’s preferences.
- notifications
- schedule
civis.Response
- scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- parent_idint
The ID of the parent job that will trigger this model.
- running_as
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.
- running_as
- time_zonestr
The time zone of this model.
- last_run
civis.Response
id : int
state : str
- created_atstr (time)
The time that the run was queued.
- started_atstr (time)
The time that the run started.
- finished_atstr (time)
The time that the run completed.
- errorstr
The error message for this run, if present.
- last_run
- hiddenbool
The hidden status of the item.
- user
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.
- user
- created_atstr (date-time)
The time the model was created.
- updated_atstr (date-time)
The time the model was updated.
- current_build_statestr
The status of the current model build. One of “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- current_build_exceptionstr
Exception message, if applicable, of the current model build.
- buildsList[
civis.Response
] A list of trained models available for making predictions.
- idint
The ID of the model build.
- namestr
The name of the model build.
- created_atstr
The time the model build was created.
- descriptionstr
A description of the model build.
- root_mean_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- r_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- roc_aucfloat (float)
A key metric for binary, multinomial, and ordinal models. Nil for other model types.
- buildsList[
- predictionsList[
civis.Response
] The tables upon which the model will be applied.
- idint
The ID of the model to which to apply the prediction.
- table_namestr
The qualified name of the table on which to apply the predictive model.
- primary_keyList[str]
The primary key or composite keys of the table being predicted.
- limiting_sqlstr
A SQL WHERE clause used to scope the rows to be predicted.
- output_tablestr
The qualified name of the table to be created which will contain the model’s predictions.
- schedule
civis.Response
- scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- statestr
The status of the prediction. One of: “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- predictionsList[
- last_output_locationstr
The output JSON for the last build.
- archivedstr
The archival status of the requested item(s).
- get_builds(id: int, build_id: int) Response
Check status of a build
- Parameters:
- idint
The ID of the Model job.
- build_idint
The ID of the build.
- Returns:
civis.Response
- idint
The ID of the model build.
- statestr
The state of the model build.one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- errorstr
The error, if any, returned by the build.
- namestr
The name of the model build.
- created_atstr
The time the model build was created.
- descriptionstr
A description of the model build.
- root_mean_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- r_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- roc_aucfloat (float)
A key metric for binary, multinomial, and ordinal models. Nil for other model types.
- transformation_metadatastr
A string representing the full JSON output of the metadata for transformation of column names
- outputstr
A string representing the JSON output for the specified build. Only present when smaller than 10KB in size.
- output_locationstr
A URL representing the location of the full JSON output for the specified build.The URL link will be valid for 5 minutes.
- list(*, model_name: str = None, training_table_name: str = None, dependent_variable: str = None, status: str = None, author: str = None, hidden: bool = None, archived: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) list[Response] | PaginatedResponse
List
- Parameters:
- model_namestr, optional
If specified, will be used to filter the models returned. Substring matching is supported. (e.g., “modelName=model” will return both “model1” and “my model”).
- training_table_namestr, optional
If specified, will be used to filter the models returned by the training dataset table name. Substring matching is supported. (e.g., “trainingTableName=table” will return both “table1” and “my_table”).
- dependent_variablestr, optional
If specified, will be used to filter the models returned by the dependent variable column name. Substring matching is supported. (e.g., “dependentVariable=predictor” will return both “predictor” and “my predictor”).
- statusstr, optional
If specified, returns models with one of these statuses. It accepts a comma-separated list, possible values are ‘running’, ‘failed’, ‘succeeded’, ‘idle’, ‘scheduled’.
- authorstr, optional
If specified, return items from any of these authors. It accepts a comma- separated list of user IDs.
- hiddenbool, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- archivedstr, optional
The archival status of the requested item(s).
- limitint, optional
Number of results to return. Defaults to its maximum of 50.
- 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 updated_at. Must be one of: updated_at, name, created_at, last_run.updated_at.
- 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.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 model.
- table_namestr
The qualified name of the table containing the training set from which to build the model.
- database_idint
The ID of the database holding the training set table used to build the model.
- credential_idint
The ID of the credential used to read the target table. Defaults to the user’s default credential.
- model_namestr
The name of the model.
- descriptionstr
A description of the model.
- interaction_termsbool
Whether to search for interaction terms.
- box_cox_transformationbool
Whether to transform data so that it assumes a normal distribution. Valid only with continuous models.
- model_type_idint
The ID of the model’s type.
- primary_keystr
The unique ID (primary key) of the training dataset.
- dependent_variablestr
The dependent variable of the training dataset.
- dependent_variable_orderList[str]
The order of dependent variables, especially useful for Ordinal Modeling.
- excluded_columnsList[str]
A list of columns which will be considered ineligible to be independent variables.
- limiting_sqlstr
A custom SQL WHERE clause used to filter the rows used to build the model. (e.g., “id > 105”).
- cross_validation_parameters
civis.Response
Cross validation parameter grid for tree methods, e.g. {“n_estimators”: [100, 200, 500], “learning_rate”: [0.01, 0.1], “max_depth”: [2, 3]}.
- cross_validation_parameters
- number_of_foldsint
Number of folds for cross validation. Default value is 5.
- schedule
civis.Response
- scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- parent_idint
The ID of the parent job that will trigger this model.
- time_zonestr
The time zone of this model.
- last_run
civis.Response
id : int
state : str
- created_atstr (time)
The time that the run was queued.
- started_atstr (time)
The time that the run started.
- finished_atstr (time)
The time that the run completed.
- errorstr
The error message for this run, if present.
- last_run
- user
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.
- user
- created_atstr (date-time)
The time the model was created.
- updated_atstr (date-time)
The time the model was updated.
- current_build_statestr
The status of the current model build. One of “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- current_build_exceptionstr
Exception message, if applicable, of the current model build.
- buildsList[
civis.Response
] A list of trained models available for making predictions.
- idint
The ID of the model build.
- namestr
The name of the model build.
- created_atstr
The time the model build was created.
- descriptionstr
A description of the model build.
- root_mean_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- r_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- roc_aucfloat (float)
A key metric for binary, multinomial, and ordinal models. Nil for other model types.
- buildsList[
- predictionsList[
civis.Response
] The tables upon which the model will be applied.
- idint
The ID of the model to which to apply the prediction.
- table_namestr
The qualified name of the table on which to apply the predictive model.
- primary_keyList[str]
The primary key or composite keys of the table being predicted.
- limiting_sqlstr
A SQL WHERE clause used to scope the rows to be predicted.
- output_tablestr
The qualified name of the table to be created which will contain the model’s predictions.
- statestr
The status of the prediction. One of: “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- predictionsList[
- last_output_locationstr
The output JSON for the last build.
- archivedstr
The archival status of the requested item(s).
- list_builds(id: int, *, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) list[Response] | PaginatedResponse
List builds for the given Model job
- Parameters:
- idint
The ID of the Model job.
- limitint, optional
Number of results to return. Defaults to 20. Maximum allowed is 100.
- 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.
- 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.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 model build.
- statestr
The state of the model build.one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.
- errorstr
The error, if any, returned by the build.
- namestr
The name of the model build.
- created_atstr
The time the model build was created.
- descriptionstr
A description of the model build.
- root_mean_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- r_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- roc_aucfloat (float)
A key metric for binary, multinomial, and ordinal models. Nil for other model types.
- transformation_metadatastr
A string representing the full JSON output of the metadata for transformation of column names
- outputstr
A string representing the JSON output for the specified build. Only present when smaller than 10KB in size.
- output_locationstr
A URL representing the location of the full JSON output for the specified build.The URL link will be valid for 5 minutes.
- list_builds_logs(id: int, build_id: int, *, last_id: int = None, limit: int = None) Response
Get the logs for a build
- Parameters:
- idint
The ID of the Model job.
- build_idint
The ID of the build.
- last_idint, 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.
- limitint, optional
The maximum number of log messages to return. Default of 10000.
- Returns:
civis.Response
- idint
The ID of the log.
- created_atstr (date-time)
The time the log was created.
- messagestr
The log message.
- levelstr
The level of the log. One of unknown,fatal,error,warn,info,debug.
- 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_projects(id: int, *, hidden: bool = None) Response
List the projects a Model belongs to
- Parameters:
- idint
The ID of the Model.
- hiddenbool, optional
If specified to be true, returns hidden items. Defaults to false, returning non-hidden items.
- Returns:
civis.Response
- idint
The ID for this project.
- 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.
- author
- namestr
The name of this project.
- descriptionstr
A description of the project.
- usersList[
civis.Response
] Users who can see the project.
- 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.
- usersList[
auto_share : bool
created_at : str (time)
updated_at : str (time)
- archivedstr
The archival status of the requested item(s).
- list_schedules(id: int) Response
Show the model build schedule
- Parameters:
- idint
The ID of the model associated with this schedule.
- Returns:
civis.Response
- idint
The ID of the model associated with this schedule.
- schedule
civis.Response
- scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
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.
- list_types() Response
List all available model types
- Returns:
civis.Response
- idint
The ID of the model type.
- algorithmstr
The name of the algorithm used to train the model.
- dv_typestr
The type of dependent variable predicted by the model.
- fint_allowedbool
Whether this model type supports searching for interaction terms.
- put_archive(id: int, status: bool) Response
Update the archive status of this object
- Parameters:
- idint
The ID of the object.
- statusbool
The desired archived status of the object.
- Returns:
civis.Response
- idint
The ID of the model.
- table_namestr
The qualified name of the table containing the training set from which to build the model.
- database_idint
The ID of the database holding the training set table used to build the model.
- credential_idint
The ID of the credential used to read the target table. Defaults to the user’s default credential.
- model_namestr
The name of the model.
- descriptionstr
A description of the model.
- interaction_termsbool
Whether to search for interaction terms.
- box_cox_transformationbool
Whether to transform data so that it assumes a normal distribution. Valid only with continuous models.
- model_type_idint
The ID of the model’s type.
- primary_keystr
The unique ID (primary key) of the training dataset.
- dependent_variablestr
The dependent variable of the training dataset.
- dependent_variable_orderList[str]
The order of dependent variables, especially useful for Ordinal Modeling.
- excluded_columnsList[str]
A list of columns which will be considered ineligible to be independent variables.
- limiting_sqlstr
A custom SQL WHERE clause used to filter the rows used to build the model. (e.g., “id > 105”).
- active_build_idint
The ID of the current active build, the build used to score predictions.
- cross_validation_parameters
civis.Response
Cross validation parameter grid for tree methods, e.g. {“n_estimators”: [100, 200, 500], “learning_rate”: [0.01, 0.1], “max_depth”: [2, 3]}.
- cross_validation_parameters
- number_of_foldsint
Number of folds for cross validation. Default value is 5.
- notifications
civis.Response
- urlsList[str]
URLs to receive a POST request at job completion
- success_email_subjectstr
Custom subject line for success e-mail.
- success_email_bodystr
Custom body text for success e-mail, written in Markdown.
- success_email_addressesList[str]
Addresses to notify by e-mail when the job completes successfully.
- success_email_from_namestr
Name from which success emails are sent; defaults to “Civis.”
- success_email_reply_tostr
Address for replies to success emails; defaults to the author of the job.
- failure_email_addressesList[str]
Addresses to notify by e-mail when the job fails.
- stall_warning_minutesint
Stall warning emails will be sent after this amount of minutes.
- success_onbool
If success email notifications are on. Defaults to user’s preferences.
- failure_onbool
If failure email notifications are on. Defaults to user’s preferences.
- notifications
- schedule
civis.Response
- scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- parent_idint
The ID of the parent job that will trigger this model.
- running_as
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.
- running_as
- time_zonestr
The time zone of this model.
- last_run
civis.Response
id : int
state : str
- created_atstr (time)
The time that the run was queued.
- started_atstr (time)
The time that the run started.
- finished_atstr (time)
The time that the run completed.
- errorstr
The error message for this run, if present.
- last_run
- hiddenbool
The hidden status of the item.
- user
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.
- user
- created_atstr (date-time)
The time the model was created.
- updated_atstr (date-time)
The time the model was updated.
- current_build_statestr
The status of the current model build. One of “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- current_build_exceptionstr
Exception message, if applicable, of the current model build.
- buildsList[
civis.Response
] A list of trained models available for making predictions.
- idint
The ID of the model build.
- namestr
The name of the model build.
- created_atstr
The time the model build was created.
- descriptionstr
A description of the model build.
- root_mean_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- r_squared_errorfloat (float)
A key metric for continuous models. Nil for other model types.
- roc_aucfloat (float)
A key metric for binary, multinomial, and ordinal models. Nil for other model types.
- buildsList[
- predictionsList[
civis.Response
] The tables upon which the model will be applied.
- idint
The ID of the model to which to apply the prediction.
- table_namestr
The qualified name of the table on which to apply the predictive model.
- primary_keyList[str]
The primary key or composite keys of the table being predicted.
- limiting_sqlstr
A SQL WHERE clause used to scope the rows to be predicted.
- output_tablestr
The qualified name of the table to be created which will contain the model’s predictions.
- schedule
civis.Response
- scheduledbool
If the item is scheduled.
- scheduled_daysList[int]
Days of the week, based on numeric value starting at 0 for Sunday. Mutually exclusive with scheduledDaysOfMonth
- scheduled_hoursList[int]
Hours of the day it is scheduled on.
- scheduled_minutesList[int]
Minutes of the day it is scheduled on.
- scheduled_runs_per_hourint
Deprecated in favor of scheduled minutes.
- scheduled_days_of_monthList[int]
Days of the month it is scheduled on, mutually exclusive with scheduledDays.
- schedule
- statestr
The status of the prediction. One of: “succeeded”, “failed”, “queued”, or “running,”or “idle”, if no build has been attempted.
- predictionsList[
- last_output_locationstr
The output JSON for the last build.
- archivedstr
The archival status of the requested item(s).
- put_projects(id: int, project_id: int) Response
Add a Model to a project
- Parameters:
- idint
The ID of the Model.
- project_idint
The ID of the project.
- Returns:
- None
Response code 204: success
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[