Skip to main content

API reference

ToolHive API (1.0)

Download OpenAPI specification:Download

This is the ToolHive API server.

clients

List all clients

List all registered clients in ToolHive

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Register a new client

Register a new client with ToolHive

Request Body schema: application/json
required

Client to register

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "groups": [
    ],
  • "name": "roo-code"
}

Register multiple clients

Register multiple clients with ToolHive

Request Body schema: application/json
required

Clients to register

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
[
  • {
    }
]

Unregister a client

Unregister a client from ToolHive

path Parameters
name
required
string

Client name to unregister

Responses

Response samples

Content type
application/json
"string"

Unregister a client from a specific group

Unregister a client from a specific group in ToolHive

path Parameters
name
required
string

Client name to unregister

group
required
string

Group name to remove client from

Responses

Response samples

Content type
application/json
"string"

Unregister multiple clients

Unregister multiple clients from ToolHive

Request Body schema: application/json
required

Clients to unregister

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
"string"

discovery

List all clients status

List all clients compatible with ToolHive and their status

Responses

Response samples

Content type
application/json
{
  • "clients": [
    ]
}

groups

Create a new group

Create a new group with the specified name

Request Body schema: application/json
required

Group creation request

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "name": "string"
}

Delete a group

Delete a group by name.

path Parameters
name
required
string

Group name

query Parameters
with-workloads
boolean

Delete all workloads in the group (default: false, moves workloads to default group)

Responses

Response samples

Content type
application/json
"string"

Get group details

Get details of a specific group

path Parameters
name
required
string

Group name

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "registered_clients": [
    ]
}

List all groups

Get a list of all groups

Responses

Response samples

Content type
application/json
{
  • "groups": [
    ]
}

logs

Get logs for a specific workload

Retrieve at most 100 lines of logs for a specific workload by name.

path Parameters
name
required
string

Workload name

Responses

Get proxy logs for a specific workload

Retrieve proxy logs for a specific workload by name from the file system.

path Parameters
name
required
string

Workload name

Responses

registry

Add a registry

Add a new registry

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
"string"

Get a registry

Get details of a specific registry

path Parameters
name
required
string

Registry name

Responses

Response samples

Content type
application/json
{
  • "last_updated": "string",
  • "name": "string",
  • "registry": {
    },
  • "server_count": 0,
  • "source": "string",
  • "type": "file",
  • "version": "string"
}

Get a server from a registry

Get details of a specific server in a registry

path Parameters
name
required
string

Registry name

serverName
required
string

ImageMetadata name

Responses

Response samples

Content type
application/json
{
  • "is_remote": true,
  • "remote_server": {
    },
  • "server": {
    }
}

List registries

Get a list of the current registries

Responses

Response samples

Content type
application/json
{
  • "registries": [
    ]
}

List servers in a registry

Get a list of servers in a specific registry

path Parameters
name
required
string

Registry name

Responses

Response samples

Content type
application/json
{
  • "remote_servers": [
    ],
  • "servers": [
    ]
}

Remove a registry

Remove a specific registry

path Parameters
name
required
string

Registry name

Responses

Response samples

Content type
application/json
"string"

Update registry configuration

Update registry URL or local path for the default registry

path Parameters
name
required
string

Registry name (must be 'default')

Request Body schema: application/json
required

Registry configuration

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "message": "string",
  • "type": "string"
}

secrets

Create a new secret

Create a new secret in the default provider (encrypted provider only)

Request Body schema: application/json
required

Create secret request

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "key": "string",
  • "message": "string"
}

Delete a secret

Delete a secret from the default provider (encrypted provider only)

path Parameters
key
required
string

Secret key

Responses

Response samples

Content type
application/json
"string"

Get secrets provider details

Get details of the default secrets provider

Responses

Response samples

Content type
application/json
{
  • "capabilities": {
    },
  • "name": "string",
  • "provider_type": "string"
}

List secrets

Get a list of all secret keys from the default provider

Responses

Response samples

Content type
application/json
{
  • "keys": [
    ]
}

Setup or reconfigure secrets provider

Setup the secrets provider with the specified type and configuration.

Request Body schema: application/json
required

Setup secrets provider request

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "message": "string",
  • "provider_type": "string"
}

Update a secret

Update an existing secret in the default provider (encrypted provider only)

path Parameters
key
required
string

Secret key

Request Body schema: application/json
required

