Remote Hosts
- class Remote_Hosts(session_kwargs, client, return_type='raw')
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
Examples
>>> import civis >>> client = civis.APIClient() >>> client.remote_hosts.list(...)
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
Get a Remote Host
- Parameters:
- idint
- Returns:
civis.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”.
- 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_at : str (date-time)
updated_at : str (date-time)
- list(*, type: str = None) Response
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
- 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) Response
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
- 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 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.
- patch(id: int, *, name: str = None, type: str = None, url: str = None, description: str = None) Response
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
- 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”.
- 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_at : str (date-time)
updated_at : str (date-time)
- post(name: str, url: str, type: str) Response
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
- 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”.
- 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_at : str (date-time)
updated_at : str (date-time)
- post_authenticate(id: int, *, credential_id: int = None, username: str = None, password: str = None) Response
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) Response
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
- 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”.
- 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_at : str (date-time)
updated_at : str (date-time)
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.