Nov 8, 2021

Input Secrets Routes

Input Secrets are essential initial data utilized in skript execution, boasting a higher security standard compared to regular Inputs. This ensures encoded and protected data, making Input Secrets ideal for storing passwords, credentials, and other confidential information.

These Joint API routes provide developers with comprehensive input secret management capabilities, enabling them to list, add new, edit, or delete input secrets as needed.

GET /joint-api/input-secrets/list?skript_id=&name_contains=&limit=&skip=&sort=

Provide a list of the input secrets created by developer or input secret examples for the specific skript.

URL Query Parameters
  • skript_id :string - skript _id
  • name_contains :string - a string contained in the input name
  • limit :number - restrict the number of documents returned by a query
  • skip :number - skip a specified number of documents in a query result
  • sort :string - sort the query results based on one or more fields in ascending or descending order

POST /joint-api/input-secrets/addnew

Create a new input secret and save it in the database.

Body Parameters
  • skript_id :string - the _id of the skript to which an input belongs
  • name :string - input secret name starting with inputSecret and ending with .json
  • val :any - the input secret's value (string, number, boolean, array, object)
Example
============
{
  "skript_id": "5df116babb572a5a79a50e9b",
  "name": "inputSecret.json",
  "val": { "password": "AbX#tr!" }
}
=== or ===
{
  "skript_id": "5df116babb572a5a79a50e9b",
  "name": "inputSecret2.json",
  "val": "AbX#tr!"
}

GET /joint-api/input-secrets/:inputSecret_id

Get information for a specific input secret.

URL Parameters
  • inputSecret_id :string - the inputSecret _id

PUT /joint-api/input-secrets/:inputSecret_id

Update a single input secret.

Body Parameters
  • skript_id :string - the _id of the skript to which an input secret belongs
  • name :string - input secret name
  • val :string - the input secret's value

DELETE /joint-api/input-secrets/:inputSecret_id

Delete the input secret.

URL Parameters
  • inputSecret_id :string - the inputSecret _id