Remote Hosts

class Remote_Hosts(session_kwargs, client, return_type='raw')

Examples

>>> import civis
>>> client = civis.APIClient()
>>> client.remote_hosts.list(...)

Methods

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)

Get a Remote Host

list(*[, type])

List Remote Hosts

list_data_sets(id, *[, credential_id, ...])

List data sets available from a remote host

list_shares(id)

List users and groups permissioned on this object

patch(id, *[, name, type, url, description])

Update some attributes of this Remote Host

post(name, url, type)

Create a Remote Host

post_authenticate(id, *[, credential_id, ...])

Authenticate against a remote host using either a credential or a user name and password

put(id, name, type, url, description)

Replace all attributes of this Remote Host

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

delete_shares_groups(id: int, group_id: int)

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

delete_shares_users(id: int, user_id: int)

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)

Get a Remote Host

Parameters:
idint
Returns:
civis.response.Response
  • idint

    The ID of the remote host.

  • namestr

    The human readable name for the remote host.

  • typestr

    The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

  • urlstr

    The URL for the remote host.

  • descriptionstr

    The description of the remote host.

  • my_permission_levelstr

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

  • userdict
    • 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_at : str (date-time)

  • updated_at : str (date-time)

list(*, type: str = None)

List Remote Hosts

Parameters:
typestr, optional

The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

Returns:
civis.response.Response
  • idint

    The ID of the remote host.

  • namestr

    The human readable name for the remote host.

  • typestr

    The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

  • urlstr

    The URL for the remote host.

list_data_sets(id: int, *, credential_id: int = None, username: str = None, password: str = None, q: str = None, s: bool = None)

List data sets available from a remote host

Parameters:
idint

The ID of the remote host.

credential_idint, optional

The credential ID.

usernamestr, optional

The user name for remote host.

passwordstr, optional

The password for remote host.

qstr, optional

The query string for data set.

sbool, optional

If true will only return schemas, otherwise, the results will be the full path.

Returns:
civis.response.Response
  • namestr

    The path to a data_set.

  • full_pathbool

    Boolean that indicates whether further querying needs to be done before the table can be selected.

list_shares(id: int)

List users and groups permissioned on this object

Parameters:
idint

The ID of the resource that is shared.

Returns:
civis.response.Response
  • readersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • writersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • ownersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

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

patch(id: int, *, name: str = None, type: str = None, url: str = None, description: str = None)

Update some attributes of this Remote Host

Parameters:
idint

The ID of the remote host.

namestr, optional

The human readable name for the remote host.

typestr, optional

The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

urlstr, optional

The URL for the remote host.

descriptionstr, optional

The description of the remote host.

Returns:
civis.response.Response
  • idint

    The ID of the remote host.

  • namestr

    The human readable name for the remote host.

  • typestr

    The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

  • urlstr

    The URL for the remote host.

  • descriptionstr

    The description of the remote host.

  • my_permission_levelstr

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

  • userdict
    • 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_at : str (date-time)

  • updated_at : str (date-time)

post(name: str, url: str, type: str)

Create a Remote Host

Parameters:
namestr

The human readable name for the remote host.

urlstr

The URL for the remote host.

typestr

The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

Returns:
civis.response.Response
  • idint

    The ID of the remote host.

  • namestr

    The human readable name for the remote host.

  • typestr

    The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

  • urlstr

    The URL for the remote host.

  • descriptionstr

    The description of the remote host.

  • my_permission_levelstr

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

  • userdict
    • 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_at : str (date-time)

  • updated_at : str (date-time)

post_authenticate(id: int, *, credential_id: int = None, username: str = None, password: str = None)

Authenticate against a remote host using either a credential or a user name and password

Parameters:
idint

The ID of the remote host.

credential_idint, optional

The credential ID.

usernamestr, optional

The user name for remote host.

passwordstr, optional

The password for remote host.

Returns:
None

Response code 204: success

put(id: int, name: str, type: str, url: str, description: str)

Replace all attributes of this Remote Host

Parameters:
idint

The ID of the remote host.

namestr

The human readable name for the remote host.

typestr

The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

urlstr

The URL for the remote host.

descriptionstr

The description of the remote host.

Returns:
civis.response.Response
  • idint

    The ID of the remote host.

  • namestr

    The human readable name for the remote host.

  • typestr

    The type of remote host. One of: RemoteHostTypes::Bigquery, RemoteHostTypes::Bitbucket, RemoteHostTypes::GitSSH, RemoteHostTypes::Github, RemoteHostTypes::GoogleDoc, RemoteHostTypes::JDBC, RemoteHostTypes::Postgres, RemoteHostTypes::Redshift, RemoteHostTypes::S3Storage, and RemoteHostTypes::Salesforce

  • urlstr

    The URL for the remote host.

  • descriptionstr

    The description of the remote host.

  • my_permission_levelstr

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

  • userdict
    • 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_at : str (date-time)

  • updated_at : str (date-time)

put_shares_groups(id: int, group_ids: List[int], permission_level: str, *, share_email_body: str = None, send_shared_email: bool = None)

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.Response
  • readersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • writersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • ownersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • 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_shares_users(id: int, user_ids: List[int], permission_level: str, *, share_email_body: str = None, send_shared_email: bool = None)

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.Response
  • readersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • writersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

  • ownersdict
    • usersList[dict]
      • id : int

      • name : str

    • groupsList[dict]
      • id : int

      • name : str

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