-
Notifications
You must be signed in to change notification settings - Fork 0
Stimuli Timeline Control API
POST /api/session/recording/timeline/continue
Forces continue to the next step in the timeline, if there is an active recording. If no recording is open or running, it is ignored. If the current step before attempting continue is last in the timeline, this call will finish the recording.
- Parameters: None.
- Body: None.
Empty.
Session recording is running and was started from the example session definition.
To show effects of requesting continue, we use calls to Session Control - Get current recording details, note the change in the currentStep
property.
$ curl -X GET http://localhost:55555/api/session/recording/
{
"id": "2018-03-31T04_03_11",
"state": "Running",
"startedAt": "2018-03-31T04:03:13.2172596",
"isFinished": false,
"currentStep": "LaunchProgram",
"definition": { /* Session Definition object */ }
}
$ curl -X POST \
--data '' \
http://localhost:55555/api/session/recording/timeline/continue
$ curl -X GET http://localhost:55555/api/session/recording/
{
"id": "2018-03-31T04_03_11",
"state": "Running",
"startedAt": "2018-03-31T04:03:13.2172596",
"isFinished": false,
"currentStep": "Questionary",
"definition": { /* Session Definition object */ }
}
POST /api/session/recording/timeline/continue/step
Injects new step to the stimuli timeline and advances to it. The new step is passed in the request body and has the same structure as steps defined in the StepDefinition objects. If no recording is open or running, it is ignored.
- Parameters: None.
- Body: StepDefinition JSON object.
Empty.
Session recording is running and was started from the example session definition.
To show effects of injecting new step, we use calls to Session Control - Get current recording details, note the change in the currentStep
property.
$ curl -X GET http://localhost:55555/api/session/recording/
{
"id": "2018-03-31T04_03_11",
"state": "Running",
"startedAt": "2018-03-31T04:03:13.2172596",
"isFinished": false,
"currentStep": "LaunchProgram",
"definition": { /* Session Definition object */ }
}
$ curl -X POST \
-h 'Content-Type: application/json' \
--data '{ \
"action": \
{ \
"actionType": "Instructions", \
"instructions": "Answer questions about your personality on the next website." \
}, \
"completion": \
{ \
"duration": "00:00:15" \
} \
}' \
http://localhost:55555/api/session/recording/timeline/step
$ curl -X GET http://localhost:55555/api/session/recording/
{
"id": "2018-03-31T04_03_11",
"state": "Running",
"startedAt": "2018-03-31T04:03:13.2172596",
"isFinished": false,
"currentStep": "Instructions",
"definition": { /* Session Definition object */ }
}
- Home
- Usage Examples
- User Manual
- API Reference
- Installation Manual
- Contributing
- Project Documentation