Secret

Encrypted key-value secrets stored per account for securely referencing sensitive values like API keys in configurations.

GET /secret_items

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/secret_items

List Secret records.

Returns the Secrets stored on the account: encrypted key/value pairs referenced elsewhere in Trackdrive, such as in webhooks or integrations. Restricted to account superusers; plain text values are never returned.

Params

Param name Description
ids
Optional

Return records matching these ids.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

page
Optional

Return the next page of results.

  • Must be a number.

per_page
Optional

How many results to return per page. The default is 25.

  • Must be a number.

created_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

created_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

fulltext
Optional

Search for any record that matches this text

  • Must be a String

time_zone
Optional

Date ranges will be parsed using this time zone.

columns
Optional
Specify the columns you would like returned by the API for a given resource. Limiting the columns can significantly increase API response time since only the requested data will be processed. columns=uuid,number,created_at

Must be any combination of:

  • id
  • legacy_id
  • type
  • uuid
  • created_at
  • updated_at
  • deleted_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • external_record_id
  • company_id
  • key
  • value
  • description
  • token_replacement_example
  • Must be a String

root
Optional

Pass root=false to return results without a root node and metadata.
For example:
GET /api/v1/calls?root=false will return [call1, call2, call3]
While:
GET /api/v1/calls will return {calls: [call1, call2, call3], metadata: {}}

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

GET /secret_items/new

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/secret_items/new

Build Secret with defaults.

Returns a Secret built with default attributes for previewing available fields. It is not saved.

Params

Param name Description
key
Optional Blank value allowed

Key

  • Must be a String

value
Optional Blank value allowed

The secret’s value, such as an API key or credential, stored encrypted so it can be referenced elsewhere without exposing it directly.

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

change_value
Optional Blank value allowed

Set to true to replace the stored value with the value given in this request; otherwise the existing value is kept.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

POST /secret_items

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/secret_items

Create Secret.

Creates a Secret with a key and a value. The value is stored encrypted and is never returned as plain text in later responses.

Params

Param name Description
key
Optional Blank value allowed

Key

  • Must be a String

value
Optional Blank value allowed

The secret’s value, such as an API key or credential, stored encrypted so it can be referenced elsewhere without exposing it directly.

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

change_value
Optional Blank value allowed

Set to true to replace the stored value with the value given in this request; otherwise the existing value is kept.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

GET /secret_items/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/secret_items/:id

Get Secret by id.

Returns a single Secret by id. Only its encrypted ciphertext and blind index are exposed, not the plain text value.

PUT /secret_items/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/secret_items/:id

Update Secret by id.

Updates a Secret's description or key. The stored value is only replaced when change_value is passed as true together with a new value.

Params

Param name Description
key
Optional Blank value allowed

Key

  • Must be a String

value
Optional Blank value allowed

The secret’s value, such as an API key or credential, stored encrypted so it can be referenced elsewhere without exposing it directly.

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

change_value
Optional Blank value allowed

Set to true to replace the stored value with the value given in this request; otherwise the existing value is kept.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

DELETE /secret_items/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/secret_items/:id

Destroy Secret by id.

Permanently deletes a Secret. Anything that referenced its key will no longer resolve a value.