Nov 8, 2021
Inputs Routes
Inputs are the initial data utilized in skript execution. These Joint API routes provide developers with comprehensive input management capabilities, enabling them to list, add new, edit, or delete inputs as needed.
GET /joint-api/inputs/list?skript_id=&name_contains=&limit=&skip=&sort=
Provide a list of the inputs created by developer or input 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/inputs/addnew
Create a new input and save it in the database.
Body Parameters
- skript_id :string - the _id of the skript to which an input belongs
- name :string - input name starting with input and ending with .json
- val :any - the input's value (string, number, boolean, array, object)
Example
============
{
"skript_id": "5df116babb572a5a79a50e9b",
"name": "input.json",
"val": { "url": "https://ebay.com"}
}
=== or ===
{
"skript_id": "5df116babb572a5a79a50e9b",
"name": "input2.json",
"val": 128
}
GET /joint-api/inputs/:input_id
Get information for a specific input.
URL Parameters
- input_id :string - the input _id
PUT /joint-api/inputs/:input_id
Update a single input.
Body Parameters
- skript_id :string - the _id of the skript to which an input belongs
- name :string - input name
- val :string - the input's value
DELETE /joint-api/inputs/:input_id
Delete the input.
URL Parameters
- input_id :string - the input _id