api-reference.ts•4.19 kB
export const apiReference = {
title: "Backstage API Reference",
description: "Comprehensive API reference for Backstage development",
content: {
catalogApi: {
description: "Core API for managing software catalog entities",
endpoints: {
entities: {
get: "GET /api/catalog/entities - List all entities",
getById: "GET /api/catalog/entities/by-uid/{uid} - Get entity by UID",
getByName: "GET /api/catalog/entities/by-name/{kind}/{namespace}/{name} - Get entity by name",
create: "POST /api/catalog/entities - Create new entity",
update: "PUT /api/catalog/entities/by-uid/{uid} - Update entity",
delete: "DELETE /api/catalog/entities/by-uid/{uid} - Delete entity"
},
locations: {
get: "GET /api/catalog/locations - List all locations",
create: "POST /api/catalog/locations - Add new location",
delete: "DELETE /api/catalog/locations/{id} - Remove location"
},
analyze: {
location: "POST /api/catalog/analyze-location - Analyze location for entities"
}
},
entityTypes: [
"Component - Software components (services, websites, libraries)",
"API - API definitions (OpenAPI, GraphQL, gRPC)",
"Resource - Infrastructure resources (databases, S3 buckets)",
"System - Collection of entities that cooperate",
"Domain - Area of business",
"Location - External source of entities",
"User - Individual person",
"Group - Team or organizational unit"
]
},
scaffolderApi: {
description: "API for software templates and scaffolding",
endpoints: {
templates: {
get: "GET /api/scaffolder/v2/templates - List available templates",
getById: "GET /api/scaffolder/v2/templates/{templateName} - Get template details"
},
tasks: {
create: "POST /api/scaffolder/v2/tasks - Execute template",
get: "GET /api/scaffolder/v2/tasks/{taskId} - Get task status",
list: "GET /api/scaffolder/v2/tasks - List all tasks"
},
actions: {
list: "GET /api/scaffolder/v2/actions - List available actions"
}
}
},
techDocsApi: {
description: "API for technical documentation",
endpoints: {
docs: {
get: "GET /api/techdocs/static/docs/{namespace}/{kind}/{name}/* - Serve documentation",
metadata: "GET /api/techdocs/metadata/{namespace}/{kind}/{name} - Get doc metadata"
},
sync: {
post: "POST /api/techdocs/sync/{namespace}/{kind}/{name} - Sync documentation"
}
}
},
authApi: {
description: "Authentication and authorization API",
endpoints: {
auth: {
providers: "GET /.well-known/backstage/auth/providers - List auth providers",
refresh: "POST /api/auth/refresh - Refresh auth token"
},
permissions: {
authorize: "POST /api/permission/authorize - Check permissions",
policies: "GET /api/permission/policies - Get permission policies"
}
}
},
searchApi: {
description: "Search API for finding content across Backstage",
endpoints: {
search: {
query: "GET /api/search/query - Search for content",
index: "POST /api/search/index - Index content for search"
}
}
},
proxyApi: {
description: "Proxy API for external service integration",
endpoints: {
proxy: "GET /api/proxy/{path} - Proxy requests to external services"
}
}
},
clientLibraries: {
catalog: "@backstage/catalog-client",
scaffolder: "@backstage/scaffolder-client",
techdocs: "@backstage/techdocs-client",
auth: "@backstage/core-plugin-api",
search: "@backstage/search-client"
},
graphqlApi: {
endpoint: "/api/graphql",
description: "GraphQL API for complex queries",
commonQueries: [
"catalogEntities - Query catalog entities with filters",
"scaffolderTemplates - Get available templates",
"userProfile - Get current user information"
]
}
};