client.files.get

A method of the Files endpoint.

get(id: int, *, link_expires_at: str = None, inline: bool = None) Response

Get details about a file

API URL: GET /files/{id}

import civis
client = civis.APIClient()
response = client.files.get(...)
Parameters:
idint

The ID of the file.

link_expires_atstr, optional

The date and time the download link will expire. Must be a time between now and 36 hours from now. Defaults to 30 minutes from now.

inlinebool, optional

If true, will return a url that can be displayed inline in HTML

Returns:
civis.Response
  • idint

    The ID of the file.

  • namestr

    The file name.

  • created_atstr (date-time)

    The date and time the file was created.

  • file_sizeint

    The file size.

  • expires_atstr (date-time)

    The date and time the file will expire. If not specified, the file will expire in 30 days. To keep a file indefinitely, specify null.

  • descriptionstr

    The user-defined description of the file.

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

  • download_urlstr

    A JSON string containing information about the URL of the file.

  • file_urlstr

    The URL that may be used to download the file.

  • detected_infocivis.Response
    • include_headerbool

      A boolean value indicating whether or not the first row of the file is a header row.

    • column_delimiterstr

      The column delimiter for the file. One of “comma”, “tab”, or “pipe”.

    • compressionstr

      The type of compression of the file. One of “gzip”, or “none”.

    • table_columnsList[civis.Response]

      An array of hashes corresponding to the columns in the file. Each hash should have keys for column “name” and “sql_type”

      • namestr

        The column name.

      • sql_typestr

        The SQL type of the column.

  • my_permission_levelstr

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