Description

Use a HTTP POST request to create a Mutual TLS user credential.

Request

HTTP Method: POST

Parameter Description
name Name of the user credential.
mode Describes the type of credential (e.g. TEXT, JWT, MTLS)
team_id ID of Tines Team where the user credential will be located.
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
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

Sample request

curl -X POST \
  https://<tenant-domain>/api/v1/user_credentials \
  -H 'content-type: application/json' \
  -H 'x-user-email: <email-address>' \
  -H 'x-user-token: <api-token>' \
  -d '{
        "name": "foo",
        "value": "bar",
        "mode": "MTLS",
        "team_id": 2,
        "mtls_client_certificate": "<mtls_client_certificate_text>",
        "mtls_client_private_key": "<mtls_client_private_key_text>",
        "mtls_root_certificate": "<mtls_root_certificate_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": "MTLS",
  "team_id": 2,
  "folder_id": 1,
  "created_at": "2021-03-26T12:34:16.540Z",
  "updated_at": "2021-03-26T12:34:16.540Z"
}