Backstage Tasks API

Endpoints for creating and managing scaffolder tasks.

Operations 9

GET /v2/tasks List tasks #
POST /v2/tasks Scaffold #
GET /v2/tasks/{taskId} Get task #
POST /v2/tasks/{taskId}/cancel Cancel task #
POST /v2/tasks/{taskId}/retry Retry #
GET /v2/tasks/{taskId}/events Stream logs polling #
GET /v2/tasks/{taskId}/eventstream Backstage Get task event stream #
GET /v2/tasks/{taskId}/logs Backstage Get task logs #
POST /v2/dry-run Backstage Dry-run a template #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/backstage-tasks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

backstage-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Backstage Tasks API
  version: '1.0'
  description: 'Operations tagged Tasks across 2 of this provider''s published API definitions: backstage-scaffolder-backend-openapi.yaml, backstage-scaffolder-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /
- url: https://localhost:7007/api/scaffolder
  description: Local development server
tags:
- name: Tasks
paths:
  /v2/tasks:
    get:
      operationId: ListTasks
      description: Returns a list of tasks, filtering by ownership and/or status if given.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTasksResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - {}
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/createdBy'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/order'
      - $ref: '#/components/parameters/status'
      tags:
      - Tasks
      summary: List tasks
      x-summary-source: derived
    post:
      operationId: Scaffold
      description: 'Executes the scaffolding of a component, given a template and its

        parameter values.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScaffolderScaffoldOptions'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                required:
                - id
        '400':
          description: Validation errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/ValidationError'
                required:
                - errors
      security:
      - {}
      - JWT: []
      parameters: []
      tags:
      - Tasks
      summary: Scaffold
      x-summary-source: derived
    servers:
    - url: /
  /v2/tasks/{taskId}:
    get:
      operationId: GetTask
      description: Get a task by ID.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SerializedTask'
        '403':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - {}
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/taskId'
      tags:
      - Tasks
      summary: Get task
      x-summary-source: derived
    servers:
    - url: /
  /v2/tasks/{taskId}/cancel:
    post:
      operationId: CancelTask
      description: Sends a signal to a task broker to cancel the running task by taskId.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/TaskStatus'
      security:
      - {}
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/taskId'
      tags:
      - Tasks
      summary: Cancel task
      x-summary-source: derived
    servers:
    - url: /
  /v2/tasks/{taskId}/retry:
    post:
      operationId: Retry
      description: Starts the task again from the point where it failed.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                secrets:
                  type: object
                  additionalProperties:
                    type: string
      responses:
        '201':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                required:
                - id
        '400':
          description: Validation errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/ValidationError'
                required:
                - errors
        '409':
          $ref: '#/components/responses/ErrorResponse'
      security:
      - {}
      - JWT: []
      parameters:
      - $ref: '#/components/parameters/taskId'
      tags:
      - Tasks
      summary: Retry
      x-summary-source: derived
    servers:
    - url: /
  /v2/tasks/{taskId}/events:
    get:
      operationId: StreamLogsPolling
      description: Get events for a task by ID.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SerializedTaskEvent'
        '403':
          $ref: '#/components/responses/ErrorResponse'
      parameters:
      - $ref: '#/components/parameters/eventsAfter'
      - $ref: '#/components/parameters/taskId'
      tags:
      - Tasks
      summary: Stream logs polling
      x-summary-source: derived
    servers:
    - url: /
  /v2/tasks/{taskId}/eventstream:
    get:
      operationId: getTaskEventStream
      summary: Backstage Get task event stream
      description: Returns a server-sent event stream of task progress events. This endpoint streams real-time updates about the task execution including step progress, log messages, and completion status.
      tags:
      - Tasks
      security:
      - bearerAuth: []
      parameters:
      - name: taskId
        in: path
        required: true
        schema:
          type: string
      - name: after
        in: query
        required: false
        description: Only return events after this sequence number.
        schema:
          type: integer
      responses:
        '200':
          description: A server-sent event stream of task events.
          content:
            text/event-stream:
              schema:
                type: string
        '404':
          $ref: '#/components/responses/NotFound'
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://localhost:7007/api/scaffolder
      description: Local development server
  /v2/tasks/{taskId}/logs:
    get:
      operationId: getTaskLogs
      summary: Backstage Get task logs
      description: Retrieves the log entries for a scaffolder task, providing detailed information about each step of template execution.
      tags:
      - Tasks
      security:
      - bearerAuth: []
      parameters:
      - name: taskId
        in: path
        required: true
        schema:
          type: string
      - name: after
        in: query
        required: false
        description: Only return log entries after this sequence number.
        schema:
          type: integer
      responses:
        '200':
          description: Task log entries.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                    createdAt:
                      type: string
                      format: date-time
                    body:
                      type: object
                      properties:
                        message:
                          type: string
                        stepId:
                          type: string
                        status:
                          type: string
        '404':
          $ref: '#/components/responses/NotFound'
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://localhost:7007/api/scaffolder
      description: Local development server
  /v2/dry-run:
    post:
      operationId: dryRunTask
      summary: Backstage Dry-run a template
      description: Executes a template as a dry run without actually performing any side effects. Useful for testing and validating templates before actual execution.
      tags:
      - Tasks
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - template
              - values
              properties:
                template:
                  type: object
                  description: The template entity to dry-run.
                values:
                  type: object
                  description: Input values for the template parameters.
                  additionalProperties: true
                secrets:
                  type: object
                  description: Secret values to pass to the template.
                  additionalProperties:
                    type: string
                directoryContents:
                  type: array
                  description: Initial directory contents for the workspace.
                  items:
                    type: object
                    properties:
                      path:
                        type: string
                      base64Content:
                        type: string
      responses:
        '200':
          description: Dry-run result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  log:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                        body:
                          type: object
                  directoryContents:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        base64Content:
                          type: string
                  steps:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        status:
                          type: string
                  output:
                    type: object
                    additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
    servers:
    - url: https://localhost:7007/api/scaffolder
      description: Local development server
