Skip to content

API Overview

Shoehorn exposes a RESTful API at /api/v1/ for managing all platform resources programmatically.

https://shoehorn.example.com/api/v1

All API requests must be authenticated using one of two methods:

Users authenticated via the web UI receive session cookies automatically. The frontend uses these cookies for API calls.

For CI/CD pipelines and automation, use API keys:

Terminal window
curl -H "Authorization: Bearer shp_svc_xxxxxxxxxxxx" \
https://shoehorn.example.com/api/v1/entities

API keys use the prefix shp_svc_ and are managed in Admin > API Keys.

See API Keys for key creation and scope details.

  • Content-Type: application/json for request bodies
  • Accept: application/json for all responses
  • Character Encoding: UTF-8

Responses use top-level descriptive keys (no data wrapper):

Single resource:

{
"id": "entity-123",
"name": "my-service",
"type": "service",
"lifecycle": "production"
}

Collection with pagination:

{
"entities": [
{ "id": "entity-123", "name": "my-service" }
],
"pagination": {
"total": 42,
"page": 1,
"pageSize": 20,
"nextCursor": "abc123"
}
}
{
"error": {
"code": "INVALID_INPUT",
"message": "Name is required",
"details": {
"field": "name",
"reason": "required"
}
}
}
CodeMeaning
200 OKSuccessful GET, PUT, PATCH
201 CreatedSuccessful POST creating a resource
204 No ContentSuccessful DELETE
400 Bad RequestMalformed request
401 UnauthorizedAuthentication required
403 ForbiddenAuthenticated but insufficient permissions
404 Not FoundResource not found
409 ConflictDuplicate resource
422 Unprocessable EntityValidation failed
500 Internal Server ErrorServer error

The API uses three pagination shapes depending on the endpoint:

ShapeUsed ByQuery ParametersKey Response Fields
Cursor-basedEntities, Search, Forge, Deployments, Incidents, Zombieslimit, cursornextCursor, prevCursor, total
Page-basedRepositoriespage, page_sizetotalPages, totalItems, hasNext, hasPrevious
Identity ProviderUsersfirst/max or page/pageSizecount, hasMore, total

Example (cursor-based):

Terminal window
# First page
curl /api/v1/entities?limit=20
# Next page (use nextCursor from previous response)
curl /api/v1/entities?limit=20&cursor=20

Example (page-based):

Terminal window
curl /api/v1/repositories?page=1&page_size=20

See Pagination for complete details, response shapes, and per-endpoint reference.

Many list endpoints support query parameter filters:

Terminal window
# Filter entities by type and lifecycle
curl /api/v1/entities?type=service&lifecycle=production
# Search entities
curl /api/v1/search?q=payment&type=service

API key requests are subject to rate limiting. The current limits are returned in response headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1706200000

The API supports gzip compression. Include the Accept-Encoding header:

Terminal window
curl -H "Accept-Encoding: gzip" /api/v1/entities
EndpointDefault Limit
General API1 MB
K8s agent push10 MB
Manifest upload5 MB
DomainBase PathSpec FileDescription
Entities/api/v1/entitiesentities.yamlEntity CRUD, status, changelog, workloads, resources
Teams/api/v1/teams, /api/v1/admin/teamsteams.yamlTeam management, members, group mappings
Users/api/v1/users, /api/v1/me, /api/v1/groupsusers.yamlUser directory, auth status, group role mappings
Kubernetes/api/v1/k8s/agentskubernetes.yamlK8s agent registration, workload push, heartbeat
Governance/api/v1/governancegovernance.yamlGovernance actions and dashboard
Integrations/api/v1/integrationsintegrations.yamlIntegration CRUD, webhooks, sync
Admin/api/v1/admin/*admin.yamlSettings, API keys, policies, features, scorecards
Catalog/api/v1/search, /api/v1/stats, /api/v1/manifestscatalog.yamlSearch, statistics, manifest management
Operations/api/v1/operationsoperations.yamlWorkloads, deployments, GitOps, network flows
Metrics/api/v1/metricsmetrics.yamlDashboard metrics and time-series
Organization/api/v1/organization, /api/v1/admin/org-chartorganization.yamlOrg-chart read and bulk parent updates
Security/api/v1/securitysecurity.yamlSecurity findings and overview
Forge/api/v1/forgeforge.yamlWorkflow molds, runs, approvals
Marketplace/api/v1/marketplace, /api/v1/addonsmarketplace.yamlAddon catalog, installation, runtime, logs
Notifications/api/v1/notificationsnotifications.yamlUser notifications and preferences

These endpoints do not require authentication:

Terminal window
# Liveness check
GET /healthz
# Database health
GET /healthz/db
# Readiness check
GET /readiness

Individual OpenAPI 3.0 specifications are available in specs/ organized by domain. Each file is self-contained and can be used with tools like Swagger UI or Postman.