Backstage Scaffolder Actions: Built-in, HTTP Requests and Custom Actions
What runs when a developer clicks Create: the actions that ship with the scaffolder, how to call Backstage APIs with http:backstage:request, how to write your own action, and how to control who can run them.
Published November 27, 2026 · HostingX Solutions LLC
Short answer
An action is the named function a Software Template step runs, such as
fetch:template,publish:githuborcatalog:register. Your Backstage instance lists every installed action, with its inputs and outputs, at/create/actions.The scaffolder backend ships with fetch, catalog, debug and filesystem actions. Publishing actions such as
publish:githubcome from separate modules you add to the backend.http:backstage:requestis not built in. It comes from Roadie's open-source@roadiehq/scaffolder-backend-module-http-requestpackage and sends an HTTP request to a Backstage backend path such as/proxy/...or/catalog/..., authenticated as the user who started the task.For anything else, write a custom action with
createTemplateActionand register it in a scaffolder backend module. To limit who can see sensitive steps or run specific actions, use the scaffolder permissions in Backstage's permission framework.
How Do Backstage Software Templates Run Actions?
A Software Template is a catalog entity of kind Template with apiVersion: scaffolder.backstage.io/v1beta3. Its parameters define the form a developer fills in. Its steps run in order, and each step names an action and passes it an input. When the task finishes, the output section shows links and text to the developer.
Form values are referenced as ${{ parameters.name }}. A step's results are referenced as ${{ steps.publish.output.repoContentsUrl }}; use bracket notation, such as ${{ steps['publish-repo'].output.remoteUrl }}, when the step id contains dashes. Steps can also take an if condition, and each repeats a step over a list. Here is a minimal template with three actions:
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: node-service
title: Node.js service
spec:
owner: group:platform-team
type: service
parameters:
- title: Service details
required: [name, repoUrl]
properties:
name:
title: Name
type: string
repoUrl:
title: Repository location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts: [github.com]
steps:
- id: fetch
name: Render the skeleton
action: fetch:template
input:
url: ./skeleton
values:
name: ${{ parameters.name }}
- id: publish
name: Create the repository
action: publish:github
input:
repoUrl: ${{ parameters.repoUrl }}
- id: register
name: Register in the catalog
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
catalogInfoPath: /catalog-info.yaml
output:
links:
- title: Repository
url: ${{ steps.publish.output.remoteUrl }}For the wider picture of how templates fit into a developer portal, see our Backstage internal developer platform guide and the golden paths guide.
Where Can You See Which Actions Are Installed?
Open /create/actions in your Backstage instance (http://localhost:3000/create/actions in local development). The page lists every registered action with its input and output schema. Treat it as the source of truth for your instance: each backend module you add registers more actions, so two Backstage installations rarely have the same list.
Which Actions Are Built Into the Scaffolder?
These actions are registered by @backstage/plugin-scaffolder-backend itself, with no extra module:
| Action | What it does | Main inputs | Outputs |
|---|---|---|---|
fetch:plain | Copies a directory into the workspace without templating | url, targetPath | - |
fetch:plain:file | Copies a single file without templating | url, targetPath | - |
fetch:template | Copies a directory and renders file contents and paths with the values you pass | url, targetPath, values, copyWithoutTemplating | - |
fetch:template:file | Renders a single file with the values you pass | url, targetPath, values | - |
catalog:register | Registers a catalog-info.yaml file in the Software Catalog | catalogInfoUrl, or repoContentsUrl + catalogInfoPath | entityRef, catalogInfoUrl |
catalog:fetch | Reads one or more entities from the catalog | entityRef or entityRefs | entity, entities |
catalog:write | Writes a catalog-info.yaml file into the workspace | entity, filePath | - |
debug:log | Writes a message to the task log and can list the workspace | message, listWorkspace | - |
debug:wait | Pauses the task | minutes, seconds, milliseconds | - |
fs:delete | Deletes files or directories in the workspace | files | - |
fs:rename | Renames or moves files in the workspace | files (from, to, overwrite) | - |
fs:readdir | Lists files and folders in the workspace | paths, recursive | files, folders |
Based on the scaffolder backend source on GitHub, November 2026. Check /create/actions for the version you run.
Publishing and integration actions come from modules
Creating repositories and talking to source control is handled by modules. The Backstage docs list modules for GitHub, GitLab, Azure DevOps, Bitbucket Cloud, Bitbucket Server, Gerrit and Gitea, plus Sentry, Cookiecutter, Rails and Yeoman. The GitHub module, @backstage/plugin-scaffolder-backend-module-github, provides publish:github (outputs remoteUrl, repoContentsUrl and commitHash) and publish:github:pull-request (outputs remoteUrl, targetBranchName and pullRequestNumber), along with actions for webhooks, deploy keys, environments, branch protection and repository rulesets. The GitLab module provides publish:gitlab.
You add any module the same way: install the package in the backend, then register it in packages/backend/src/index.ts.
yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend-module-github
// packages/backend/src/index.ts
backend.add(import('@backstage/plugin-scaffolder-backend'));
backend.add(import('@backstage/plugin-scaffolder-backend-module-github'));What Is the http:backstage:request Action?
http:backstage:request is provided by @roadiehq/scaffolder-backend-module-http-request, an Apache-2.0 module in Roadie's roadie-backstage-plugins repository. Its own description reads: “Sends a HTTP request to the Backstage API. It uses the token of the user who triggers the task to authenticate requests.”
The action resolves path against your Backstage backend through the discovery service, so /catalog/entities goes to the catalog API and /proxy/... goes to the proxy plugin. To reach an external system, such as a ticketing tool or an internal provisioning API, add a proxy endpoint for it in app-config.yaml and call it through /proxy/<entry>/.... The API token then lives in backend config, not in the template.
How do you install it?
yarn --cwd packages/backend add @roadiehq/scaffolder-backend-module-http-request
// packages/backend/src/index.ts
backend.add(import('@backstage/plugin-scaffolder-backend'));
backend.add(import('@roadiehq/scaffolder-backend-module-http-request'));Roadie's README adds the proxy backend plugin in the same setup; /proxy/ paths need it. The README also documents the older backend system, where you pass createHttpBackstageAction to the scaffolder router yourself.
Inputs
| Input | Required | What it does |
|---|---|---|
method | Yes | GET, HEAD, OPTIONS, POST, UPDATE, DELETE, PUT or PATCH |
path | Yes | A Backstage backend path, such as /proxy/<proxy-entry>/<api-path> or /catalog/entities |
headers | No | Request headers. If content-type contains json and the body is an object, the body is sent as JSON |
params | No | Query string parameters |
body | No | Request body |
continueOnBadResponse | No | By default the step fails on any status of 400 or above. Set to true to return the code and body and move on to the next step |
timeout | No | Request timeout in milliseconds; the default is 60000 |
useBackstageToken | No | Send the task’s backstageToken secret as the Authorization header instead of requesting a plugin token for the user |
logRequestPath | No | Whether the path is written to the task log; the default is true |
idempotencyKey | No | With task recovery enabled, the request runs at most once per task |
Outputs
The step returns code (the response status code), headers and body. Later steps and the template output read them as ${{ steps['step-id'].output.body }}.
Example: call an internal API through the proxy
First, a proxy endpoint in app-config.yaml. Backstage serves it under /api/proxy/infra-api, and the token comes from an environment variable:
proxy:
endpoints:
'/infra-api':
target: https://infra-api.internal.example.com
headers:
Authorization: Bearer ${INFRA_API_TOKEN}Then the template steps. The first sends the request, and the second writes the status code to the task log:
steps:
- id: request-db
name: Request a database
action: http:backstage:request
input:
method: POST
path: /proxy/infra-api/databases
headers:
content-type: application/json
body:
name: ${{ parameters.name }}-db
owner: ${{ parameters.owner }}
- id: log-status
name: Log the API response
action: debug:log
input:
message: "Infra API returned ${{ steps['request-db'].output.code }}"
output:
text:
- title: Database request
content: "Status code: ${{ steps['request-db'].output.code }}"What should you know before relying on it?
Dry runs skip writes. In dry-run mode the action sends only GET, HEAD and OPTIONS requests. Other methods are skipped and set no outputs, so later steps that read the response see nothing.
Failures stop the task by default. Any status of 400 or above fails the step. Set
continueOnBadResponse: truewhen a later step should handle the error instead.The SSRF guard is opt-in. If you set
scaffolder.http.allowedMethodsorscaffolder.http.allowedHostsin config, requests outside those lists fail with an “SSRF Blocked” error. In the current source, the host check parsespathas a full URL, so a relative path such as/proxy/...is rejected onceallowedHostsis set. Test your templates before you turn it on.Authentication is automatic. The action requests a token on behalf of the user who started the task. If you set an Authorization header yourself, it isn't overwritten.
Paths end up in logs. The path is logged by default; set
logRequestPath: falseif it carries anything you don't want in task logs.
How Do You Write a Custom Scaffolder Action?
When no installed action does what a step needs, write one. Generate a module with yarn backstage-cli new and choose scaffolder-backend-module; the CLI creates the package, and your action goes in src/actions/example/example.ts. This is the example from the Backstage docs. Each input is declared as a function that receives z (zod) and returns a type:
import { resolveSafeChildPath } from '@backstage/backend-plugin-api';
import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
import fs from 'fs-extra';
import { type z } from 'zod/v3';
export const createNewFileAction = () => {
return createTemplateAction({
id: 'acme:file:create',
description: 'Create an Acme file.',
schema: {
input: {
contents: z => z.string({ description: 'The contents of the file' }),
filename: z =>
z.string({
description: 'The filename of the file that will be created',
}),
},
},
async handler(ctx) {
await fs.outputFile(
resolveSafeChildPath(ctx.workspacePath, ctx.input.filename),
ctx.input.contents,
);
},
});
};Inside the handler, ctx.input holds the validated inputs, ctx.workspacePath is the task's working directory, ctx.logger writes to the task log, and ctx.output(name, value) sets outputs declared in schema.output. Wrap calls to external systems in ctx.checkpoint so a recovered task doesn't repeat steps that already succeeded. Backstage recommends ids in the form provider:entity:verb, in camelCase, with your company name as the namespace when the action is internal.
Register the action through the scaffolder's extension point. This module follows the same shape as the Sentry module in the Backstage repository:
import { createBackendModule } from '@backstage/backend-plugin-api';
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node';
import { createNewFileAction } from './actions/example/example';
export const acmeScaffolderModule = createBackendModule({
pluginId: 'scaffolder',
moduleId: 'acme',
register({ registerInit }) {
registerInit({
deps: {
scaffolder: scaffolderActionsExtensionPoint,
},
async init({ scaffolder }) {
scaffolder.addActions(createNewFileAction());
},
});
},
});Add the module package to packages/backend/src/index.ts with backend.add(import(...)), like any other backend module, and the new action appears at /create/actions. Actions that need config, a cache or other core services take them as extra deps in the same registerInit call.
How Do You Control Who Can Run Templates and Actions?
This is the “access policy” question for templates that touch infrastructure. Backstage handles it with the permission framework, which you turn on with permission.enabled: true in app-config.yaml. The scaffolder then checks these permissions, exported from @backstage/plugin-scaffolder-common/alpha:
| Permission | Controls |
|---|---|
templateParameterReadPermission | Read template parameters |
templateStepReadPermission | Read template steps |
actionExecutePermission | Execute an action |
taskCreatePermission | Create scaffolder tasks |
taskReadPermission | Read tasks and their logs |
taskCancelPermission | Cancel tasks |
templateDryRunPermission | Run inline template dry runs |
To protect part of a template, tag the parameter or step with backstage:permissions:
steps:
- id: request-db
name: Request a database
action: http:backstage:request
input:
method: POST
path: /proxy/infra-api/databases
backstage:permissions:
tags:
- infraA permission policy can then use scaffolderTemplateConditions.hasTag to decide who may read parameters and steps with that tag, and scaffolderActionConditions.hasActionId or hasProperty to decide who may execute a given action. This policy follows the example in the Backstage docs, with the action changed to http:backstage:request:
import { actionExecutePermission } from '@backstage/plugin-scaffolder-common/alpha';
import {
createScaffolderActionConditionalDecision,
scaffolderActionConditions,
} from '@backstage/plugin-scaffolder-backend/alpha';
// inside your PermissionPolicy's handle(request, user)
if (isPermission(request.permission, actionExecutePermission)) {
if (user?.info.userEntityRef === 'user:default/alice') {
return createScaffolderActionConditionalDecision(request.permission, {
not: scaffolderActionConditions.hasActionId({
actionId: 'http:backstage:request',
}),
});
}
}The docs check a single user for brevity. A real policy usually decides by group membership; the Backstage guide to writing a permission policy shows how to look up a user's ownership references.
Permissions decide who can run what. For infrastructure templates, also decide how changes land: a template can render Terraform or policy files with fetch:template and open a pull request with publish:github:pull-request, so the change goes through the same review and plan checks as any other infrastructure change. Our Terraform and Backstage guide covers that pattern.
How Do You Test Templates and Actions?
Template editor. Open
/create/edit(or the editor from the templates page menu), load a local template directory and submit the form. The template runs as a dry run, and a drawer shows the generated files and the log of each action.debug:log. Add a step with
listWorkspace: trueto see what earlier steps wrote to the workspace, or log a value to check an expression.Error bodies. While developing an
http:backstage:requeststep,continueOnBadResponse: trueplus adebug:logof the body shows what the API returned instead of a bare failure.Who can dry-run.
templateDryRunPermissioncontrols who may run inline dry runs, so you can keep the editor open to template authors only.
Frequently Asked Questions
What is http:backstage:request in Backstage?
A scaffolder action that sends an HTTP request to a Backstage backend path, such as a proxy endpoint or the catalog API, using the token of the user who started the task. It returns the status code, headers and body as step outputs.
Is http:backstage:request a built-in scaffolder action?
No. It comes from Roadie's @roadiehq/scaffolder-backend-module-http-request package, which you install in the backend and register with backend.add.
How do I list all scaffolder actions in my Backstage instance?
Open /create/actions. It lists every registered action with its input and output schema, including actions added by modules.
How do I call an external API from a Backstage template?
Add a proxy endpoint for the API in app-config.yaml and call it with http:backstage:request using a path under /proxy/. For logic beyond a single request, such as polling or combining several calls, write a custom action.
Can I restrict which users can run a scaffolder action?
Yes. With the permission framework on, write a policy for actionExecutePermission that uses scaffolderActionConditions.hasActionId, and tag sensitive steps and parameters with backstage:permissions.
What is the difference between fetch:plain and fetch:template?
fetch:plain copies files as they are. fetch:template renders file contents and paths with the values you pass, and can leave chosen files untouched with copyWithoutTemplating.
Building golden-path templates in Backstage?
We build Backstage portals, Software Templates and custom scaffolder actions, plus the CI/CD and Terraform automation behind them, for US businesses. The first 30-minute consultation is free.
Related Articles
Backstage Internal Developer Platform Guide
Catalog, templates and TechDocs: building a portal on Backstage.
Backstage Setup Guide for AWS
Deploying Backstage on EKS with RDS, Cognito and Helm.
Golden Paths for Developers
Designing the templates developers actually use.
Internal Developer Platform Examples
Who built an IDP, what they built, and what Gartner says.
See also: Platform engineering services · Platform engineering on Kubernetes · Terraform and Backstage
Services
Subscribe to our newsletter
Get monthly email updates about improvements.
© 2026 HostingX Solutions LLC. All Rights Reserved.
LLC No. 0008072296 | Est. 2026 | New Mexico, USA
Terms of Service
Privacy Policy
Acceptable Use Policy