client.reports.patch

A method of the Reports endpoint.

patch(id: int, *, name: str = None, script_id: int = None, code_body: str = None, config: str = None, app_state: dict = None, provide_api_key: bool = None, template_id: int = None, use_viewers_tableau_username: bool = None, description: str = None) Response

Update a report

API URL: PATCH /reports/{id}

import civis
client = civis.APIClient()
response = client.reports.patch(...)
Parameters:
idint

The ID of the report to modify.

namestr, optional

The name of the report.

script_idint, optional

The ID of the job (a script or a query) used to create this report.

code_bodystr, optional

The code for the report visualization.

configstr, optional
app_statedict, optional

The application state blob for this report.

provide_api_keybool, optional

Allow the report to provide an API key to front-end code.

template_idint, optional

The ID of the template used for this report. If null is passed, no template will back this report. Changes to the backing template will reset the report appState.

use_viewers_tableau_usernamebool, optional

Apply user level filtering on Tableau reports.

descriptionstr, optional

The user-defined description of the report.

Returns:
civis.Response
  • idint

    The ID of this report.

  • namestr

    The name of the report.

  • usercivis.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.

  • created_atstr (time)

    The creation time for this report.

  • updated_atstr (time)

    The last updated at time for this report.

  • typestr

    The type of the report. One of: ReportTypes::HTML, ReportTypes::Tableau, ReportTypes::ShinyApp, ReportTypes::SQL, ReportTypes::QuickAnalysis, ReportTypes::QuickDashboard

  • descriptionstr

    The user-defined description of the report.

  • my_permission_levelstr

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

  • archivedbool

    The archival status of the requested item(s).

  • projectsList[civis.Response]

    A list of projects containing the report.

    • idint

      The ID for the project.

    • namestr

      The name of the project.

  • statestr

    The status of the report’s last run.

  • finished_atstr (time)

    The time that the report’s last run finished.

  • viz_updated_atstr (time)

    The time that the report’s visualization was last updated.

  • scriptcivis.Response
    • idint

      The ID for the script.

    • namestr

      The name of the script.

    • sqlstr

      The raw SQL query for the script, if applicable.

  • job_pathstr

    The link to details of the job that backs this report.

  • tableau_id : int

  • template_idint

    The ID of the template used for this report.

  • auth_thumbnail_urlstr

    URL for a thumbnail of the report.

  • last_runcivis.Response
    • id : int

    • statestr

      The state of the run. One of queued, running, succeeded, failed or cancelled.

    • 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.

  • hiddenbool

    The hidden status of the item.

  • auth_data_urlstr

    DEPRECATED: For legacy reports

  • auth_code_urlstr

    Link to code to render in the report.

  • configstr

    Any configuration metadata for this report.

  • valid_output_filebool

    Whether the job (a script or a query) that backs the report currently has a valid output file.

  • provide_api_keybool

    Whether the report requests an API Key from the report viewer.

  • api_keystr

    A Civis API key that can be used by this report.

  • api_key_idint

    The ID of the API key. Can be used for auditing API use by this report.

  • app_statecivis.Response

    Any application state blob for this report.

  • use_viewers_tableau_usernamebool

    Apply user level filtering on Tableau reports.