client.credentials.patch

A method of the Credentials endpoint.

patch(id: int, *, name: str = None, type: str = None, description: str = None, username: str = None, password: str = None, remote_host_id: int = None, user_id: int = None, state: str = None, system_credential: bool = None, default: bool = None, oauth: bool = None) Response

Update some attributes of a credential

API URL: PATCH /credentials/{id}

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

The ID of the credential.

namestr, optional

The name identifying the credential.

typestr, optional

The type of credential. Note: only these credentials can be created or edited via this API [“Amazon Web Services S3”, “CASS/NCOA PAF”, “Certificate”, “Civis Platform”, “Custom”, “Database”, “Google”, “Salesforce User”, “Salesforce Client”, “TableauUser”]

descriptionstr, optional

A long description of the credential.

usernamestr, optional

The username for the credential.

passwordstr, optional

The password for the credential.

remote_host_idint, optional

The ID of the remote host associated with the credential.

user_idint, optional

The ID of the user the credential is created for. Note: This attribute is only accepted if you are a Civis Admin User.

statestr, optional

The U.S. state for the credential. Only for VAN credentials.

system_credentialbool, optional

Boolean flag that sets a credential to be a system credential. System credentials can only be created by Civis Admins and will create a credential owned by the Civis Robot user.

defaultbool, optional

Whether or not the credential is a default. Only for Database credentials.

oauthbool, optional

Whether or not the credential is an OAuth credential.

Returns:
civis.Response
  • idint

    The ID of the credential.

  • namestr

    The name identifying the credential

  • typestr

    The credential’s type.

  • usernamestr

    The username for the credential.

  • descriptionstr

    A long description of the credential.

  • ownerstr

    The username of the user who this credential belongs to. Using user.username is preferred.

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

  • remote_host_idint

    The ID of the remote host associated with this credential.

  • remote_host_namestr

    The name of the remote host associated with this credential.

  • statestr

    The U.S. state for the credential. Only for VAN credentials.

  • created_atstr (time)

    The creation time for this credential.

  • updated_atstr (time)

    The last modification time for this credential.

  • defaultbool

    Whether or not the credential is a default. Only for Database credentials.

  • oauthbool

    Whether or not the credential is an OAuth credential.

  • providerstr

    For OAuth User credentials: the OAuth provider (e.g. “salesforce”).

  • provider_metadatacivis.Response

    For OAuth User credentials: non-secret provider metadata, e.g. the instance_url and granted scopes for Salesforce. Never contains tokens.