API reference
Register a new client
Register a new client with ToolHive
Request Body schema: application/jsonrequired
Client to register
Responses
Request samples
- Payload
{ }Response samples
- 200
- 400
{- "groups": [
- "string"
], - "name": "roo-code"
}Register multiple clients
Register multiple clients with ToolHive
Request Body schema: application/jsonrequired
Clients to register
Responses
Request samples
- Payload
{ }Response samples
- 200
- 400
[- {
- "groups": [
- "string"
], - "name": "roo-code"
}
]Get a registry
Get details of a specific registry
path Parameters
| name required | string Registry name |
Responses
Response samples
- 200
- 404
{- "last_updated": "string",
- "name": "string",
- "registry": {
- "groups": [
- {
- "description": "string",
- "name": "string",
- "remote_servers": {
- "property1": {
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "oauth_config": {
- "authorize_url": "string",
- "callback_port": 0,
- "client_id": "string",
- "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "token_url": "string",
- "use_pkce": true
}, - "url": "string"
}, - "property2": {
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "oauth_config": {
- "authorize_url": "string",
- "callback_port": 0,
- "client_id": "string",
- "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "token_url": "string",
- "use_pkce": true
}, - "url": "string"
}
}, - "servers": {
- "property1": {
- "args": [
- "string"
], - "docker_tags": [
- "string"
], - "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "image": "string",
- "permissions": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- null
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- null
], - "allow_port": [
- null
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "provenance": {
- "attestation": {
- "predicate": null,
- "predicate_type": "string"
}, - "cert_issuer": "string",
- "repository_ref": "string",
- "repository_uri": "string",
- "runner_environment": "string",
- "signer_identity": "string",
- "sigstore_url": "string"
}, - "target_port": 0
}, - "property2": {
- "args": [
- "string"
], - "docker_tags": [
- "string"
], - "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "image": "string",
- "permissions": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- null
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- null
], - "allow_port": [
- null
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "provenance": {
- "attestation": {
- "predicate": null,
- "predicate_type": "string"
}, - "cert_issuer": "string",
- "repository_ref": "string",
- "repository_uri": "string",
- "runner_environment": "string",
- "signer_identity": "string",
- "sigstore_url": "string"
}, - "target_port": 0
}
}
}
], - "last_updated": "string",
- "remote_servers": {
- "property1": {
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "oauth_config": {
- "authorize_url": "string",
- "callback_port": 0,
- "client_id": "string",
- "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "token_url": "string",
- "use_pkce": true
}, - "url": "string"
}, - "property2": {
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "oauth_config": {
- "authorize_url": "string",
- "callback_port": 0,
- "client_id": "string",
- "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "token_url": "string",
- "use_pkce": true
}, - "url": "string"
}
}, - "servers": {
- "property1": {
- "args": [
- "string"
], - "docker_tags": [
- "string"
], - "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "image": "string",
- "permissions": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- "string"
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- "string"
], - "allow_port": [
- 0
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "provenance": {
- "attestation": {
- "predicate": null,
- "predicate_type": "string"
}, - "cert_issuer": "string",
- "repository_ref": "string",
- "repository_uri": "string",
- "runner_environment": "string",
- "signer_identity": "string",
- "sigstore_url": "string"
}, - "target_port": 0
}, - "property2": {
- "args": [
- "string"
], - "docker_tags": [
- "string"
], - "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "image": "string",
- "permissions": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- "string"
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- "string"
], - "allow_port": [
- 0
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "provenance": {
- "attestation": {
- "predicate": null,
- "predicate_type": "string"
}, - "cert_issuer": "string",
- "repository_ref": "string",
- "repository_uri": "string",
- "runner_environment": "string",
- "signer_identity": "string",
- "sigstore_url": "string"
}, - "target_port": 0
}
}, - "version": "string"
}, - "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
- 200
- 404
{- "is_remote": true,
- "remote_server": {
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "oauth_config": {
- "authorize_url": "string",
- "callback_port": 0,
- "client_id": "string",
- "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "token_url": "string",
- "use_pkce": true
}, - "url": "string"
}, - "server": {
- "args": [
- "string"
], - "docker_tags": [
- "string"
], - "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "image": "string",
- "permissions": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- "string"
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- "string"
], - "allow_port": [
- 0
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "provenance": {
- "attestation": {
- "predicate": null,
- "predicate_type": "string"
}, - "cert_issuer": "string",
- "repository_ref": "string",
- "repository_uri": "string",
- "runner_environment": "string",
- "signer_identity": "string",
- "sigstore_url": "string"
}, - "target_port": 0
}
}List servers in a registry
Get a list of servers in a specific registry
path Parameters
| name required | string Registry name |
Responses
Response samples
- 200
- 404
{- "remote_servers": [
- {
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "oauth_config": {
- "authorize_url": "string",
- "callback_port": 0,
- "client_id": "string",
- "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "token_url": "string",
- "use_pkce": true
}, - "url": "string"
}
], - "servers": [
- {
- "args": [
- "string"
], - "docker_tags": [
- "string"
], - "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "image": "string",
- "permissions": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- "string"
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- "string"
], - "allow_port": [
- 0
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "provenance": {
- "attestation": {
- "predicate": null,
- "predicate_type": "string"
}, - "cert_issuer": "string",
- "repository_ref": "string",
- "repository_uri": "string",
- "runner_environment": "string",
- "signer_identity": "string",
- "sigstore_url": "string"
}, - "target_port": 0
}
]
}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/jsonrequired
Registry configuration
Responses
Request samples
- Payload
{ }Response samples
- 200
- 400
- 404
{- "message": "string",
- "type": "string"
}Create a new secret
Create a new secret in the default provider (encrypted provider only)
Request Body schema: application/jsonrequired
Create secret request
Responses
Request samples
- Payload
{ }Response samples
- 201
- 400
- 404
- 405
- 409
- 500
{- "key": "string",
- "message": "string"
}Setup or reconfigure secrets provider
Setup the secrets provider with the specified type and configuration.
Request Body schema: application/jsonrequired
Setup secrets provider request
Responses
Request samples
- Payload
{ }Response samples
- 201
- 400
- 500
{- "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/jsonrequired
Update secret request
Responses
Request samples
- Payload
{ }Response samples
- 200
- 400
- 404
- 405
- 500
{- "key": "string",
- "message": "string"
}Export workload configuration
Export a workload's run configuration as JSON
path Parameters
| name required | string Workload name |
Responses
Response samples
- 200
- 404
{- "audit_config": {
- "component": "string",
- "enabled": true,
- "eventTypes": [
- "string"
], - "excludeEventTypes": [
- "string"
], - "includeRequestData": true,
- "includeResponseData": true,
- "logFile": "string",
- "maxDataSize": 0
}, - "audit_config_path": "string",
- "authz_config": {
- "type": "string",
- "version": "string"
}, - "authz_config_path": "string",
- "base_name": "string",
- "cmd_args": [
- "string"
], - "container_labels": {
- "property1": "string",
- "property2": "string"
}, - "container_name": "string",
- "debug": true,
- "endpoint_prefix": "string",
- "env_file_dir": "string",
- "env_vars": {
- "property1": "string",
- "property2": "string"
}, - "group": "string",
- "host": "string",
- "ignore_config": {
- "loadGlobal": true,
- "printOverlays": true
}, - "image": "string",
- "isolate_network": true,
- "jwks_auth_token_file": "string",
- "k8s_pod_template_patch": "string",
- "middleware_configs": [
- {
- "parameters": { },
- "type": "string"
}
], - "name": "string",
- "oidc_config": {
- "allowPrivateIP": true,
- "audience": "string",
- "authTokenFile": "string",
- "cacertPath": "string",
- "clientID": "string",
- "clientSecret": "string",
- "insecureAllowHTTP": true,
- "introspectionURL": "string",
- "issuer": "string",
- "jwksurl": "string",
- "resourceURL": "string",
- "scopes": [
- "string"
]
}, - "permission_profile": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- "string"
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- "string"
], - "allow_port": [
- 0
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "permission_profile_name_or_path": "string",
- "port": 0,
- "proxy_mode": "sse",
- "remote_auth_config": {
- "authorize_url": "string",
- "bearer_token": "string",
- "bearer_token_file": "string",
- "callback_port": 0,
- "client_id": "string",
- "client_secret": "string",
- "client_secret_file": "string",
- "env_vars": [
- {
- "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "skip_browser": true,
- "timeout": "5m",
- "token_url": "string",
- "use_pkce": true
}, - "remote_url": "string",
- "schema_version": "string",
- "secrets": [
- "string"
], - "target_host": "string",
- "target_port": 0,
- "telemetry_config": {
- "customAttributes": {
- "property1": "string",
- "property2": "string"
}, - "enablePrometheusMetricsPath": true,
- "endpoint": "string",
- "environmentVariables": [
- "string"
], - "headers": {
- "property1": "string",
- "property2": "string"
}, - "insecure": true,
- "metricsEnabled": true,
- "samplingRate": "string",
- "serviceName": "string",
- "serviceVersion": "string",
- "tracingEnabled": true
}, - "thv_ca_bundle": "string",
- "token_exchange_config": {
- "audience": "string",
- "client_id": "string",
- "client_secret": "string",
- "external_token_header_name": "string",
- "header_strategy": "string",
- "scopes": [
- "string"
], - "subject_token_type": "string",
- "token_url": "string"
}, - "tools_filter": [
- "string"
], - "tools_override": {
- "property1": {
- "description": "string",
- "name": "string"
}, - "property2": {
- "description": "string",
- "name": "string"
}
}, - "transport": "stdio",
- "trust_proxy_headers": true,
- "volumes": [
- "string"
]
}Get workload details
Get details of a specific workload
path Parameters
| name required | string Workload name |
Responses
Response samples
- 200
- 404
{- "authz_config": "string",
- "cmd_arguments": [
- "string"
], - "env_vars": {
- "property1": "string",
- "property2": "string"
}, - "group": "string",
- "headers": [
- {
- "choices": [
- "string"
], - "default": "string",
- "description": "string",
- "name": "string",
- "required": true,
- "secret": true
}
], - "host": "string",
- "image": "string",
- "name": "string",
- "network_isolation": true,
- "oauth_config": {
- "authorize_url": "string",
- "bearer_token": {
- "name": "string",
- "target": "string"
}, - "callback_port": 0,
- "client_id": "string",
- "client_secret": {
- "name": "string",
- "target": "string"
}, - "issuer": "string",
- "oauth_params": {
- "property1": "string",
- "property2": "string"
}, - "resource": "string",
- "scopes": [
- "string"
], - "skip_browser": true,
- "token_url": "string",
- "use_pkce": true
}, - "oidc": {
- "audience": "string",
- "client_id": "string",
- "client_secret": "string",
- "introspection_url": "string",
- "issuer": "string",
- "jwks_url": "string",
- "scopes": [
- "string"
]
}, - "permission_profile": {
- "name": "string",
- "network": {
- "inbound": {
- "allow_host": [
- "string"
]
}, - "mode": "string",
- "outbound": {
- "allow_host": [
- "string"
], - "allow_port": [
- 0
], - "insecure_allow_all": true
}
}, - "privileged": true,
- "read": [
- "string"
], - "write": [
- "string"
]
}, - "proxy_mode": "string",
- "proxy_port": 0,
- "secrets": [
- {
- "name": "string",
- "target": "string"
}
], - "target_port": 0,
- "tools": [
- "string"
], - "tools_override": {
- "property1": {
- "description": "string",
- "name": "string"
}, - "property2": {
- "description": "string",
- "name": "string"
}
}, - "transport": "string",
- "trust_proxy_headers": true,
- "url": "string",
- "volumes": [
- "string"
]
}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
- 200
- 404
{- "workloads": [
- {
- "created_at": "string",
- "group": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "name": "string",
- "package": "string",
- "port": 0,
- "proxy_mode": "string",
- "remote": true,
- "status": "running",
- "status_context": "string",
- "tools": [
- "string"
], - "transport_type": "stdio",
- "url": "string"
}
]
}Restart workloads in bulk
Restart multiple workloads by name or by group
Request Body schema: application/jsonrequired
Bulk restart request (names or group)
Responses
Request samples
- Payload
{ }Response samples
- 202
- 400
"string"Update workload
Update an existing workload configuration
path Parameters
| name required | string Workload name |
Request Body schema: application/jsonrequired
Update workload request
Responses
Request samples
- Payload
{ }Response samples
- 200
- 400
- 404
{- "name": "string",
- "port": 0
}