postman-cs/Postman Onboarding: Repo Sync

Export Postman collections and environments into your repo with CI wiring. Part of the Postman API Onboarding suite.

View on GitHub

Trust Signals

Scorecard Score
Scorecard 4–6scored Jun 12, 2026
Maintenance Recency
Activelast commit Jul 10, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: postman-cs/postman-repo-sync-action@e87eccc2e9cc1de6e1b914a634c37b631c9a35ca # v2.1.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
generate-ci-workflowWhether to generate the CI workflow filenotrue
ci-workflow-pathPath to write the generated CI workflow file. Defaults to azure-pipelines.yml for Azure DevOps, .github/workflows/ci.yml otherwise.no
ci-runner-osRunner operating system for the generated CI workflow. Use windows for native PowerShell Azure DevOps CI.nolinux
project-nameService project name used for environment, mock, and monitor naming.yes
workspace-idPostman workspace ID used for workspace-link and export metadata.no
baseline-collection-idBaseline collection ID used for exported artifacts and mock server creation.no
monitor-typeType of monitor to create ("cloud" or "cli"). "cli" will skip cloud monitor creation and rely on the CI workflow.nocloud
smoke-collection-idSmoke collection ID used for monitor creation.no
contract-collection-idContract collection ID used for exported artifacts.no
collection-sync-modeCollection sync lifecycle mode (refresh or version).norefresh
spec-sync-modeSpec sync lifecycle mode (update or version).noupdate
release-labelOptional release label used for versioned naming.no
monitor-idExisting smoke monitor ID. When set, the action validates and reuses this monitor instead of creating a new one.no
mock-urlExisting mock server URL. When set, the action validates and reuses this mock instead of creating a new one.no
monitor-cronCron expression for monitor scheduling (e.g. '0 */6 * * *'). When empty, the monitor is created disabled and triggered to run once per workflow invocation (and once on every subsequent run).no""
environments-jsonJSON array of environment slugs to create or update.no["prod"]
git-providerGit provider override ('github', 'gitlab', 'bitbucket', 'azure-devops'). Auto-detected from environment when omitted.no
ado-tokenAzure DevOps personal access token or system token used to push commits in Azure Pipelines. Defaults to SYSTEM_ACCESSTOKEN when available.no
repo-urlExplicit repository URL (GitHub, GitLab, or Azure DevOps). Defaults to the URL inferred from runner environment when omitted.no
integration-backendAdvanced/internal. Integration backend for managed workspace linking and environment sync; leave unset to use the default.no
workspace-link-enabledEnable workspace linking.notrue
environment-sync-enabledEnable association of Postman environments to system environments.notrue
system-env-map-jsonJSON map of environment slug to system environment id.no{}
environment-uids-jsonJSON map of environment slug to Postman environment uid.no{}
env-runtime-urls-jsonJSON map of environment slug to runtime base URL.no{}
artifact-dirRoot directory for exported Postman artifacts.nopostman
repo-write-modeRepo mutation mode for generated artifacts and workflow files.nocommit-and-push
current-refExplicit ref override for push-changes when the checkout is detached.no
committer-nameGit committer name for sync commits.noPostman
committer-emailGit committer email for sync commits.nosupport@postman.com
postman-api-keyPostman API key (PMAK). Used only to mint/re-mint the access token (via postman-resolve-service-token-action) and for the Postman CLI spec-lint login. Asset operations (environments, collections, mocks, monitors) run on the access-token gateway and do not use the PMAK. Optional when a valid postman-access-token is supplied; required only for the CLI lint path.no
postman-access-tokenPostman access token minted by postman-resolve-service-token-action. Required for all asset operations (environment create/get/update, collection read, mock, monitor) which run through the access-token gateway. Also used for workspace linking, system environment association, and generated API-key creation. When omitted, the action mints one from postman-api-key (service-account PMAK); if that mint also fails the action fails fast — PMAK is never an asset-routing fallback.no
team-idPostman team ID resolved by postman-resolve-service-token-action. Primary team scope for all downstream actions; included as x-entity-team-id in org-mode Bifrost calls. Falls back to POSTMAN_TEAM_ID when omitted. Set explicitly for org-mode teams.no""
credential-preflightCredential identity preflight policy. warn (default) logs a note and continues when postman-api-key and postman-access-token resolve to different parent orgs; enforce fails the run on that condition before any workspace is created. Both modes warn when postman-access-token is not a service-account token.nowarn
branch-strategyBranch-aware sync strategy. legacy (default) keeps branch-blind behavior; publish-gate restricts canonical writes to the canonical branch and skips repo-sync on other branches; preview additionally maintains suffixed per-branch preview asset sets.nolegacy
canonical-branchExplicit canonical branch (the sole writer of canonical assets and tracked state). Defaults to the provider-resolved default branch; required on providers without a default-branch variable (Bitbucket, Azure DevOps) when branch-strategy is not legacy.no
channelsComma-separated channel map for long-lived promotion branches, e.g. "develop=DEV, staging=STAGE, release/*=RC". Channel branches maintain prefix-named parallel asset sets and never mutate canonical assets.no
preview-ttlSliding TTL in days for preview asset sets (refreshed on every successful preview sync; the retention contract of last resort when no provider credential is available for branch-existence checks).no30
github-tokenGitHub token used for repo variable persistence and commits.no
gh-fallback-tokenFallback token for repository variable APIs and workflow-file pushes.no
org-modeWhether the Postman team uses org-mode. When true, x-entity-team-id is included in Postman integration API calls. Non-org teams must omit this header.nofalse
ci-workflow-base64Optional base64-encoded ci.yml content. Defaults to the built-in template.no
ssl-client-certBase64-encoded PEM client certificate for Postman CLI mTLS runs.no
ssl-client-keyBase64-encoded PEM client private key for Postman CLI mTLS runs.no
ssl-client-passphraseOptional passphrase for encrypted ssl-client-key.no
ssl-extra-ca-certsOptional base64-encoded PEM CA certificate bundle for custom trust.no
spec-idSpec Hub UID emitted by bootstrap's spec-id output. When set, it is persisted into .postman/resources.yaml cloudResources so later runs and the generated CI workflow can resolve the spec without re-discovery.no
spec-content-changedWhether bootstrap changed canonical spec content. Native Spec Hub tag publication is skipped on no-op syncs.notrue
spec-pathOptional repo-root-relative path to the local OpenAPI file. Recorded in .postman/resources.yaml and .postman/workflows.yaml metadata so the committed artifacts point back at the spec source in this repository; the file itself is not uploaded by this action.no
postman-regionPostman data residency region for public API and Postman CLI calls. One of: us or eu.nous
postman-stackPostman stack profile. Leave at the default unless Postman support directs otherwise.noprod
namedescription
integration-backendResolved integration backend for the onboarding run.
resolved-current-refResolved push target based on current-ref semantics.
workspace-link-statusWhether workspace linking succeeded, was skipped, or failed.
environment-sync-statusWhether environment sync succeeded, was skipped, or failed.
environment-uids-jsonJSON map of environment slug to Postman environment uid.
mock-urlCreated or reused mock server URL.
monitor-idCreated or reused smoke monitor ID.
repo-sync-summary-jsonJSON summary of repo materialization and workspace sync outputs.
commit-shaCommit SHA produced by repo-write-mode, if any.
sync-statusBranch-aware sync status: synced, skipped-branch-gate, or empty under branch-strategy legacy.
branch-decisionSerialized BranchDecision JSON for downstream actions (also exported as POSTMAN_BRANCH_DECISION).
spec-version-tagNative Spec Hub version tag created after successful canonical repo-sync finalization.
spec-version-urlRead-only URL for the tagged Spec Hub snapshot.