This is the ASP.NET Core port of the Python sample (https://github.com/autodesk-platform-services/aps-dx-graphql-workflow-python) — the same visual dataflow editor using the APS Data Exchange GraphQL API, written as learning material with explicit structure and comments rather than minimal code.
The frontend (wwwroot/) is shared with the Python sample. The backend is reorganized into familiar ASP.NET Core layers: controllers, services, configuration, and node metadata.
For project layout, how to read the code, and node types, see other_info.md.
- .NET SDK — this sample targets .NET 9 (
net9.0), matching aps-medm-explorer for Dokku compatibility. - APS account — create an app with callback URL
http://localhost:8080/api/auth/callback.
Data Exchange calls require a 3-legged token. Sign in through the browser; the session stores the token for all /api/dx/* routes.
Edit appsettings.Development.json (same format as aps-medm-explorer):
{
"APS_CLIENT_ID": "YOUR_APS_CLIENT_ID",
"APS_CLIENT_SECRET": "YOUR_APS_CLIENT_SECRET",
"APS_CALLBACK_URL": "http://localhost:8080/api/auth/callback",
"AppSettings": {
"AppUrl": "http://localhost:8080"
}
}You can also use environment variables: APS_CLIENT_ID, APS_CLIENT_SECRET, APS_CALLBACK_URL, or the nested Aps__ClientId style.
dotnet restore
dotnet runVisit http://localhost:8080/. The landing page shows Sign In with Autodesk until you have a session; once signed in, the flow editor opens at /.
Preset reference workflows ship under data/flows/ (same JSON as the Python sample).
This repo follows the same flat layout as aps-medm-explorer: a single .csproj at the repository root so the Autodesk Dokku .NET buildpack can detect and publish the app.
Set these config vars in Dokku Admin (or your platform's env settings):
| Variable | Example |
|---|---|
APS_CLIENT_ID |
your APS client id |
APS_CLIENT_SECRET |
your APS client secret |
APS_CALLBACK_URL |
https://your-app.example.com/api/auth/callback |
Aps__BehindProxy |
true |
Aps__SessionCookieSecure |
true |
FlowStorage__FlowsDirectory |
/app/data/flows (optional; defaults to data/flows relative to app root) |
Nested Aps__ClientId / Aps__ClientSecret / Aps__RedirectUri env vars also work if you prefer that style.
Register the same callback URL in your APS app settings. Do not commit secrets — use platform config vars only.
If Autodesk shows a request-error page after clicking Sign In:
- Register the production callback in APS My Apps — it must match exactly:
https://<your-dokku-domain>/api/auth/callback - Set credentials in Dokku Admin (Production does not use local-only env files unless deployed):
APS_CLIENT_IDAPS_CLIENT_SECRET- Optional:
APS_CALLBACK_URLif auto-detection is not used
- Check Dokku logs for
Starting APS OAuth login with redirect_uri=...— that value must match your APS app callback list.
| Python | .NET |
|---|---|
run.py + backend/__init__.py |
Program.cs |
config.py |
Configuration/ApsOptions.cs + appsettings*.json |
backend/routes/auth_routes.py |
Controllers/OAuthController.cs |
backend/routes/dx_routes.py |
Controllers/DxController.cs + Services/DxApiService.cs |
backend/routes/flow_routes.py |
Controllers/FlowsController.cs |
backend/services/*.py |
Services/*.cs |
backend/nodes/*.py |
Nodes/NodeRegistry.cs |
frontend/templates/*.html |
Views/Home/*.cshtml |
frontend/static/ |
wwwroot/ |
The toolbar Export as C# code button calls POST /api/flows/export-script and downloads a standalone script generated by Services/FlowCodegenService.cs — the .NET equivalent of the Python sample's flow_codegen.py.
- Access tokens are not auto-refreshed; sessions expire after ~1 hour.
- The exported C# script includes helper stubs — expand them for full headless parity (the web app itself is fully functional).
MIT — see LICENSE if present in the parent repo.