René's URL Explorer Experiment


Title: feat(api): add workflow export and import endpoints to the public v1 API by waleedlatif1 · Pull Request #5999 · simstudioai/sim · GitHub

Open Graph Title: feat(api): add workflow export and import endpoints to the public v1 API by waleedlatif1 · Pull Request #5999 · simstudioai/sim

X Title: feat(api): add workflow export and import endpoints to the public v1 API by waleedlatif1 · Pull Request #5999 · simstudioai/sim

Description: Summary Add GET /api/v1/workflows/{id}/export — returns a portable JSON envelope (version, exportedAt, workflow, state) matching the admin export's shape Add POST /api/v1/workflows/import — accepts that envelope verbatim, a bare workflow state, or a JSON string of either, so workflows round-trip across workspaces over the public API The admin namespace already had both halves; the public v1 surface had neither Public export is secret-sanitized (sanitizeForExport): stored credentials and password: true fields are redacted, {{ENV_VAR}} references and block positions preserved. Admin export stays raw for backup/restore Import regenerates block/edge/loop/parallel ids and de-duplicates the name against the target folder, so the same payload can be imported repeatedly and alongside its source Export requires read, import requires write on the workspace. Export masks permission failures as 404 to match the rest of the v1 workflow read surface. Import authorizes before parsing any payload Import body capped at 10 MB (well under the platform-wide 50 MB default) Export records a workflow.exported audit entry; import inherits workflow.created from the shared orchestrator Document both in apps/docs/openapi.json + the workflows nav, with new WorkflowExport, WorkflowExportState and ImportedWorkflow schemas Move parseWorkflowVariables from app/api/v1/admin/types.ts to lib/workflows/variables/parse.ts so a public route doesn't import from the admin namespace (4 admin consumers repointed) Type of Change New feature Testing 26 new tests (8 export, 18 import); 50 pass across app/api/v1/workflows/. Covers auth, permission masking, secret redaction, env-var preservation, edge-handle normalization, all three accepted payload shapes, metadata precedence, legacy array-form variables, and rollback of the created row when persisting state fails. bunx tsc --noEmit, bun run lint, bun run check:api-validation:strict and the monorepo boundary check all pass. Not exercised against a live server. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Add GET /api/v1/workflows/{id}/export — returns a portable JSON envelope (version, exportedAt, workflow, state) matching the admin export's shape Add POST /api/v1/workflows/import — ac...

X Description: Summary Add GET /api/v1/workflows/{id}/export — returns a portable JSON envelope (version, exportedAt, workflow, state) matching the admin export's shape Add POST /api/v1/workflows/import ...