Update secret request

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "key": "string",
  • "message": "string"
}

system

Get OpenAPI specification

Returns the OpenAPI specification for the API

Responses

Response samples

Content type
application/json
{ }

Health check

Check if the API is healthy

Responses

Response samples

Content type
application/json
"string"

version

Get server version

Returns the current version of the server

Responses

Response samples

Content type
application/json
{
  • "version": "string"
}

workloads

Create a new workload

Create and start a new workload

Request Body schema: application/json
required

Create workload request

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "name": "string",
  • "port": 0
}

Delete a workload

Delete a workload

path Parameters
name
required
string

Workload name

Responses

Response samples

Content type
application/json
"string"

Delete workloads in bulk

Delete multiple workloads by name or by group

Request Body schema: application/json
required

Bulk delete request (names or group)

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
"string"

Export workload configuration

Export a workload's run configuration as JSON

path Parameters
name
required
string

Workload name

Responses

Response samples

Content type
application/json
{
  • "audit_config": {
    },
  • "audit_config_path": "string",
  • "authz_config": {
    },
  • "authz_config_path": "string",
  • "base_name": "string",
  • "cmd_args": [
    ],
  • "container_labels": {
    },
  • "container_name": "string",
  • "debug": true,
  • "endpoint_prefix": "string",
  • "env_file_dir": "string",
  • "env_vars": {
    },
  • "group": "string",
  • "host": "string",
  • "ignore_config": {
    },
  • "image": "string",
  • "isolate_network": true,
  • "jwks_auth_token_file": "string",
  • "k8s_pod_template_patch": "string",
  • "middleware_configs": [
    ],
  • "name": "string",
  • "oidc_config": {
    },
  • "permission_profile": {
    },
  • "permission_profile_name_or_path": "string",
  • "port": 0,
  • "proxy_mode": "sse",
  • "remote_auth_config": {
    },
  • "remote_url": "string",
  • "schema_version": "string",
  • "secrets": [
    ],
  • "target_host": "string",
  • "target_port": 0,
  • "telemetry_config": {
    },
  • "thv_ca_bundle": "string",
  • "token_exchange_config": {
    },
  • "tools_filter": [
    ],
  • "tools_override": {
    },
  • "transport": "stdio",
  • "trust_proxy_headers": true,
  • "volumes": [
    ]
}

Get workload details

Get details of a specific workload

path Parameters
name
required
string

Workload name

Responses

Response samples

Content type
application/json
{
  • "authz_config": "string",
  • "cmd_arguments": [
    ],
  • "env_vars": {
    },
  • "group": "string",
  • "headers": [
    ],
  • "host": "string",
  • "image": "string",
  • "name": "string",
  • "network_isolation": true,
  • "oauth_config": {
    },
  • "oidc": {
    },
  • "permission_profile": {
    },
  • "proxy_mode": "string",
  • "proxy_port": 0,
  • "secrets": [
    ],
  • "target_port": 0,
  • "tools": [
    ],
  • "tools_override": {
    },
  • "transport": "string",
  • "trust_proxy_headers": true,
  • "url": "string",
  • "volumes": [
    ]
}

Get workload status

Get the current status of a specific workload

path Parameters
name
required
string

Workload name

Responses

Response samples

Content type
application/json
{
  • "status": "running"
}

List all workloads

Get a list of all running workloads, optionally filtered by group

query Parameters
all
boolean

List all workloads, including stopped ones

group
string

Filter workloads by group name

Responses

Response samples

Content type
application/json
{
  • "workloads": [
    ]
}

Restart a workload

Restart a running workload

path Parameters
name
required
string

Workload name

Responses

Response samples

Content type
application/json
"string"

Restart workloads in bulk

Restart multiple workloads by name or by group

Request Body schema: application/json
required

Bulk restart request (names or group)

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
"string"

Stop a workload

Stop a running workload

path Parameters
name
required
string

Workload name

Responses

Response samples

Content type
application/json
"string"

Stop workloads in bulk

Stop multiple workloads by name or by group

Request Body schema: application/json
required

Bulk stop request (names or group)

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
"string"

Update workload

Update an existing workload configuration

path Parameters
name
required
string

Workload name

Request Body schema: application/json
required

Update workload request

One of
object

Responses

Request samples

Content type
application/json
Example
{ }

Response samples

Content type
application/json
{
  • "name": "string",
  • "port": 0
}