Portable bundles
Stable YAML and JSON documents for moving Reqflo objects between tools.
Reqflo Portable Bundles
Portable bundles are stable YAML or JSON documents for moving Reqflo objects between the app, CLI, API clients, Terraform, backup/export flows, future IDP rendering, and future Git storage.
The app does not write these bundles to GitHub. They are import/export payloads only. Bundles must not include secret values.
apiVersion: reqflo.dev/v1
kind: RequestTemplate
metadata:
key: create-customer
name: Create customer
spec: {}RequestTemplate
RequestTemplate bundles contain the canonical request definition. They do not contain scripts. Authentication data may describe required schemes and secret references, but never raw credentials.
apiVersion: reqflo.dev/v1
kind: RequestTemplate
metadata:
key: create-customer
name: Create customer
description: Creates a customer record.
spec:
service:
key: billing-api
protocol: http
transport: http
lifecycleState: draft
version:
versionNumber: 1
sourceKind: manual
method: POST
path: /customers
requestShape:
pathParams: {}
queryParams: {}
headers:
content-type:
required: true
value:
kind: literal
value: application/json
cookies: {}
body:
mode: json
contentType: application/json
schemaRef: '#/components/schemas/CreateCustomerRequest'
template:
email:
kind: variable
name: customerEmail
plan:
kind: literal
value: starter
responseShape:
expectedStatuses: [201]
primarySuccessStatus: 201
schemaRef: '#/components/schemas/Customer'
exampleRefs: []
authShape:
required: true
scheme: bearer
profileRef: null
scopes: [customers:write]
mockHints: {}
compatibility: unknownJourney
Journey bundles group steps. Request steps reference RequestTemplates by service and template key; they must not copy method, path, body, headers, response shape, or auth shape from the template.
apiVersion: reqflo.dev/v1
kind: Journey
metadata:
key: customer-onboarding
name: Customer onboarding
spec:
purpose: test
state: draft
version:
versionNumber: 1
baseSteps:
- id: create-customer
type: request
templateRef:
serviceKey: billing-api
templateKey: create-customer
resolution: latest_compatible
with:
customerEmail:
kind: variable
name: customerEmail
save:
customerId:
path: $.id
- id: calculate-note
type: script
runtime: expression
source: '"created " + inputs.customerId'
- id: notify
type: action
actionRef: internal.notification.placeholder
inputSchema: {}
environmentPolicy:
allowedEnvironmentRefs: [dev, staging]
defaultEnvironmentRef: dev
credentialPolicy:
mode: user_delegated
ttlSeconds: 900
scopes: [customers:write]
outputPolicy:
redactPaths: ['$.headers.authorization']
includeRawResponses: false
maxResponseBytes: 65536JourneyVariant
JourneyVariant bundles are overlays. They do not copy the full journey. They can skip base steps, override step configuration, replace examples/variants, insert steps, or append steps.
apiVersion: reqflo.dev/v1
kind: JourneyVariant
metadata:
key: payment-failure
name: Payment failure
spec:
journeyRef:
key: customer-onboarding
state: draft
overlay:
- type: replace_example
stepId: create-customer
exampleRef: declined-card
- type: insert_step
position: after
anchorStepId: create-customer
step:
id: verify-decline
type: request
templateRef:
serviceKey: billing-api
templateKey: get-payment-status
resolution: latestLibrary
Library bundles group references. They do not own or copy canonical objects.
summary fields are optional export conveniences for rendering and import
previews.
apiVersion: reqflo.dev/v1
kind: Library
metadata:
key: qa-smoke-tests
name: QA Smoke Tests
description: High-signal tests for release checks.
spec:
visibility: org
items:
- itemType: request_template
ref:
key: create-customer
displayName: Create customer
tags: [customers, smoke]
- itemType: journey
ref:
key: customer-onboarding
displayName: Customer onboarding
tags: [journey, smoke]API
Export:
GET /api/portable/export/request-template/{id}?organizationId={orgId}&format=yaml
GET /api/portable/export/journey/{id}?organizationId={orgId}&includeVariants=true
GET /api/portable/export/library/{id}?organizationId={orgId}&format=jsonDry-run import:
POST /api/portable/import/dry-runCreate draft from import:
POST /api/portable/importImport request body:
{
"organizationId": "00000000-0000-4000-8000-000000000000",
"source": "apiVersion: reqflo.dev/v1\nkind: Library\n...",
"format": "yaml"
}You may also send a parsed bundle object instead of source.
Imports run validation first, detect duplicates, and create drafts by default. Existing approved objects are never overwritten by the import endpoint.