Loading...
Loading...
Use when creating, modifying, or removing API endpoints on a Datex Studio branch. Covers the full lifecycle: requirements, prerequisite creation (datasources, flows), endpoint wiring, and verification. Trigger for: "create an endpoint", "expose this flow as an API", "add an API for X", "modify endpoint", "remove endpoint", "change endpoint alias", "create an API that does X".
npx skill4agent add datex/skills endpoint-creatordxs endpointrequirements-gatheringfunction-creatordatasource-creator[Phase 1: Setup + Validation]
Follow branch-setup.md for branch selection
|
dxs source branch show <id> → check isApiApplication
|
+-----+-----+
| |
YES NO → error: "Endpoints only supported for API Applications"
|
[requirements brief in context?]
+-----+-----+
| |
YES NO → invoke requirements-gathering skill
| |
+-----+------+
|
[Phase 2: Intent Detection]
|
+-----+-----+-----+
| | |
ADD MODIFY REMOVE
| | |
| | ⚠ warn: "Removing may break external consumers"
| | get user confirmation
| | dxs endpoint remove --alias <x> --branch <id>
| | → Phase 5
| |
| dxs endpoint get --alias <x> --branch <id>
| determine changes needed
| ⚠ warn if contract change (alias, target, params)
| get user confirmation
| dxs endpoint update ... --branch <id>
| → Phase 5
|
[Phase 3: Target Resolution]
For each endpoint to add:
[does target flow/datasource exist on branch?]
+-----+-----+
| |
YES NO
| |
use it [ask user: flow or datasource?]
| +-----+-----+
| | |
| FLOW DATASOURCE
| | |
| invoke invoke
| function- datasource-
| creator creator
| | |
+-----------+-----------+
|
[Phase 4: Endpoint Wiring]
dxs endpoint add --alias <x> --flow/--datasource <target> -d "<desc>" --branch <id>
|
[Phase 5: Verification]
Build change summary from actions taken
Verify each added/modified endpoint with dxs endpoint get
Present focused changelog to userdxs source branch show <id>isApiApplicationrequirements-gathering"Changing/removing this endpoint may break external consumers who depend on it. Proceed?"
dxs function list --branch <id>dxs datasource list --branch <id>function-creatordatasource-creatordxs endpoint add --alias <alias> --flow/--datasource <ref_name> \
--description "<desc>" --branch <id>dxs endpoint update --alias <alias> [--new-alias/--flow/--datasource/-d/--module] \
--branch <id>dxs endpoint remove --alias <alias> --branch <id>Endpoint changes applied:
- Added: "orders" → flow get_orders_flow ("Get orders")
- Added: "materials" → datasource ds_materials ("Materials lookup")
- Renamed: "old-name" → "new-name"
- Removed: "deprecated-endpoint"dxs endpoint get --alias <alias> --branch <id>^[a-zA-Z0-9]+(?:[/\-_~]*[a-zA-Z0-9]+)*$/-_~appsettings$treeshakelog| Mistake | Fix |
|---|---|
| Trying to add endpoints on a non-API application | Check |
| Alias with spaces or special characters | Must match the alias regex pattern |
Using reserved aliases ( | Choose a different alias |
| Modifying/removing without warning about external consumers | Always present contract change warning and get user confirmation |
| Referencing a flow/datasource that doesn't exist on branch | Verify existence in Phase 3; create via the appropriate skill if missing |
| Skipping requirements and guessing endpoint structure | Always ensure requirements are gathered first |
| Adding endpoints to wrong branch | Confirm branch with user in Phase 1 via branch-setup.md |