API
The extension provides an API which you can use to control the extension.
You can enable the API by setting the demoTime.api.enabled
setting to true
.
Once the API is enabled, it will run on the port defined in the demoTime.api.port
setting.
API URL: http://localhost:3710/api/next
Once enabled, it shows the API and its port number in the status bar of Visual Studio Code.
API endpoints
/api/next
This endpoint will execute the next step in the demo.
- Method:
GET
- Query parameters:
bringToFront
: Bring the Visual Studio Code window to the front. Default isfalse
.
/api/runById
This endpoint will execute a specific step by its ID in your demo.
You can call this endpoint via a GET
or POST
request.
GET request
- Method:
GET
- Query parameters:
id
: The ID of the step you want tobringToFront
: Bring the Visual Studio Code window to the front. Default isfalse
.
POST request
-
Method:
POST
-
Body:
-
Headers:
Content-Type: application/json