Changing Field Values in a Solution Installation via API
This article provides detailed information on how to change the values of automation step fields in a solution installation via API.
1. Authentication
All further requests to the Solution Headless API are made using the end-user token.
2. Getting the List of Installed Solutions
Endpoint:
GET /solution/installation
Description: Returns a list of all installed solutions (solution installations) for the user.
Request example:
curl --location 'https://api.albato.com/solution/installation' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN'Response (fragment):
{
"success": true,
"data": [
{
"id": 12345,
"title": "My Solution Installation",
...
}
]
}Remember the installation_id of the required installation.
3. Getting the List of Automations and Steps in an Installation
Endpoint:
GET /solution/installation/{installation_id}?expand=app.templates,+bundles.steps
Description: Returns detailed information about the installation, including the list of automations and steps inside each automation.
Request example:
curl --location 'https://api.albato.com/solution/installation/{installation_id}?expand=app.templates,+bundles.steps' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN'Response (fragment):
{
"success": true,
"data": {
"id": 12345,
"bundles": {
"67890": {
"id": 67890,
"title": "Example bundle",
"steps": [
{
"id": 11111,
"title": "Step 1"
},
{
"id": 22222,
"title": "Step 2"
}
]
}
}
}
}Remember the bundleId and stepId of the required step.
4. Getting Current Field Values in Automation Steps
Endpoint:
GET /bundle/data?filter[bundleId]={bundle_id}
Description: Returns a list of automation steps and their current field values.
Request example:
curl --location 'https://api.albato.com/bundle/data?filter[bundleId]={bundle_id}' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN'Response (fragment):
{
"success": true,
"data": [
{
"id": 11111,
"bundleId": 67890,
"data": [
{
"name": "field_code",
"label": "Field Name",
"value": "Current value"
}
]
}
]
}Remember the id of the step (bundle_step_id) and the field code (name) you want to change.
5. Changing the Value of a Field in a Automation Step
Important: You can only change field values for paused solution installations. If the installation is active, you must pause it first using PAUSE.
Endpoint:
PUT /bundle/data/{bundle_step_id}
Description: Allows you to change the value of a field in a specific automation step.
Request body:
{
"data": {
"field_code": "new_value"
}
}Request example:
curl --location --request PUT 'https://api.albato.com/bundle/data/{bundle_step_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_JWT_TOKEN' \
--data '{
"data": {
"field_code": "new_value"
}
}'Response:
{
"success": true,
"data": {
"id": 11111
}
}Updated about 2 months ago
