Description

Use a HTTP POST request to update a user credential.

Request

HTTP Method: PUT

Parameter Description
mode Describes the type of credential (TEXT, JWT, OAUTH, AWS, MTLS, HTTP_REQUEST_AGENT)
name Optional Name of the user credential.
folder_id Optional ID of folder to which the user credential will be located
read_access Optional Control where this credential can be used (TEAM, GLOBAL). default: TEAM

TEXT Options

Parameter Description
value Value of the user credential.

OAUTH Options

Parameter Description
oauth_url Your app oauth url
oauth_token_url Your app oauth token url
oauth_client_id The client ID for your app
oauth_client_secret The client secret for your app
oauth_scope Enter one or more scope values indicating which parts of the user’s account you wish to access
oauth_grant_type Tines supports client_credentials and authorization_code grants.

MTLS Options

Parameter Description
mtls_client_certificate The certificate file issued by the CA for this client
mtls_client_private_key The private key file for the client certificate
mtls_root_certificate The root certificate file for the certificate authority (CA) responsible for signatures

JWT Options

Parameter Description
jwt_algorithm The algorithm to be used when computing the JWT
jwt_payload The payload to be included in the JWT
jwt_auto_generate_time_claims Auto generate ‘iat’ & ‘exp’ claims
jwt_private_key The private key to be used to sign the JWT

HTTP_REQUEST_AGENT Options

Parameter Description
http_request_options JSON string representing the Agents::HTTPRequestAgent Options
http_request_location_of_token Location of token from response

AWS Options

Parameter Description
aws_authentication_type The authentication method with AWS, key-based-access or role-based-access(KEY,ROLE)
aws_access_key The access key from your AWS Security Credentials
aws_secret_key The access secret from your AWS Security Credentials
aws_assumed_role_arn Required for role-based-access The ARN of the role you wish to assume, e.g.: arn:aws:iam::123456789012:role/write-access-role
aws_assumed_role_external_id Optional The external ID to be used when making the request

Sample request

curl -X PUT \
  https://<tenant-domain>/api/v1/user_credentials/<user-credential-id> \
  -H 'content-type: application/json' \
  -H 'x-user-email: <email-address>' \
  -H 'x-user-token: <api-token>' \
  -d '{
        "name": "foo",
        "value": "bar",
        "mode": "TEXT",
    }'

Response

A successful request will return a JSON object describing the created credential.

Field description

Parameter Description
id User credential ID.
name Name of the user credential.
mode Describes the type of credential (TEXT, JWT, OAUTH, AWS, MTLS, HTTP_REQUEST_AGENT)
team_id ID of team to which the user credential belongs.
folder_id ID of folder to which the user credential belongs.
read_access Control where this credential can be used.
slug An underscored representation of the credential name
created_at ISO 8601 Timestamp representing date and time the credential was created.
updated_at ISO 8601 Timestamp representing date and time the credential was last updated.

Sample response

{
  "id": 1,
  "name": "tines_api_credential",
  "mode": "TEXT",
  "team_id": 2,
  "folder_id": 1,
  "created_at": "2021-03-26T12:34:16.540Z",
  "updated_at": "2021-03-26T12:34:16.540Z"
}