DEV Community

Alex Spinov
Alex Spinov

Posted on

Backstage Has a Free API — Build Your Internal Developer Portal

Backstage: Spotify's Internal Developer Portal — Now Open Source

Backstage by Spotify is an open platform for building developer portals. Service catalog, tech docs, CI/CD dashboards, templates — all in one place. Used by Netflix, American Airlines, HP, and 2000+ companies.

The Problem Backstage Solves

  • Engineers spend 30% of time searching for information
  • Every team uses different tools, different dashboards
  • Onboarding takes weeks because knowledge is scattered
  • Nobody knows who owns which service

The Free API

Backstage exposes a REST API for everything:

# Get all services in the catalog
curl http://localhost:7007/api/catalog/entities?filter=kind=Component

# Get a specific service
curl http://localhost:7007/api/catalog/entities/by-name/component/default/my-api

# Search across all entities
curl "http://localhost:7007/api/search/query?term=payment"

# List all teams
curl http://localhost:7007/api/catalog/entities?filter=kind=Group

# Get TechDocs
curl http://localhost:7007/api/techdocs/entity/default/component/my-api
Enter fullscreen mode Exit fullscreen mode

Software Catalog (catalog-info.yaml)

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: payment-service
  description: Processes payments via Stripe
  annotations:
    github.com/project-slug: myorg/payment-service
    backstage.io/techdocs-ref: dir:.
  tags:
  - python
  - payments
spec:
  type: service
  lifecycle: production
  owner: team-payments
  system: checkout
  dependsOn:
  - component:user-service
  - resource:postgres-payments
  providesApis:
  - payment-api
Enter fullscreen mode Exit fullscreen mode

Software Templates

apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
  name: create-microservice
  title: Create New Microservice
spec:
  type: service
  parameters:
  - title: Service Info
    properties:
      name:
        type: string
      owner:
        type: string
        ui:field: OwnerPicker
  steps:
  - id: fetch
    action: fetch:template
    input:
      url: ./skeleton
      values:
        name: ${{ parameters.name }}
  - id: publish
    action: publish:github
    input:
      repoUrl: github.com?owner=myorg&repo=${{ parameters.name }}
Enter fullscreen mode Exit fullscreen mode

Real-World Use Case

A company with 200 engineers and 500 microservices had no central catalog. Engineers spent hours finding service owners. Backstage: every service cataloged, every API documented, every owner visible. Onboarding dropped from 3 weeks to 3 days.

Quick Start

npx @backstage/create-app@latest
cd my-backstage-app
yarn dev
Enter fullscreen mode Exit fullscreen mode

Resources


Need automated data for your developer portal? Check out my tools on Apify or email spinov001@gmail.com for custom solutions.

Top comments (0)