Opengraph URL: https://github.com/simstudioai/sim/pull/5999

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f5ff71f5-7ae6-0fd0-e0b4-d9372998e96a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA128:19FA2E:632AB4:8D99CD:6AFB44AA
html-safe-nonce55dcb4b6bc7ace8b0f6b29a4f31ada0fa75aa79ad044f0e95bf651dab80750f4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTI4OjE5RkEyRTo2MzJBQjQ6OEQ5OUNEOjZBRkI0NEFBIiwidmlzaXRvcl9pZCI6Ijg1NjYwNTc4OTk5MzM3NzkxMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2f3823d8b9a66aab82d3de1c6b4b24c736767395fc1e252e0ae9d89462cdab2b
hovercard-subject-tagpull_request:4147762146
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5999/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Add GET /api/v1/workflows/{id}/export — returns a portable JSON envelope (version, exportedAt, workflow, state) matching the admin export's shape Add POST /api/v1/workflows/import — ac...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5999/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5999%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5999%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/5999/files
Reloadhttps://github.com/simstudioai/sim/pull/5999/files
Reloadhttps://github.com/simstudioai/sim/pull/5999/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
worktree-workflow-import-apihttps://github.com/simstudioai/sim/tree/worktree-workflow-import-api
Conversation 17 https://github.com/simstudioai/sim/pull/5999
Commits 4 https://github.com/simstudioai/sim/pull/5999/commits
Checks 19 https://github.com/simstudioai/sim/pull/5999/checks
Files changed https://github.com/simstudioai/sim/pull/5999/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5999/files
feat(api): add workflow export and import endpoints to the public v1 API https://github.com/simstudioai/sim/pull/5999/files#top
Show all changes 4 commits https://github.com/simstudioai/sim/pull/5999/files
6266b52 feat(api): add workflow export and import endpoints to the public v1 API waleedlatif1 Jul 28, 2026 https://github.com/simstudioai/sim/pull/5999/commits/6266b527550499676a9d530eb6596a66de3db22f
5decc01 fix(api): make workflow import atomic and clarify what export redacts waleedlatif1 Jul 28, 2026 https://github.com/simstudioai/sim/pull/5999/commits/5decc016658e1485bd3740b6bd20fe9798d02afa
fd21368 fix(api): close import defects found in audit and share one write pip… waleedlatif1 Jul 28, 2026 https://github.com/simstudioai/sim/pull/5999/commits/fd2136834612e7281b8e5ed49b311e8bb2a6a36b
a6d6213 fix(api): cap import names inside the bound and align the three impor… waleedlatif1 Jul 28, 2026 https://github.com/simstudioai/sim/pull/5999/commits/a6d6213c7dad2d7dd7dd7f067769aaed5078ffe6
Clear filters https://github.com/simstudioai/sim/pull/5999/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5999/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5999/files
meta.json https://github.com/simstudioai/sim/pull/5999/files#diff-b02c71e7439c0f2c2419b3cb9c9cd3b40dcb970913cb32029b49c37016881ee5
openapi.json https://github.com/simstudioai/sim/pull/5999/files#diff-612205ed5fc9b224d33e1a4f77c1bedab051de4574c7b2a8b183cc3c6fa26db7
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-09f9d7673e722ba21db44dc7984798dfd956963846b08f802627cdca94ce010a
types.ts https://github.com/simstudioai/sim/pull/5999/files#diff-eb0285bb823ac6a7bd841cafdb38ddebd4edb3012056cd5864d4155401cdec57
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-d0c82d6a94e1b71d6971bc444de4fdf48913823423d03d98b2c57548823c6ddf
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-e6f873cce10211e8f63d3f370e3220b727c7c9f1046d4a5d6a174bc1d5824f52
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-8c57d9b539b2e0da99ad6ddf7d4d61d861d837718c49c8d9f9a84dcd555a008a
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-5e917d8b5b73f16730d5f94d6bc5d688fc7f5d12f35d979cd3866e22c6c898d7
middleware.ts https://github.com/simstudioai/sim/pull/5999/files#diff-92f74d9ee4f123e429cd83a651c51fe276952d40ddd7fea7b0cb32bc48593ffe
route.test.ts https://github.com/simstudioai/sim/pull/5999/files#diff-11b9d817d46bc2214b2a74cb8a6c96a6e4eef0b31777ccc88a54128ebef30743
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-ef6d102ed6cac4bd921353d5c560fa3dc08d282c35065d69eed7be7575374ad7
route.test.ts https://github.com/simstudioai/sim/pull/5999/files#diff-d2b547da44496e2d0d9bc1008645faf06005ab320c6bf6c2861567f8d4b50f04
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-6598f786eab725acd0a2d6c0f81ad5211fcf8cd0241b3221926ca74cc31ec383
route.ts https://github.com/simstudioai/sim/pull/5999/files#diff-02edd07cfcdbb2e33ff4eb2e70d731cce10bf45f328e7b4ac18c5b2810127729
workflows.ts https://github.com/simstudioai/sim/pull/5999/files#diff-55d88f594331d4645bddc0ff84cd0cf12b0dffca8d5eee49d95bab9028244f67
import-export-roundtrip.test.ts https://github.com/simstudioai/sim/pull/5999/files#diff-d1e1d935e3afc109f626a04b84065103f5e30608080481da7fcdc6da186a7bee
prepare-state.test.ts https://github.com/simstudioai/sim/pull/5999/files#diff-8bba28535d2b8ef444c1edf1e5fe6183457aa9416578955ee4829d2a55be1c1e
prepare-state.ts https://github.com/simstudioai/sim/pull/5999/files#diff-f056a30f439e1a3475f1ac6f8c309ec982dbe389082c5e0331dce2c03b52f18a
parse.ts https://github.com/simstudioai/sim/pull/5999/files#diff-f5f322a14bf578426455110f3fca10afe686caebe0de39b74e93827cd674b858
utils.ts https://github.com/simstudioai/sim/pull/5999/files#diff-d1cd03664e0b4816b0dbace375aadec19b14d1efec9647648b0f4df3d19a17a8
check-api-validation-contracts.ts https://github.com/simstudioai/sim/pull/5999/files#diff-48ae6a4d0c1f820d5b644522d25742bb29af758bc8350f1a3cf3f8afa0bd00b0
apps/docs/content/docs/en/api-reference/(generated)/workflows/meta.jsonhttps://github.com/simstudioai/sim/pull/5999/files#diff-b02c71e7439c0f2c2419b3cb9c9cd3b40dcb970913cb32029b49c37016881ee5
View file https://github.com/simstudioai/sim/blob/a6d6213c7dad2d7dd7dd7f067769aaed5078ffe6/apps/docs/content/docs/en/api-reference/(generated)/workflows/meta.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5999/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5999/files#diff-b02c71e7439c0f2c2419b3cb9c9cd3b40dcb970913cb32029b49c37016881ee5
https://github.com/simstudioai/sim/pull/5999/files#diff-b02c71e7439c0f2c2419b3cb9c9cd3b40dcb970913cb32029b49c37016881ee5
Please reload this pagehttps://github.com/simstudioai/sim/pull/5999/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5999/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.