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:
| Field | Type | Description |
|---|---|---|
id | string | Recipe ID |
name | string | Display name |
category | string | One of DEFAULT, GAMES, SOFTWARE, INFRASTRUCTURE, AI, MEDIA, TOOLS, DATABASES, MONITORING, PRODUCTIVITY, DEVOPS, AUTOMATION, NETWORK |
icon | string | URL to the recipe icon, or null |
description | string | Markdown description of what the recipe does, or null |
owner | object | Workspace that owns this recipe: { "id", "name" }, or null for platform-wide recipes |
commands | object[] | Commands to execute (see below) |
fields | object[] | Input fields the user fills in before running the recipe (see below) |
Command object
| Field | Type | Description |
|---|---|---|
path | string | Absolute path to the script on the instance |
args | string[] | Arguments passed to the script, typically referencing $GG_FIELDS_<FIELD_ID> environment variables |
Field object
| Field | Type | Description |
|---|---|---|
id | string | Field identifier, used to build the GG_FIELDS_<ID> environment variable injected at run time |
label | string | Human-readable field label |
description | string | Help text shown alongside the input |
type | string | Input type: TEXT, PASSWORD, NUMBER, EMAIL, BOOLEAN |
required | boolean | Whether 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
/v1/recipesSearch platform recipesAdministrator only
This endpoint is restricted to administrator sessions. A user-scoped token receives 400 Bad Request.
Searches all recipes on the platform.
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by name or ID |
id | integer[] | Filter to specific recipe IDs |
owner | integer[] | Filter by owning workspace ID |
name | string | Filter by name |
description | string | Substring filter on description |
category | string | Filter by category |
Plus the shared pagination parameters. Returns a keyset-paged list of recipe summary objects.
Create a platform recipe
/v1/recipesCreate a platform recipeAdministrator 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Recipe name |
category | string | yes | Category value |
description | string | yes | Markdown description |
commands | object[] | yes | Commands to execute |
icon | string | URL to the recipe icon | |
fields | object[] | Input field definitions |
Returns the created recipe object.
Search workspace recipes
/v1/workspaces/{wid}/recipesSearch workspace recipesReturns recipes available to a workspace. This includes both platform-wide recipes and recipes owned by the workspace.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace 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.
curl "https://api.galaxygate.net/v1/workspaces/42/recipes?category=INFRASTRUCTURE" \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-A 'curl/8.5'Create a workspace recipe
/v1/workspaces/{wid}/recipesCreate a workspace recipeCreates a recipe owned by the given workspace. Responds 201 Created.
Path parameters
| Name | Type | Description |
|---|---|---|
wid | integer | Workspace ID |
Request body
Same fields as Create a platform recipe.
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
/v1/recipes/{id}Fetch a recipeReturns the full recipe object including commands and fields.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | Recipe ID |
Returns the full recipe object.
Update a recipe
/v1/recipes/{id}Update a recipeUpdates a recipe. Every field is optional; send only what you want to change.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | Recipe ID |
Request body
| Field | Type | Description |
|---|---|---|
name | string | New name |
icon | string | New icon URL |
category | string | New category |
description | string | New description |
commands | object[] | Replacement command list |
fields | object[] | Replacement field list |
Returns the updated recipe object.
Delete a recipe
/v1/recipes/{id}Delete a recipeDeletes a recipe. The operation is synchronous and returns an audit log entry confirming the deletion.
Path parameters
| Name | Type | Description |
|---|---|---|
id | integer | Recipe ID |
Returns an audit log entry.