1. API
  2. Credentials

Credentials: List

Description

Retrieve a list of credentials.

Request

HTTP Method: GET

Parameter Description
team_id Optional List credentials for the given team.
folder_id Optional List credentials for the given folder.
per_page Optional Set the number of results returned per page. Defaults to 20.
page Optional Specify the page of results to return if there are multiple pages. Defaults to page 1.
filter Optional Filter by one of: UNUSED_IN_ACTIONS, UNRESTRICTED, RESTRICTED.
include_references Optional Set to true to include IDs of stories and actions referencing this credential.
curl -X GET \
  https://<tenant-domain>/api/v1/user_credentials \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

With story references:

curl -X GET \
  'https://<tenant-domain>/api/v1/user_credentials?include_references=true' \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'

Response

A successful request will return a JSON Array describing credentials in the Tines tenant.

Field description

Parameter Description
id credential ID.
name Name of the credential.
mode Describes the type of credential (TEXT, JWT, OAUTH, AWS, MTLS, HTTP_REQUEST_AGENT, MULTI_REQUEST).
team_id ID of team to which the credential belongs.
folder_id ID of folder to which the credential belongs.
read_access Control where this credential can be used (TEAM, GLOBAL, SPECIFIC_TEAMS).
shared_team_slugs List of teams' slugs where this credential can be used when read_access is SPECIFIC_TEAMS, otherwise empty.
description Description of the credential.
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.
aws_assumed_role_external_id External ID for AWS assumed role, if exists.
aws_authentication_type The authentication method with AWS, key-based-access or role-based-access(KEY, ROLE, INSTANCE_PROFILE), if exists.
allowed_hosts Array of domains where this credential can only be used in HTTP requests.
metadata Key/value metadata for use in HTTP requests alongside the credential value.
restriction_type The type of restriction applied to the use of the credential (RESTRICTED,RESTRICTED_TO_CREDENTIALS ,UNRESTRICTED )
test_credential_enabled A boolean value stating if the credential is enabled for using a test credential
test_credential Data specific to the test credential (created_at and updated_at)
owner An object representing the user who owns this credential. By default, the owner is the user who created the credential.
expires_at ISO 8601 Timestamp representing date and time the credential will expire. Default: null. See: Credential expiry
expiry_notifications_enabled A boolean value stating whether or not expiry notifications are enabled. Default: false. See: Credential expiry email reminders
credential_notification_recipient_user_ids List of user IDs that will be sent credential notifications (e.g. expiry notifications)
references List of stories referencing this credential, grouped by story (each with story_id, team_id, and action_ids). Only included when include_references=true. Limited to 100 visible actions per credential.

Sample response

{
  "user_credentials": [
    {
      "id": 1,
      "name": "tines_github_credential",
      "mode": "TEXT",
      "team_id": 2,
      "folder_id": 1,
      "read_access": "TEAM",
      "shared_team_slugs": [],
      "slug": "tines_github_credential",
      "created_at": "2021-03-26T12:34:16.540Z",
      "updated_at": "2021-03-26T12:34:16.540Z",
      "description": "",
      "aws_assumed_role_external_id": null,
      "aws_authentication_type": null,
      "allowed_hosts": [],
      "metadata": {},
      "restriction_type": "UNRESTRICTED",
      "test_credential_enabled": false,
      "owner": {
        "user_id": 1,
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane@tines.io"
      }
    }
  ],
  "meta": {
    "current_page": "https://<tenant-domain>/api/v1/user_credentials?per_page=1&page=1",
    "previous_page": null,
    "next_page": null,
    "next_page_number": null,
    "per_page": 1,
    "pages": 1,
    "count": 1
  }
}

Sample response with story references

{
  "user_credentials": [
    {
      "id": 1,
      "name": "tines_github_credential",
      "mode": "TEXT",
      "team_id": 2,
      "folder_id": 1,
      "read_access": "TEAM",
      "shared_team_slugs": [],
      "slug": "tines_github_credential",
      "created_at": "2021-03-26T12:34:16.540Z",
      "updated_at": "2021-03-26T12:34:16.540Z",
      "description": "",
      "aws_assumed_role_external_id": null,
      "aws_authentication_type": null,
      "allowed_hosts": [],
      "metadata": {},
      "restriction_type": "UNRESTRICTED",
      "test_credential_enabled": false,
      "owner": {
        "user_id": 1,
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane@tines.io"
      },
      "references": [
        {
          "story_id": 10,
          "team_id": 2,
          "action_ids": [101, 102]
        }
      ]
    }
  ],
  "meta": {
    "current_page": "https://<tenant-domain>/api/v1/user_credentials?include_references=true&per_page=1&page=1",
    "previous_page": null,
    "next_page": null,
    "next_page_number": null,
    "per_page": 1,
    "pages": 1,
    "count": 1
  }
}
Was this helpful?