-
Notifications
You must be signed in to change notification settings - Fork 3
Experiments controller
Petr Štechmüller edited this page Aug 28, 2020
·
2 revisions
The Experiment's base access point has address: '/api/experiments'
- Description: retrieves all available experiments for one user
- Method: GET
- Access point: /
- Authentication: NOT REQUIRED
- Return value:
Experiment[]
- Error codes: -
- Description: check if the entered name exists or not
- Method: GET
- Access point: /name-exists/:name/:id
- Parameters:
- name: name of an experiment
- id: optional parameter; can contain
ID of an experiment
or valuenew
- Authentication: NOT REQUIRED
- Return value:
ResponseObject<{ exists: boolean }>
- Error codes: -
- Description: retrieves all used multimedia for selected experiment
- Method: GET
- Access point: /multimedia/:id
- Parameters:
- id:
ID of an experiment
- id:
- Authentication: REQUIRED
- Return value:
ResponseObject<{ audio: {}; image: {} }>
- Error codes:
- 10300 - experiment ID not found
- Description: validate selected experiment
- Method: GET
- Access point: /validate
- Authentication: NOT REQUIRED
- Return value:
ResponseObject<boolean>
- Error codes:
- Description: retrieves all sequences for selected experiment ID
- Method: GET
- Access point: sequences-for-experiment/:id
- Parameters:
- id:
ID of an experiment
- id:
- Authentication: REQUIRED
- Return value:
ResponseObject<Sequence[]>
- Error codes: -
- Description: creates new sequence based on experiment
- Method: GET
- Access point: sequence-from-experiment/:id/:name/:size
- Parameters:
- id:
ID of an experiment
- name:
name of new sequence
- size:
size of new sequence
- id:
- Authentication: REQUIRED
- Return value:
ResponseObject<Sequence>
- Error codes:
- 10300 - experiment ID not found
- 30300 - sequence ID not found
- 30301 - sequence was not created
- 30305 - experiment does not support sequences
- Description: retrieves experiment by ID
- Method: GET
- Access point: /:id
- Parameters:
- id:
ID of an experiment
- id:
- Authentication: NOT REQUIRED
- Return value:
ResponseObject<Experiment>
- Error codes:
- 10300 - experiment ID not found
- Description: creates new experiment
- Method: POST
- Access point: /
- Body:
Experiment
- Authentication: REQUIRED
- Return value:
ResponseObject<Experiment>
- Error codes:
- 10301 - experiment was not created
- 10304 - experiment is not valid
- Description: updates existing experiment
- Method: PATCH
- Access point: /
- Body:
Experiment
- Authentication: REQUIRED
- Return value:
ResponseObject<Experiment>
- Error codes:
- 10300 - experiment ID not found
- 10302 - experiment is not updated
- 10304 - experiment is not valid
- Description: delete selected experiment
- Method: DELETE
- Access point: /:id
- Parameters:
- id:
ID of an experiment
- id:
- Authentication: REQUIRED
- Return value:
ResponseObject<Experiment>
- Error codes:
- 10300 - experiment ID not found
- 10303 - experiment was not deleted