API Reference - Installer Steps

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108136

← Back to API Reference | Getting Started

Installer Steps

Installer Steps are the individual configuration actions within an Installer Group. Each step defines a specific task to execute during site setup (EG importing a widget, setting a configuration value, or enabling a feature). Steps are ordered within their group, can be set to install automatically or require manual confirmation, and carry status and installation payload data.

Model name in URL: installer_steps — DB table: installer_steps

The Installer Step Object

FieldTypeDescription
step_idintegerUnique installer step ID (primary key, read-only)
step_nicknamestringHuman-readable display name for this step (EG Import Homepage Widget); max 255 characters required on create
step_namestringMachine-readable slug identifier for this step (EG import_homepage_widget); max 255 characters required on create
install_groupstringThe installer_name value of the parent installer group this step belongs to; max 255 characters required on create
step_orderstringNumeric ordering value that determines the sequence in which steps are executed; max 255 characters
step_tokenstringUnique token used internally to reference this step; max 255 characters
auto_installintegerWhether this step installs automatically without user confirmation; 1 = auto, 0 = manual
step_statustextJSON or plain text status payload indicating the current state or completion status of this step
step_installtextJSON or plain text installation payload defining what this step does when executed

List Installer Steps

GET /api/v2/installer_steps/get

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/installer_steps/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "step_id": "1",
      "step_nickname": "Import Homepage Widget",
      "step_name": "import_homepage_widget",
      "install_group": "real_estate_starter",
      "step_order": "1",
      "step_token": "hp_widget_v1",
      "auto_install": "1",
      "step_status": "active",
      "step_install": "{\"widget_id\":101}"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Retrieve an Installer Step

GET /api/v2/installer_steps/get/{step_id}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/installer_steps/get/1" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "step_id": "1",
      "step_nickname": "Import Homepage Widget",
      "step_name": "import_homepage_widget",
      "install_group": "real_estate_starter",
      "step_order": "1",
      "step_token": "hp_widget_v1",
      "auto_install": "1",
      "step_status": "active",
      "step_install": "{\"widget_id\":101}"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Create an Installer Step

POST /api/v2/installer_steps/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/installer_steps/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "step_nickname=Set+Default+Categories" \
  -d "step_name=set_default_categories" \
  -d "install_group=restaurant_directory" \
  -d "step_order=1" \
  -d "step_token=set_cats_v1" \
  -d "auto_install=1" \
  -d "step_status=active" \
  -d "step_install={\"categories\":[\"Italian\",\"Mexican\",\"Chinese\"]}"

Example Response

Copy
{
  "status": "success",
  "message": {
    "step_id": "2",
    "step_nickname": "Set Default Categories",
    "step_name": "set_default_categories",
    "install_group": "restaurant_directory",
    "step_order": "1",
    "step_token": "set_cats_v1",
    "auto_install": "1",
    "step_status": "active",
    "step_install": "{\"categories\":[\"Italian\",\"Mexican\",\"Chinese\"]}"
  }
}

Update an Installer Step

PUT /api/v2/installer_steps/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/installer_steps/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "step_id=2" \
  -d "step_nickname=Set+Default+Categories+v2" \
  -d "step_order=2"

Example Response

Copy
{
  "status": "success",
  "message": {
    "step_id": "2",
    "step_nickname": "Set Default Categories v2",
    "step_name": "set_default_categories",
    "install_group": "restaurant_directory",
    "step_order": "2",
    "step_token": "set_cats_v1",
    "auto_install": "1",
    "step_status": "active",
    "step_install": "{\"categories\":[\"Italian\",\"Mexican\",\"Chinese\"]}"
  }
}

Delete an Installer Step

DELETE /api/v2/installer_steps/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/installer_steps/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "step_id=2"

Example Response

Copy
{
  "status": "success",
  "message": "installer_steps record was deleted"
}