components:
  schemas:
    TaskEventType:
      type: string
      description: TaskEventType
      enum:
      - cancelled
      - completion
      - log
      - recovered
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            name:
              type: string
            message:
              type: string
            stack:
              type: string
            code:
              type: string
          required:
          - name
          - message
        request:
          type: object
          properties:
            method:
              type: string
            url:
              type: string
          required:
          - method
          - url
        response:
          type: object
          properties:
            statusCode:
              type: number
          required:
          - statusCode
      required:
      - error
      - response
      additionalProperties: {}
    ValidationError:
      type: object
      properties:
        path:
          type: array
          items:
            oneOf:
            - type: string
            - type: integer
        property:
          type: string
        message:
          type: string
        instance:
          type: object
        name:
          type: string
        argument:
          oneOf:
          - type: boolean
          - type: number
          - type: object
          - type: string
        stack:
          type: string
      required:
      - path
      - property
      - message
      - schema
      - instance
      - name
      - argument
      - stack
      additionalProperties: {}
    JsonObject:
      type: object
      properties: {}
      description: A type representing all allowed JSON object values.
      additionalProperties: {}
    SerializedTask:
      type: object
      properties:
        id:
          type: string
        spec:
          type: object
        status:
          $ref: '#/components/schemas/TaskStatus'
        createdAt:
          type: string
        lastHeartbeatAt:
          type: string
        createdBy:
          type: string
      required:
      - id
      - spec
      - status
      - createdAt
      description: SerializedTask
    TaskStatus:
      type: string
      enum:
      - cancelled
      - completed
      - failed
      - open
      - processing
      - skipped
      description: The status of each step of the Task
    SerializedTaskEvent:
      type: object
      properties:
        id:
          type: integer
        isTaskRecoverable:
          type: boolean
        taskId:
          type: string
        body:
          allOf:
          - $ref: '#/components/schemas/JsonObject'
          - type: object
            properties:
              message:
                type: string
              status:
                $ref: '#/components/schemas/TaskStatus'
              stepId:
                type: string
            required:
            - message
        type:
          $ref: '#/components/schemas/TaskEventType'
        createdAt:
          type: string
      required:
      - id
      - taskId
      - body
      - type
      - createdAt
      description: SerializedTaskEvent
    ListTasksResponse:
      type: object
      properties:
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/SerializedTask'
        totalTasks:
          type: number
      required:
      - tasks
      description: The response shape for the `listTasks` call to the `scaffolder-backend`
    ScaffolderScaffoldOptions:
      type: object
      properties:
        templateRef:
          type: string
        values:
          type: object
          additionalProperties: {}
        secrets:
          type: object
          additionalProperties:
            type: string
      required:
      - templateRef
      - values
      description: The input options to the `scaffold` method of the `ScaffolderClient`.
    Task:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the task.
        spec:
          type: object
          properties:
            apiVersion:
              type: string
            templateInfo:
              type: object
              properties:
                entityRef:
                  type: string
                  description: Reference to the template entity.
            steps:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  action:
                    type: string
                  input:
                    type: object
            output:
              type: object
              additionalProperties: true
            parameters:
              type: object
              additionalProperties: true
        status:
          type: string
          description: The current status of the task.
          enum:
          - open
          - processing
          - completed
          - failed
          - cancelled
        createdAt:
          type: string
          format: date-time
        lastHeartbeatAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        createdBy:
          type: string
          description: The user who created the task.
  parameters:
    eventsAfter:
      name: after
      in: query
      description: Offset event ID to stream events after.
      required: false
      allowReserved: true
      schema:
        type: integer
    taskId:
      name: taskId
      in: path
      required: true
      schema:
        type: string
    order:
      name: order
      in: query
      description: Order
      required: false
      allowReserved: true
      schema:
        type: array
        items:
          type: string
    limit:
      name: limit
      in: query
      description: Number of records to return in the response.
      required: false
      allowReserved: true
      schema:
        type: integer
        minimum: 0
    offset:
      name: offset
      in: query
      description: Number of records to skip in the query page.
      required: false
      allowReserved: true
      schema:
        type: integer
        minimum: 0
    createdBy:
      name: createdBy
      in: query
      description: Created by
      required: false
      allowReserved: true
      schema:
        type: array
        items:
          type: string
    status:
      name: status
      in: query
      description: Status
      required: false
      allowReserved: true
      schema:
        type: array
        items:
          type: string
  responses:
    ErrorResponse:
      description: An error response from the backend.
      content:
        application/json; charset=utf-8:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid authentication token.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Backstage token returned by the identity API.
externalDocs:
  description: Backstage Software Templates Documentation
  url: https://backstage.io/docs/features/software-templates/
x-refined-from:
- backstage-scaffolder-backend-openapi.yaml
- backstage-scaffolder-openapi.yml