client.queries.put_scripts
A method of the Queries endpoint.
- put_scripts(id: int, script_id: int) Response
Update the query’s associated script
API URL:
PUT /queries/{id}/scripts/{script_id}import civis client = civis.APIClient() response = client.queries.put_scripts(...)
- Parameters:
- idint
The query ID.
- script_idint
The ID of the script associated with this query.
- Returns:
civis.Response- idint
The query ID.
- databaseint
The database ID.
- sqlstr
The SQL to execute.
- credentialint
The credential ID.
- result_rowsList[List]
A preview of rows returned by the query.
- result_columnsList[str]
A preview of columns returned by the query.
- errorstr
The error message for this run, if present.
- started_atstr (date-time)
The start time of the last run.
- finished_atstr (date-time)
The end time of the last run.
- statestr
The state of the last run. One of queued, running, succeeded, failed or cancelled.
- script_idint
The ID of the script associated with this query.
- exceptionstr
Deprecated and not used.
created_at : str (time)
updated_at : str (time)
- last_run_idint
The ID of the last run.
- hiddenbool
The hidden status of the item.
- archivedbool
The archival status of the requested item(s).
- namestr
The name of the query.
- 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
- report_idint
The ID of the report associated with this query.