Files
2025-10-02 20:13:20 -04:00
..
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00
2025-10-02 20:13:20 -04:00

goose-server Bash client

Overview

This is a Bash client script for accessing goose-server service.

The script uses cURL underneath for making all REST calls.

Usage

# Make sure the script has executable rights
$ chmod u+x goose-api

# Print the list of operations available on the service
$ ./goose-api -h

# Print the service description
$ ./goose-api --about

# Print detailed information about specific operation
$ ./goose-api <operationId> -h

# Make GET request
./goose-api --host http://<hostname>:<port> --accept xml <operationId> <queryParam1>=<value1> <header_key1>:<header_value2>

# Make GET request using arbitrary curl options (must be passed before <operationId>) to an SSL service using username:password
goose-api -k -sS --tlsv1.2 --host https://<hostname> -u <user>:<password> --accept xml <operationId> <queryParam1>=<value1> <header_key1>:<header_value2>

# Make POST request
$ echo '<body_content>' | goose-api --host <hostname> --content-type json <operationId> -

# Make POST request with simple JSON content, e.g.:
# {
#   "key1": "value1",
#   "key2": "value2",
#   "key3": 23
# }
$ echo '<body_content>' | goose-api --host <hostname> --content-type json <operationId> key1==value1 key2=value2 key3:=23 -

# Make POST request with form data
$ goose-api --host <hostname> <operationId> key1:=value1 key2:=value2 key3:=23

# Preview the cURL command without actually executing it
$ goose-api --host http://<hostname>:<port> --dry-run <operationid>

Docker image

You can easily create a Docker image containing a preconfigured environment for using the REST Bash client including working autocompletion and short welcome message with basic instructions, using the generated Dockerfile:

docker build -t my-rest-client .
docker run -it my-rest-client

By default you will be logged into a Zsh environment which has much more advanced auto completion, but you can switch to Bash, where basic autocompletion is also available.

Shell completion

Bash

The generated bash-completion script can be either directly loaded to the current Bash session using:

source goose-api.bash-completion

Alternatively, the script can be copied to the /etc/bash-completion.d (or on OSX with Homebrew to /usr/local/etc/bash-completion.d):

sudo cp goose-api.bash-completion /etc/bash-completion.d/goose-api

OS X

On OSX you might need to install bash-completion using Homebrew:

brew install bash-completion

and add the following to the ~/.bashrc:

if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi

Zsh

In Zsh, the generated _goose-api Zsh completion file must be copied to one of the folders under $FPATH variable.

Documentation for API Endpoints

All URIs are relative to **

Class Method HTTP request Description
ContextManagementApi manageContext POST /context/manage
RecipeManagementApi createRecipe POST /recipes/create Create a Recipe configuration from the current session
RecipeManagementApi decodeRecipe POST /recipes/decode
RecipeManagementApi deleteRecipe POST /recipes/delete
RecipeManagementApi encodeRecipe POST /recipes/encode
RecipeManagementApi listRecipes GET /recipes/list
RecipeManagementApi scanRecipe POST /recipes/scan
ScheduleApi createSchedule POST /schedule/create
ScheduleApi deleteSchedule DELETE /schedule/delete/{id}
ScheduleApi inspectRunningJob GET /schedule/{id}/inspect
ScheduleApi killRunningJob POST /schedule/{id}/kill
ScheduleApi listSchedules GET /schedule/list
ScheduleApi pauseSchedule POST /schedule/{id}/pause
ScheduleApi runNowHandler POST /schedule/{id}/run_now
ScheduleApi sessionsHandler GET /schedule/{id}/sessions
ScheduleApi unpauseSchedule POST /schedule/{id}/unpause
ScheduleApi updateSchedule PUT /schedule/{id}
SessionManagementApi deleteSession DELETE /sessions/{session_id}
SessionManagementApi getSession GET /sessions/{session_id}
SessionManagementApi getSessionInsights GET /sessions/insights
SessionManagementApi listSessions GET /sessions
SessionManagementApi updateSessionDescription PUT /sessions/{session_id}/description
SuperRoutesAgentApi addSubRecipes POST /agent/add_sub_recipes
SuperRoutesAgentApi extendPrompt POST /agent/prompt
SuperRoutesAgentApi getTools GET /agent/tools
SuperRoutesAgentApi resumeAgent POST /agent/resume
SuperRoutesAgentApi startAgent POST /agent/start
SuperRoutesAgentApi updateAgentProvider POST /agent/update_provider
SuperRoutesAgentApi updateRouterToolSelector POST /agent/update_router_tool_selector
SuperRoutesAgentApi updateSessionConfig POST /agent/session_config
SuperRoutesConfigManagementApi addExtension POST /config/extensions
SuperRoutesConfigManagementApi backupConfig POST /config/backup
SuperRoutesConfigManagementApi createCustomProvider POST /config/custom-providers
SuperRoutesConfigManagementApi getExtensions GET /config/extensions
SuperRoutesConfigManagementApi getProviderModels GET /config/providers/{name}/models
SuperRoutesConfigManagementApi initConfig POST /config/init
SuperRoutesConfigManagementApi providers GET /config/providers
SuperRoutesConfigManagementApi readAllConfig GET /config
SuperRoutesConfigManagementApi readConfig POST /config/read
SuperRoutesConfigManagementApi recoverConfig POST /config/recover
SuperRoutesConfigManagementApi removeConfig POST /config/remove
SuperRoutesConfigManagementApi removeCustomProvider DELETE /config/custom-providers/{id}
SuperRoutesConfigManagementApi removeExtension DELETE /config/extensions/{name}
SuperRoutesConfigManagementApi upsertConfig POST /config/upsert
SuperRoutesConfigManagementApi upsertPermissions POST /config/permissions
SuperRoutesConfigManagementApi validateConfig GET /config/validate
SuperRoutesHealthApi status GET /status
SuperRoutesReplyApi confirmPermission POST /confirm
SuperRoutesSetupApi startOpenrouterSetup POST /handle_openrouter
SuperRoutesSetupApi startTetrateSetup POST /handle_tetrate

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.