@postman-cse/onboarding-api 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -0
- package/REST_MIGRATION_SEAM.md +32 -0
- package/action.yml +269 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# postman-api-onboarding-action
|
|
2
|
+
|
|
3
|
+
Public open-alpha composite GitHub Action that orchestrates Postman onboarding by chaining:
|
|
4
|
+
|
|
5
|
+
- `postman-cs/postman-bootstrap-action@v0`
|
|
6
|
+
- `postman-cs/postman-repo-sync-action@v0`
|
|
7
|
+
- `postman-cs/postman-insights-onboarding-action@v0` (optional, when `enable-insights: true`)
|
|
8
|
+
|
|
9
|
+
This is the primary partner-facing entrypoint for the open-alpha suite.
|
|
10
|
+
|
|
11
|
+
For existing services, the composite action can target an existing workspace/spec/collection set and can suppress or redirect generated CI workflow output for repos that already have their own pipeline layout.
|
|
12
|
+
|
|
13
|
+
## Contract
|
|
14
|
+
|
|
15
|
+
- Default `integration-backend` is `bifrost`.
|
|
16
|
+
- Inputs are backend-neutral and kebab-case.
|
|
17
|
+
- Bootstrap outputs are explicitly mapped into repo-sync inputs in `action.yml`.
|
|
18
|
+
- Final outputs are surfaced from the two lower-level actions without exposing internal step mode controls.
|
|
19
|
+
- Collection artifacts are exported in the Postman Collection v3 multi-file YAML directory structure (produced during the repo-sync step).
|
|
20
|
+
- Workspace-to-repository linking supports both GitHub and GitLab (cloud and self-hosted) URLs via Bifrost.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
jobs:
|
|
26
|
+
onboarding:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
permissions:
|
|
29
|
+
actions: write
|
|
30
|
+
contents: write
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- uses: postman-cs/postman-api-onboarding-action@v0
|
|
34
|
+
with:
|
|
35
|
+
project-name: core-payments
|
|
36
|
+
domain: core-banking
|
|
37
|
+
domain-code: AF
|
|
38
|
+
requester-email: owner@example.com
|
|
39
|
+
workspace-admin-user-ids: 101,102
|
|
40
|
+
spec-url: https://example.com/openapi.yaml
|
|
41
|
+
environments-json: '["prod","stage"]'
|
|
42
|
+
system-env-map-json: '{"prod":"uuid-prod","stage":"uuid-stage"}'
|
|
43
|
+
governance-mapping-json: '{"core-banking":"Core Banking"}'
|
|
44
|
+
env-runtime-urls-json: '{"prod":"https://api.example.com"}'
|
|
45
|
+
postman-api-key: ${{ secrets.POSTMAN_API_KEY }}
|
|
46
|
+
postman-access-token: ${{ secrets.POSTMAN_ACCESS_TOKEN }}
|
|
47
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
48
|
+
gh-fallback-token: ${{ secrets.GH_FALLBACK_TOKEN }}
|
|
49
|
+
# enable-insights: true # Chain Insights onboarding after bootstrap and repo sync
|
|
50
|
+
# cluster-name: my-cluster
|
|
51
|
+
|
|
52
|
+
onboarding-existing:
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
permissions:
|
|
55
|
+
actions: write
|
|
56
|
+
contents: write
|
|
57
|
+
variables: write
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
- uses: postman-cs/postman-api-onboarding-action@v0
|
|
61
|
+
with:
|
|
62
|
+
project-name: core-payments
|
|
63
|
+
workspace-id: ws-123
|
|
64
|
+
spec-id: spec-123
|
|
65
|
+
baseline-collection-id: col-baseline
|
|
66
|
+
smoke-collection-id: col-smoke
|
|
67
|
+
contract-collection-id: col-contract
|
|
68
|
+
spec-url: https://example.com/openapi.yaml
|
|
69
|
+
generate-ci-workflow: false
|
|
70
|
+
postman-api-key: ${{ secrets.POSTMAN_API_KEY }}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Non-GitHub CI Usage
|
|
74
|
+
|
|
75
|
+
On GitHub Actions, continue using the composite action as documented above. The CLI entry points are for GitLab CI, Bitbucket Pipelines, Azure DevOps, and other CI systems.
|
|
76
|
+
|
|
77
|
+
Install both CLIs globally:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install -g postman-bootstrap-action postman-repo-sync-action
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Run bootstrap first and save its JSON output:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
postman-bootstrap \
|
|
87
|
+
--project-name "my-api" \
|
|
88
|
+
--spec-url "https://registry.example.com/specs/my-api/openapi.yaml" \
|
|
89
|
+
--postman-api-key "$POSTMAN_API_KEY" \
|
|
90
|
+
--result-json ./bootstrap-result.json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Extract the outputs you need from the JSON:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
WORKSPACE_ID=$(jq -r '.["workspace-id"]' bootstrap-result.json)
|
|
97
|
+
SMOKE_COLLECTION_ID=$(jq -r '.["smoke-collection-id"]' bootstrap-result.json)
|
|
98
|
+
CONTRACT_COLLECTION_ID=$(jq -r '.["contract-collection-id"]' bootstrap-result.json)
|
|
99
|
+
BASELINE_COLLECTION_ID=$(jq -r '.["baseline-collection-id"]' bootstrap-result.json)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Run repo-sync with those values:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
postman-repo-sync \
|
|
106
|
+
--project-name "my-api" \
|
|
107
|
+
--workspace-id "$WORKSPACE_ID" \
|
|
108
|
+
--baseline-collection-id "$BASELINE_COLLECTION_ID" \
|
|
109
|
+
--smoke-collection-id "$SMOKE_COLLECTION_ID" \
|
|
110
|
+
--contract-collection-id "$CONTRACT_COLLECTION_ID" \
|
|
111
|
+
--postman-api-key "$POSTMAN_API_KEY" \
|
|
112
|
+
--result-json ./sync-result.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Both CLIs support `--dotenv-path` for shell-friendly KEY=VALUE output that can be sourced with `source ./bootstrap.env`.
|
|
116
|
+
|
|
117
|
+
The Insights onboarding CLI is not yet available for non-GitHub CI. See the `postman-insights-onboarding-action` repo for updates.
|
|
118
|
+
|
|
119
|
+
Even when reusing an existing `spec-id`, the composite action still requires `spec-url` because the bootstrap step updates the existing Spec Hub asset from that source of truth.
|
|
120
|
+
|
|
121
|
+
## Inputs
|
|
122
|
+
|
|
123
|
+
| Input | Default | Notes |
|
|
124
|
+
| --- | --- | --- |
|
|
125
|
+
| `workspace-id` | | Reuse an existing Postman workspace through the bootstrap step. |
|
|
126
|
+
| `spec-id` | | Update an existing Postman spec instead of creating a new one. |
|
|
127
|
+
| `baseline-collection-id` | | Reuse an existing baseline collection. |
|
|
128
|
+
| `smoke-collection-id` | | Reuse an existing smoke collection. |
|
|
129
|
+
| `contract-collection-id` | | Reuse an existing contract collection. |
|
|
130
|
+
| `collection-sync-mode` | `refresh` | Collection lifecycle policy. `refresh` regenerates from latest spec (default), `reuse` keeps existing, `version` creates release-scoped collections. |
|
|
131
|
+
| `spec-sync-mode` | `update` | Spec lifecycle policy. `update` keeps canonical spec current, `version` creates release-scoped spec. |
|
|
132
|
+
| `release-label` | | Optional release label for versioned specs and collections. Derived from git tag/branch when omitted. |
|
|
133
|
+
| `monitor-id` | | Existing smoke monitor ID. When set, the action validates and reuses this monitor instead of creating a new one. |
|
|
134
|
+
| `mock-url` | | Existing mock server URL. When set, the action validates and reuses this mock instead of creating a new one. |
|
|
135
|
+
| `monitor-cron` | `""` | Cron expression for monitor scheduling (e.g. `0 */6 * * *`). When empty, the monitor is created in a disabled state. |
|
|
136
|
+
| `generate-ci-workflow` | `true` | Pass through to repo sync; set `false` for repos that already manage CI. |
|
|
137
|
+
| `ci-workflow-path` | `.github/workflows/ci.yml` | Pass through to repo sync to redirect generated workflow output. |
|
|
138
|
+
| `project-name` | | Service name used across bootstrap and repo sync. |
|
|
139
|
+
| `domain` | | Business domain used for governance assignment. |
|
|
140
|
+
| `domain-code` | | Short prefix used in workspace naming. |
|
|
141
|
+
| `requester-email` | | Optional workspace invite target. |
|
|
142
|
+
| `workspace-admin-user-ids` | | Optional comma-separated workspace admin IDs. |
|
|
143
|
+
| `workspace-team-id` | | Numeric sub-team ID for org-mode workspace creation. |
|
|
144
|
+
| `spec-url` | | Required registry-backed OpenAPI document URL. |
|
|
145
|
+
| `environments-json` | `["prod"]` | Environment slugs to materialize downstream. |
|
|
146
|
+
| `system-env-map-json` | `{}` | Map of environment slug to system environment ID. |
|
|
147
|
+
| `governance-mapping-json` | `{}` | Map of domain to governance group name. |
|
|
148
|
+
| `env-runtime-urls-json` | `{}` | Map of environment slug to runtime base URL. |
|
|
149
|
+
| `postman-api-key` | | Required Postman API key for the bootstrap and sync phases. The composite always runs `postman-bootstrap-action`, which still requires a PMAK. |
|
|
150
|
+
| `postman-access-token` | | Enables governance assignment, Bifrost integration, and API key generation fallback. |
|
|
151
|
+
| `postman-team-id` | | Explicit Postman team ID override for org-mode Bifrost calls. Passed to the downstream actions when provided. |
|
|
152
|
+
| `github-token` | | Enables generated commits, workflow writes, and optional secret persistence in repo sync. |
|
|
153
|
+
| `gh-fallback-token` | | Optional fallback token for workflow and commit APIs. |
|
|
154
|
+
| `repo-write-mode` | `commit-and-push` | Repo mutation mode passed to repo sync. |
|
|
155
|
+
| `current-ref` | | Optional explicit ref override for detached checkouts. |
|
|
156
|
+
| `committer-name` | `Postman CSE` | Commit author name for generated sync commits. |
|
|
157
|
+
| `committer-email` | `help@postman.com` | Commit author email for generated sync commits. |
|
|
158
|
+
| `enable-insights` | `false` | When `true`, chains `postman-cs/postman-insights-onboarding-action@v0` after bootstrap and repo sync. |
|
|
159
|
+
| `cluster-name` | | Optional Insights cluster name passed to the downstream Insights onboarding step. |
|
|
160
|
+
| `integration-backend` | `bifrost` | Current public open-alpha backend. |
|
|
161
|
+
| `org-mode` | `false` | When `true`, includes `x-entity-team-id` header in Bifrost proxy calls. Non-org teams must omit this header. |
|
|
162
|
+
| `ssl-client-cert` | | Base64-encoded PEM client certificate for mTLS. Passed through to repo-sync for CI workflow SSL support. |
|
|
163
|
+
| `ssl-client-key` | | Base64-encoded PEM client private key. Passed through to repo-sync. |
|
|
164
|
+
| `ssl-client-passphrase` | | Passphrase for encrypted private key. Passed through to repo-sync. |
|
|
165
|
+
| `ssl-extra-ca-certs` | | Base64-encoded PEM additional CA certificates. Passed through to repo-sync. |
|
|
166
|
+
|
|
167
|
+
### Team ID derivation
|
|
168
|
+
|
|
169
|
+
Pass `postman-team-id` only when a downstream org-mode Bifrost call needs an explicit team header. When omitted, the lower-level actions can leave `x-entity-team-id` unset and let Bifrost resolve team context from the access token.
|
|
170
|
+
|
|
171
|
+
### API key auto-creation
|
|
172
|
+
|
|
173
|
+
`postman-repo-sync-action` and `postman-insights-onboarding-action` can create or rotate a PMAK from `postman-access-token` when they encounter a clear auth failure, but this composite still requires `postman-api-key` up front because `postman-bootstrap-action` cannot start without it.
|
|
174
|
+
|
|
175
|
+
### Org-mode Bifrost headers
|
|
176
|
+
|
|
177
|
+
The underlying actions include the `x-entity-team-id` header on Bifrost proxy calls only when an explicit team override is supplied. For non-org-mode tokens, omit `postman-team-id` so the header stays unset.
|
|
178
|
+
|
|
179
|
+
### Obtaining `postman-api-key`
|
|
180
|
+
|
|
181
|
+
The `postman-api-key` is a Postman API key (PMAK) used for all standard Postman API operations -- creating workspaces, uploading specs, generating collections, exporting artifacts, and managing environments.
|
|
182
|
+
|
|
183
|
+
**To generate one:**
|
|
184
|
+
|
|
185
|
+
1. Open the Postman desktop app or web UI.
|
|
186
|
+
2. Go to **Settings** (gear icon) > **Account Settings** > **API Keys**.
|
|
187
|
+
3. Click **Generate API Key**, give it a label, and copy the key (starts with `PMAK-`).
|
|
188
|
+
4. Set it as a GitHub secret:
|
|
189
|
+
```bash
|
|
190
|
+
gh secret set POSTMAN_API_KEY --repo <owner>/<repo>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
> **Note:** The PMAK is a long-lived key tied to your Postman account. It does not require periodic renewal like the `postman-access-token`.
|
|
194
|
+
|
|
195
|
+
### Obtaining `postman-access-token` (Open Alpha)
|
|
196
|
+
|
|
197
|
+
> **Open-alpha limitation:** The `postman-access-token` input requires a manually-extracted session token. There is currently no public API to exchange a Postman API key (PMAK) for an access token programmatically. This manual step will be eliminated before GA.
|
|
198
|
+
|
|
199
|
+
The `postman-access-token` is a Postman session token (`x-access-token`) required for internal API operations that the standard PMAK API key cannot perform -- specifically workspace-to-repo git sync (Bifrost), governance group assignment, and system environment associations. Without it, those steps are silently skipped during the onboarding pipeline.
|
|
200
|
+
|
|
201
|
+
**To obtain and configure the token:**
|
|
202
|
+
|
|
203
|
+
1. **Log in via the Postman CLI** (requires a browser):
|
|
204
|
+
```bash
|
|
205
|
+
postman login
|
|
206
|
+
```
|
|
207
|
+
This opens a browser window for Postman's PKCE OAuth flow. Complete the sign-in.
|
|
208
|
+
|
|
209
|
+
2. **Extract the access token** from the CLI credential store:
|
|
210
|
+
```bash
|
|
211
|
+
cat ~/.postman/postmanrc | jq -r '.login._profiles[].accessToken'
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
3. **Set it as a GitHub secret** on your repository or organization:
|
|
215
|
+
```bash
|
|
216
|
+
# Repository-level secret
|
|
217
|
+
gh secret set POSTMAN_ACCESS_TOKEN --repo <owner>/<repo>
|
|
218
|
+
|
|
219
|
+
# Organization-level secret (recommended for multi-repo use)
|
|
220
|
+
gh secret set POSTMAN_ACCESS_TOKEN --org <org> --visibility selected --repos <repo1>,<repo2>
|
|
221
|
+
```
|
|
222
|
+
Paste the token value when prompted.
|
|
223
|
+
|
|
224
|
+
> **Important:** This token is session-scoped and will expire. When it does, operations that depend on it (workspace linking, governance, system environment associations) will silently degrade. You will need to repeat the login and secret update process. There is no automated refresh mechanism.
|
|
225
|
+
|
|
226
|
+
> **Note:** `postman login --with-api-key` stores a PMAK -- **not** the session token these APIs require. You must use the interactive browser login.
|
|
227
|
+
|
|
228
|
+
## Output Mapping
|
|
229
|
+
|
|
230
|
+
The composite action wires:
|
|
231
|
+
|
|
232
|
+
- `workspace-id`, `workspace-url`, `spec-id`, and `collections-json` from `bootstrap`.
|
|
233
|
+
- `environment-uids-json`, `mock-url`, `monitor-id`, `repo-sync-summary-json`, and `commit-sha` from `repo_sync`.
|
|
234
|
+
- Existing-service passthrough inputs to `bootstrap`: `workspace-id`, `spec-id`, `baseline-collection-id`, `smoke-collection-id`, and `contract-collection-id`.
|
|
235
|
+
- Existing-repo passthrough inputs to `repo_sync`: `generate-ci-workflow` and `ci-workflow-path`.
|
|
236
|
+
- When `enable-insights: true`, the Insights onboarding step runs after repo sync using the workspace ID from bootstrap plus the first environment from `environments-json` for `environment-id` and `system-env-map-json` lookup.
|
|
237
|
+
- Insights outputs (`insights-status`, `insights-verification-token`, `insights-application-id`, `insights-discovered-service-id`, `insights-discovered-service-name`, `insights-collection-id`) are surfaced when `enable-insights: true`.
|
|
238
|
+
|
|
239
|
+
See [action.yml](action.yml) for exact step mappings.
|
|
240
|
+
|
|
241
|
+
## Local Development
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
npm install
|
|
245
|
+
npm test
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Open-Alpha Release Strategy
|
|
249
|
+
|
|
250
|
+
- Open-alpha channel tags use `v0.x.y`.
|
|
251
|
+
- Consumers can pin immutable tags such as `v0.2.0` for reproducibility.
|
|
252
|
+
- Moving tag `v0` is used only as the rolling open-alpha channel.
|
|
253
|
+
|
|
254
|
+
## REST Migration Seam
|
|
255
|
+
|
|
256
|
+
This composite interface is backend-neutral and only passes stable inputs and outputs between bootstrap and repo-sync. `integration-backend` defaults to `bifrost` now, and future REST migration should occur inside the lower-level actions without changing this composite contract.
|
|
257
|
+
|
|
258
|
+
Migration details are documented in [REST_MIGRATION_SEAM.md](REST_MIGRATION_SEAM.md).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# REST Migration Seam
|
|
2
|
+
|
|
3
|
+
This open-alpha suite uses `integration-backend=bifrost` by default, but callers should not need to change their workflow syntax when the backend moves to REST.
|
|
4
|
+
|
|
5
|
+
## Contract Invariants
|
|
6
|
+
|
|
7
|
+
These must stay stable across backend migration:
|
|
8
|
+
|
|
9
|
+
- Composite entrypoint: `postman-cs/postman-api-onboarding-action@v0`
|
|
10
|
+
- Input names and meanings in [action.yml](/Users/jaredboynton/__devlocal/postman-api-onboarding-action/action.yml)
|
|
11
|
+
- Output names and meanings in [action.yml](/Users/jaredboynton/__devlocal/postman-api-onboarding-action/action.yml)
|
|
12
|
+
- Bootstrap-to-repo-sync handoff fields:
|
|
13
|
+
- `workspace-id`
|
|
14
|
+
- `baseline-collection-id`
|
|
15
|
+
- `smoke-collection-id`
|
|
16
|
+
- `contract-collection-id`
|
|
17
|
+
|
|
18
|
+
## Implementation Boundaries
|
|
19
|
+
|
|
20
|
+
Backend replacement must be internal to:
|
|
21
|
+
|
|
22
|
+
- `postman-cs/postman-bootstrap-action@v0`
|
|
23
|
+
- `postman-cs/postman-repo-sync-action@v0`
|
|
24
|
+
|
|
25
|
+
The composite action should continue passing the same `with:` keys and surfacing the same outputs.
|
|
26
|
+
|
|
27
|
+
## Migration Plan
|
|
28
|
+
|
|
29
|
+
1. Add REST implementation behind `integration-backend=rest` in lower-level actions.
|
|
30
|
+
2. Keep `bifrost` and `rest` parity tests for shared inputs and outputs.
|
|
31
|
+
3. Switch composite default only after parity validation passes.
|
|
32
|
+
4. Keep existing `v0.x.y` tags immutable; publish default changes in a new immutable tag.
|
package/action.yml
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
name: postman-api-onboarding-action
|
|
2
|
+
description: Public open-alpha composite action that orchestrates Postman bootstrap and repo sync.
|
|
3
|
+
inputs:
|
|
4
|
+
|
|
5
|
+
workspace-id:
|
|
6
|
+
description: Existing Postman workspace ID.
|
|
7
|
+
required: false
|
|
8
|
+
spec-id:
|
|
9
|
+
description: Existing Postman spec ID.
|
|
10
|
+
required: false
|
|
11
|
+
baseline-collection-id:
|
|
12
|
+
description: Existing baseline collection ID.
|
|
13
|
+
required: false
|
|
14
|
+
smoke-collection-id:
|
|
15
|
+
description: Existing smoke collection ID.
|
|
16
|
+
required: false
|
|
17
|
+
contract-collection-id:
|
|
18
|
+
description: Existing contract collection ID.
|
|
19
|
+
required: false
|
|
20
|
+
collection-sync-mode:
|
|
21
|
+
description: Collection lifecycle policy (reuse, refresh, or version). Default refresh ensures collections stay in sync with the spec.
|
|
22
|
+
required: false
|
|
23
|
+
default: refresh
|
|
24
|
+
spec-sync-mode:
|
|
25
|
+
description: Spec lifecycle policy (update or version).
|
|
26
|
+
required: false
|
|
27
|
+
default: update
|
|
28
|
+
release-label:
|
|
29
|
+
description: Optional release label for versioned specs and collections. When omitted during versioned sync, derived from GitHub tag or branch metadata.
|
|
30
|
+
required: false
|
|
31
|
+
monitor-id:
|
|
32
|
+
description: Existing smoke monitor ID. When set, the action validates and reuses this monitor instead of creating a new one.
|
|
33
|
+
required: false
|
|
34
|
+
mock-url:
|
|
35
|
+
description: Existing mock server URL. When set, the action validates and reuses this mock instead of creating a new one.
|
|
36
|
+
required: false
|
|
37
|
+
monitor-cron:
|
|
38
|
+
description: Cron expression for monitor scheduling (e.g. '0 */6 * * *'). When empty, the monitor is created in a disabled state.
|
|
39
|
+
required: false
|
|
40
|
+
default: ""
|
|
41
|
+
generate-ci-workflow:
|
|
42
|
+
description: Whether to generate the CI workflow file.
|
|
43
|
+
required: false
|
|
44
|
+
default: "true"
|
|
45
|
+
ci-workflow-path:
|
|
46
|
+
description: Path to write the generated CI workflow file.
|
|
47
|
+
required: false
|
|
48
|
+
default: .github/workflows/ci.yml
|
|
49
|
+
project-name:
|
|
50
|
+
description: Service project name used across bootstrap and repo sync phases.
|
|
51
|
+
required: true
|
|
52
|
+
domain:
|
|
53
|
+
description: Business domain used for governance assignment.
|
|
54
|
+
required: false
|
|
55
|
+
domain-code:
|
|
56
|
+
description: Short domain code used in workspace naming.
|
|
57
|
+
required: false
|
|
58
|
+
requester-email:
|
|
59
|
+
description: Requester email used for workspace membership.
|
|
60
|
+
required: false
|
|
61
|
+
workspace-admin-user-ids:
|
|
62
|
+
description: Comma-separated workspace admin user ids.
|
|
63
|
+
required: false
|
|
64
|
+
spec-url:
|
|
65
|
+
description: URL to the OpenAPI document to bootstrap.
|
|
66
|
+
required: true
|
|
67
|
+
environments-json:
|
|
68
|
+
description: JSON array of environment slugs to materialize.
|
|
69
|
+
required: false
|
|
70
|
+
default: '["prod"]'
|
|
71
|
+
system-env-map-json:
|
|
72
|
+
description: JSON map of environment slug to system environment id.
|
|
73
|
+
required: false
|
|
74
|
+
default: '{}'
|
|
75
|
+
governance-mapping-json:
|
|
76
|
+
description: JSON map of business domain to governance group name.
|
|
77
|
+
required: false
|
|
78
|
+
default: '{}'
|
|
79
|
+
env-runtime-urls-json:
|
|
80
|
+
description: JSON map of environment slug to runtime base URL.
|
|
81
|
+
required: false
|
|
82
|
+
default: '{}'
|
|
83
|
+
postman-api-key:
|
|
84
|
+
description: Postman API key used for bootstrap and sync operations.
|
|
85
|
+
required: true
|
|
86
|
+
postman-access-token:
|
|
87
|
+
description: Postman access token used for Bifrost and governance integration.
|
|
88
|
+
required: false
|
|
89
|
+
postman-team-id:
|
|
90
|
+
description: Explicit Postman team ID override for org-mode Bifrost calls.
|
|
91
|
+
required: false
|
|
92
|
+
github-token:
|
|
93
|
+
description: GitHub token used for repo variables and generated commits.
|
|
94
|
+
required: false
|
|
95
|
+
gh-fallback-token:
|
|
96
|
+
description: Fallback GitHub token for variable and workflow-file APIs.
|
|
97
|
+
required: false
|
|
98
|
+
repo-write-mode:
|
|
99
|
+
description: Repo mutation mode for generated assets and workflow files.
|
|
100
|
+
required: false
|
|
101
|
+
default: commit-and-push
|
|
102
|
+
current-ref:
|
|
103
|
+
description: Explicit ref override for detached checkout push semantics.
|
|
104
|
+
required: false
|
|
105
|
+
committer-name:
|
|
106
|
+
description: Commit author name for generated sync commits.
|
|
107
|
+
required: false
|
|
108
|
+
default: Postman CSE
|
|
109
|
+
committer-email:
|
|
110
|
+
description: Commit author email for generated sync commits.
|
|
111
|
+
required: false
|
|
112
|
+
default: help@postman.com
|
|
113
|
+
enable-insights:
|
|
114
|
+
description: Whether to enable Postman Insights.
|
|
115
|
+
required: false
|
|
116
|
+
default: 'false'
|
|
117
|
+
cluster-name:
|
|
118
|
+
description: Insights cluster name passed to the downstream Insights onboarding step.
|
|
119
|
+
required: false
|
|
120
|
+
integration-backend:
|
|
121
|
+
description: Integration backend used to coordinate onboarding phases.
|
|
122
|
+
required: false
|
|
123
|
+
default: bifrost
|
|
124
|
+
org-mode:
|
|
125
|
+
description: Whether the Postman team uses org-mode. When true, x-entity-team-id header is included in Bifrost proxy calls. Non-org teams must omit this header.
|
|
126
|
+
required: false
|
|
127
|
+
default: 'false'
|
|
128
|
+
ssl-client-cert:
|
|
129
|
+
description: Base64-encoded PEM client certificate for mTLS. Passed through to repo-sync for CI workflow generation.
|
|
130
|
+
required: false
|
|
131
|
+
ssl-client-key:
|
|
132
|
+
description: Base64-encoded PEM client private key. Passed through to repo-sync.
|
|
133
|
+
required: false
|
|
134
|
+
ssl-client-passphrase:
|
|
135
|
+
description: Passphrase for encrypted private key. Passed through to repo-sync.
|
|
136
|
+
required: false
|
|
137
|
+
ssl-extra-ca-certs:
|
|
138
|
+
description: Base64-encoded PEM additional CA certificates. Passed through to repo-sync.
|
|
139
|
+
required: false
|
|
140
|
+
outputs:
|
|
141
|
+
integration-backend:
|
|
142
|
+
description: Resolved integration backend for the onboarding run.
|
|
143
|
+
value: ${{ inputs.integration-backend }}
|
|
144
|
+
workspace-id:
|
|
145
|
+
description: Postman workspace ID.
|
|
146
|
+
value: ${{ steps.bootstrap.outputs.workspace-id }}
|
|
147
|
+
workspace-url:
|
|
148
|
+
description: Postman workspace URL.
|
|
149
|
+
value: ${{ steps.bootstrap.outputs.workspace-url }}
|
|
150
|
+
spec-id:
|
|
151
|
+
description: Uploaded Postman spec ID.
|
|
152
|
+
value: ${{ steps.bootstrap.outputs.spec-id }}
|
|
153
|
+
collections-json:
|
|
154
|
+
description: JSON summary of generated collections.
|
|
155
|
+
value: ${{ steps.bootstrap.outputs.collections-json }}
|
|
156
|
+
environment-uids-json:
|
|
157
|
+
description: JSON map of environment slug to Postman environment uid.
|
|
158
|
+
value: ${{ steps.repo_sync.outputs.environment-uids-json }}
|
|
159
|
+
mock-url:
|
|
160
|
+
description: Mock server URL.
|
|
161
|
+
value: ${{ steps.repo_sync.outputs.mock-url }}
|
|
162
|
+
monitor-id:
|
|
163
|
+
description: Smoke monitor ID.
|
|
164
|
+
value: ${{ steps.repo_sync.outputs.monitor-id }}
|
|
165
|
+
repo-sync-summary-json:
|
|
166
|
+
description: JSON summary of repo materialization and workspace sync planning.
|
|
167
|
+
value: ${{ steps.repo_sync.outputs.repo-sync-summary-json }}
|
|
168
|
+
commit-sha:
|
|
169
|
+
description: Commit SHA produced by repo-write-mode.
|
|
170
|
+
value: ${{ steps.repo_sync.outputs.commit-sha }}
|
|
171
|
+
insights-status:
|
|
172
|
+
description: Insights onboarding status (success, not-found, error, or empty if insights disabled).
|
|
173
|
+
value: ${{ steps.insights_onboarding.outputs.status }}
|
|
174
|
+
insights-verification-token:
|
|
175
|
+
description: Team verification token for Insights DaemonSet configuration.
|
|
176
|
+
value: ${{ steps.insights_onboarding.outputs.verification-token }}
|
|
177
|
+
insights-application-id:
|
|
178
|
+
description: Insights application binding ID.
|
|
179
|
+
value: ${{ steps.insights_onboarding.outputs.application-id }}
|
|
180
|
+
insights-discovered-service-id:
|
|
181
|
+
description: Discovered service ID from Insights agent.
|
|
182
|
+
value: ${{ steps.insights_onboarding.outputs.discovered-service-id }}
|
|
183
|
+
insights-discovered-service-name:
|
|
184
|
+
description: Discovered service name from Insights agent.
|
|
185
|
+
value: ${{ steps.insights_onboarding.outputs.discovered-service-name }}
|
|
186
|
+
insights-collection-id:
|
|
187
|
+
description: Insights API Catalog collection ID.
|
|
188
|
+
value: ${{ steps.insights_onboarding.outputs.collection-id }}
|
|
189
|
+
runs:
|
|
190
|
+
using: composite
|
|
191
|
+
steps:
|
|
192
|
+
- id: bootstrap
|
|
193
|
+
name: Bootstrap Postman Assets
|
|
194
|
+
uses: postman-cs/postman-bootstrap-action@v0
|
|
195
|
+
env:
|
|
196
|
+
POSTMAN_TEAM_ID: ${{ inputs.postman-team-id }}
|
|
197
|
+
with:
|
|
198
|
+
project-name: ${{ inputs.project-name }}
|
|
199
|
+
workspace-id: ${{ inputs.workspace-id }}
|
|
200
|
+
spec-id: ${{ inputs.spec-id }}
|
|
201
|
+
baseline-collection-id: ${{ inputs.baseline-collection-id }}
|
|
202
|
+
smoke-collection-id: ${{ inputs.smoke-collection-id }}
|
|
203
|
+
contract-collection-id: ${{ inputs.contract-collection-id }}
|
|
204
|
+
collection-sync-mode: ${{ inputs.collection-sync-mode }}
|
|
205
|
+
spec-sync-mode: ${{ inputs.spec-sync-mode }}
|
|
206
|
+
release-label: ${{ inputs.release-label }}
|
|
207
|
+
domain: ${{ inputs.domain }}
|
|
208
|
+
domain-code: ${{ inputs.domain-code }}
|
|
209
|
+
requester-email: ${{ inputs.requester-email }}
|
|
210
|
+
workspace-admin-user-ids: ${{ inputs.workspace-admin-user-ids }}
|
|
211
|
+
spec-url: ${{ inputs.spec-url }}
|
|
212
|
+
governance-mapping-json: ${{ inputs.governance-mapping-json }}
|
|
213
|
+
postman-api-key: ${{ inputs.postman-api-key }}
|
|
214
|
+
postman-access-token: ${{ inputs.postman-access-token }}
|
|
215
|
+
integration-backend: ${{ inputs.integration-backend }}
|
|
216
|
+
- id: repo_sync
|
|
217
|
+
name: Sync Repository and Workspace
|
|
218
|
+
uses: postman-cs/postman-repo-sync-action@v0
|
|
219
|
+
env:
|
|
220
|
+
POSTMAN_TEAM_ID: ${{ inputs.postman-team-id }}
|
|
221
|
+
with:
|
|
222
|
+
project-name: ${{ inputs.project-name }}
|
|
223
|
+
workspace-id: ${{ steps.bootstrap.outputs.workspace-id }}
|
|
224
|
+
baseline-collection-id: ${{ steps.bootstrap.outputs.baseline-collection-id }}
|
|
225
|
+
smoke-collection-id: ${{ steps.bootstrap.outputs.smoke-collection-id }}
|
|
226
|
+
contract-collection-id: ${{ steps.bootstrap.outputs.contract-collection-id }}
|
|
227
|
+
collection-sync-mode: ${{ inputs.collection-sync-mode }}
|
|
228
|
+
spec-sync-mode: ${{ inputs.spec-sync-mode }}
|
|
229
|
+
release-label: ${{ inputs.release-label }}
|
|
230
|
+
generate-ci-workflow: ${{ inputs.generate-ci-workflow }}
|
|
231
|
+
ci-workflow-path: ${{ inputs.ci-workflow-path }}
|
|
232
|
+
environments-json: ${{ inputs.environments-json }}
|
|
233
|
+
system-env-map-json: ${{ inputs.system-env-map-json }}
|
|
234
|
+
environment-uids-json: '{}'
|
|
235
|
+
env-runtime-urls-json: ${{ inputs.env-runtime-urls-json }}
|
|
236
|
+
repo-write-mode: ${{ inputs.repo-write-mode }}
|
|
237
|
+
current-ref: ${{ inputs.current-ref }}
|
|
238
|
+
committer-name: ${{ inputs.committer-name }}
|
|
239
|
+
committer-email: ${{ inputs.committer-email }}
|
|
240
|
+
postman-api-key: ${{ inputs.postman-api-key }}
|
|
241
|
+
postman-access-token: ${{ inputs.postman-access-token }}
|
|
242
|
+
github-token: ${{ inputs.github-token }}
|
|
243
|
+
gh-fallback-token: ${{ inputs.gh-fallback-token }}
|
|
244
|
+
org-mode: ${{ inputs.org-mode }}
|
|
245
|
+
integration-backend: ${{ inputs.integration-backend }}
|
|
246
|
+
monitor-id: ${{ inputs.monitor-id }}
|
|
247
|
+
mock-url: ${{ inputs.mock-url }}
|
|
248
|
+
monitor-cron: ${{ inputs.monitor-cron }}
|
|
249
|
+
ssl-client-cert: ${{ inputs.ssl-client-cert }}
|
|
250
|
+
ssl-client-key: ${{ inputs.ssl-client-key }}
|
|
251
|
+
ssl-client-passphrase: ${{ inputs.ssl-client-passphrase }}
|
|
252
|
+
ssl-extra-ca-certs: ${{ inputs.ssl-extra-ca-certs }}
|
|
253
|
+
spec-id: ${{ steps.bootstrap.outputs.spec-id }}
|
|
254
|
+
- id: insights_onboarding
|
|
255
|
+
if: inputs.enable-insights == 'true'
|
|
256
|
+
name: Onboard Postman Insights
|
|
257
|
+
uses: postman-cs/postman-insights-onboarding-action@v0
|
|
258
|
+
env:
|
|
259
|
+
POSTMAN_TEAM_ID: ${{ inputs.postman-team-id }}
|
|
260
|
+
with:
|
|
261
|
+
project-name: ${{ inputs.project-name }}
|
|
262
|
+
workspace-id: ${{ steps.bootstrap.outputs.workspace-id }}
|
|
263
|
+
environment-id: ${{ fromJSON(steps.repo_sync.outputs.environment-uids-json)[fromJSON(inputs.environments-json)[0]] }}
|
|
264
|
+
system-environment-id: ${{ fromJSON(inputs.system-env-map-json)[fromJSON(inputs.environments-json)[0]] }}
|
|
265
|
+
cluster-name: ${{ inputs.cluster-name }}
|
|
266
|
+
postman-api-key: ${{ inputs.postman-api-key }}
|
|
267
|
+
postman-access-token: ${{ inputs.postman-access-token }}
|
|
268
|
+
postman-team-id: ${{ inputs.postman-team-id }}
|
|
269
|
+
github-token: ${{ inputs.github-token }}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@postman-cse/onboarding-api",
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "Public open-alpha composite Postman API onboarding GitHub Action.",
|
|
5
|
+
"files": [
|
|
6
|
+
"action.yml",
|
|
7
|
+
"README.md",
|
|
8
|
+
"REST_MIGRATION_SEAM.md"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"github-action",
|
|
19
|
+
"postman"
|
|
20
|
+
],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^25.3.5",
|
|
24
|
+
"typescript": "^5.9.3",
|
|
25
|
+
"yaml": "^2.8.2",
|
|
26
|
+
"vitest": "^4.0.18"
|
|
27
|
+
}
|
|
28
|
+
}
|