Skip to content

Recipes

Recipes are reusable first-boot install scripts. A recipe defines one or more shell commands to run on an instance, along with typed input fields the user fills in before the run. The platform ships a library of public recipes (owner: null); you can also create your own scoped to a workspace.

To install a recipe onto a running instance, use the instance commands endpoint.

A recipe object has these fields:

FieldTypeDescription
idstringRecipe ID
namestringDisplay name
categorystringOne of DEFAULT, GAMES, SOFTWARE, INFRASTRUCTURE, AI, MEDIA, TOOLS, DATABASES, MONITORING, PRODUCTIVITY, DEVOPS, AUTOMATION, NETWORK
iconstringURL to the recipe icon, or null
descriptionstringMarkdown description of what the recipe does, or null
ownerobjectWorkspace that owns this recipe: { "id", "name" }, or null for platform-wide recipes
commandsobject[]Commands to execute (see below)
fieldsobject[]Input fields the user fills in before running the recipe (see below)

Command object

FieldTypeDescription
pathstringAbsolute path to the script on the instance
argsstring[]Arguments passed to the script, typically referencing $GG_FIELDS_<FIELD_ID> environment variables

Field object

FieldTypeDescription
idstringField identifier, used to build the GG_FIELDS_<ID> environment variable injected at run time
labelstringHuman-readable field label
descriptionstringHelp text shown alongside the input
typestringInput type: TEXT, PASSWORD, NUMBER, EMAIL, BOOLEAN
requiredbooleanWhether the field must be filled in before the recipe can run

List endpoints return only the summary fields (id, name, category, icon, description, owner). The full commands and fields arrays appear on the single-recipe fetch.

Search platform recipes

GET/v1/recipesSearch platform recipes

Administrator only

This endpoint is restricted to administrator sessions. A user-scoped token receives 400 Bad Request.

Searches all recipes on the platform.

Query parameters

NameTypeDescription
qstringQuick search by name or ID
idinteger[]Filter to specific recipe IDs
ownerinteger[]Filter by owning workspace ID
namestringFilter by name
descriptionstringSubstring filter on description
categorystringFilter by category

Plus the shared pagination parameters. Returns a keyset-paged list of recipe summary objects.

Create a platform recipe

POST/v1/recipesCreate a platform recipe

Administrator only

This endpoint is restricted to administrator sessions. A user-scoped token receives 400 Bad Request.

Creates a recipe at the platform level (no workspace owner). Responds 201 Created with the new recipe.

Request body

FieldTypeRequiredDescription
namestringyesRecipe name
categorystringyesCategory value
descriptionstringyesMarkdown description
commandsobject[]yesCommands to execute
iconstringURL to the recipe icon
fieldsobject[]Input field definitions

Returns the created recipe object.

Search workspace recipes

GET/v1/workspaces/{wid}/recipesSearch workspace recipes

Returns recipes available to a workspace. This includes both platform-wide recipes and recipes owned by the workspace.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Query parameters

Same filter parameters as Search platform recipes above.

Plus the shared pagination parameters. Returns a keyset-paged list of recipe summary objects.

bash
curl "https://api.galaxygate.net/v1/workspaces/42/recipes?category=INFRASTRUCTURE" \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -A 'curl/8.5'

Create a workspace recipe

POST/v1/workspaces/{wid}/recipesCreate a workspace recipe

Creates a recipe owned by the given workspace. Responds 201 Created.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Request body

Same fields as Create a platform recipe.

bash
curl -X POST https://api.galaxygate.net/v1/workspaces/42/recipes \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -H "Content-Type: application/json" \
  -A 'curl/8.5' \
  -d '{
    "name": "My deploy script",
    "category": "DEVOPS",
    "description": "Runs the project deploy script.",
    "commands": [
      { "path": "/opt/scripts/deploy.sh", "args": ["$GG_FIELDS_BRANCH"] }
    ],
    "fields": [
      { "id": "BRANCH", "label": "Branch", "description": "Git branch to deploy", "type": "TEXT", "required": true }
    ]
  }'

Returns the created recipe object.

Fetch a recipe

GET/v1/recipes/{id}Fetch a recipe

Returns the full recipe object including commands and fields.

Path parameters

NameTypeDescription
idintegerRecipe ID

Returns the full recipe object.

Update a recipe

PATCH/v1/recipes/{id}Update a recipe

Updates a recipe. Every field is optional; send only what you want to change.

Path parameters

NameTypeDescription
idintegerRecipe ID

Request body

FieldTypeDescription
namestringNew name
iconstringNew icon URL
categorystringNew category
descriptionstringNew description
commandsobject[]Replacement command list
fieldsobject[]Replacement field list

Returns the updated recipe object.

Delete a recipe

DELETE/v1/recipes/{id}Delete a recipe

Deletes a recipe. The operation is synchronous and returns an audit log entry confirming the deletion.

Path parameters

NameTypeDescription
idintegerRecipe ID

Returns an audit log entry.