Recipes
Recipes are reusable install scripts. A recipe defines one or more executable 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 with owner set to 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 | Owning workspace, or null for platform-wide recipes. Lists include id and name. Full recipe responses include the full workspace object. |
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 executable on the instance |
args | string[] | Arguments passed to the executable. $GG_FIELDS_<FIELD_ID> placeholders are replaced with input values before execution. |
Field object
| Field | Type | Description |
|---|---|---|
id | string | Field identifier. Its uppercase form builds the $GG_FIELDS_<ID> placeholder used in command arguments. |
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 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 | string | Workspace ID |
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Quick search by name or ID |
id | string[] | Filter to specific recipe IDs |
owner | string[] | Filter by owning workspace ID |
name | string | Filter by name |
description | string | Substring filter on description |
category | string | One of the category values listed above |
All filters are optional.
Plus the shared pagination parameters. Returns 200 OK with a KeysetResultRecipeListView containing recipe summary objects and pagination fields: limit, page, total, has_next, has_previous, after, and before.
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 | string | Workspace ID |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Recipe name (4-32 characters) |
category | string | yes | One of the category values listed above |
commands | object[] | yes | Nonempty command list. Each command requires path and args. |
fields | object[] | yes | Input field definitions. Use [] when no inputs are needed. Each field has id, label, description, type, and required. |
description | string | Description (1-4096 characters), or null | |
icon | string | Icon URL, or null |
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 201 Created with the full Recipe object.
Fetch a recipe
/v1/recipes/{rid}Fetch a recipeReturns the full recipe object including commands and fields.
Path parameters
| Name | Type | Description |
|---|---|---|
rid | string | Recipe ID |
Returns 200 OK with the full Recipe object.
Update a recipe
/v1/recipes/{rid}Update a recipeUpdates a recipe. Every field is optional. Send only what you want to change.
Path parameters
| Name | Type | Description |
|---|---|---|
rid | string | Recipe ID |
Request body
| Field | Type | Description |
|---|---|---|
name | string | New name (4-32 characters) |
icon | string | New icon URL |
category | string | One of the category values listed above |
description | string | New description (1-4096 characters) |
commands | object[] | Replacement nonempty command list. Each command requires path and args. |
fields | object[] | Replacement field list with the same field objects as creation |
Returns 200 OK with the updated Recipe object.
Delete a recipe
/v1/recipes/{rid}Delete a recipeDeletes a recipe synchronously.
Path parameters
| Name | Type | Description |
|---|---|---|
rid | string | Recipe ID |
Returns 204 No Content.