ChaiPCR API Reference
A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
API Endpoint
http://chaipcr.readme.io/api
Terms of Service: http://helloreverb.com/terms/
Request Content-Types: application/json
Response Content-Types: application/json
Version: 1.0.0
Authentication
access_token
An authorization token is required to be passed for all api calls
Device
Device information
Returns device specific information
Object containing device information
Response Content-Types: application/json
Response Example (200 OK)
{
"serial_number": "string",
"model_number": "string",
"processor_architecture": "string",
"software": {
"version": "string",
"platform": "string"
}
}
Device capabilities information
Returns device capabilities
Object containing device capabilities information
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"capabilities": {
"plate": {
"rows": "integer",
"columns": "integer",
"min_volume_ul": "integer",
"max_volume_ul": "integer"
},
"optics": {
"excitation_channels": [
{
"begin_wavelength": "integer",
"end_wavelength": "integer"
}
],
"emission_channels": [
{
"begin_wavelength": "integer",
"end_wavelength": "integer"
}
]
},
"storage": {
"microsd_size_gb": "integer",
"emmc_size_gb": "integer"
},
"thermal": {
"lid": {
"max_temp_c": "integer"
},
"block": {
"min_temp_c": "integer",
"max_temp_c": "integer"
}
}
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Start Device
start device
Request Example
{
"experiment_id": "integer (int64)"
}
The experiment is started
Not authorized
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Stop Device
stop device
The current running experiment is stopped
Not authorized
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Resume Device
resume device
The current paused experiment is resumed
Not authorized
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Device Status
Returns the current status of the device
Object containing device status information
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"experiment_controller": {
"machine": {
"state": "string",
"thermal_state": "string"
}
},
"heat_block": {
"zone1": {
"temperature": "float",
"target_temperature": "float",
"drive": "float"
},
"zone2": {
"temperature": "float",
"target_temperature": "float",
"drive": "float"
},
"temperature": "float"
},
"lid": {
"temperature": "float",
"target_temperature": "float",
"drive": "float"
},
"optics": {
"intensity": "integer",
"collect_data": "boolean",
"lid_open": "boolean",
"well_number": "integer",
"photodiode_value": [
"string"
]
},
"heat_sink": {
"temperature": "float",
"fan_drive": "float"
},
"device": {
"update_available": "string"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Export database
Downloads the current database on the machine to exportdb.zip
Downloaded database
Not authorized
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Experiments
List all Experiments
Returns all experiments from the system sorted by the id
filter by type
Object containing list of all the experiments
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
[
{
"experiment": {
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string"
}
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Create Experiment
Creates a new experiment, default protocol will be created
Request Example
{
"experiment": {
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"guid": "string",
"protocol": {
"lid_temperature": "number (float)",
"stages": [
{
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"steps": [
{
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"ramp": {
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
]
}
}
}
Created experiment is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"experiment": {
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string",
"protocol": {
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)",
"stages": [
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
]
},
"errors": [
"string"
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update Experiment
Updates experiment
Experiment ID
Request Example
{
"experiment": {
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)"
}
}
Updated experiment is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"experiment": {
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Copy Experiment
Creates a new copy of the experiment
Experiment ID
Copied experiment is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"experiment": {
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string",
"protocol": {
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)",
"stages": [
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
]
},
"errors": [
"string"
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Show Experiment
Returns a single experiment based on the id
Experiment ID
Fetched experiment is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"experiment": {
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string",
"protocol": {
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)",
"stages": [
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
]
},
"errors": [
"string"
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Delete Experiment
Deletes the experiment from the database based on id
Experiment ID
Experiment deleted
Not authorized
Experiment deleted error
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (422 Unprocessable Entity)
{
"errors": [
"string"
]
}
Retrieve well layout
Retrieve all targets and samples sort by well number
Experiment ID
WellLayout
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
[
{
"samples": [
{
"id": "integer (int64)",
"name": "string",
"notes": "string",
"well_num": "integer"
}
],
"targets": [
{
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Retrieve temperature data
Returns the temperature data of an experiment based on the parameters specified
Experiment ID
Starting time in ms for temperature data
If not specified, it returns everything to the end of the experiment, in ms
Include data points for every x milliseconds. Must be a multiple of 1000 ms
Temperature data
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
[
{
"elapsed_time": "integer (int64)",
"lid_temp": "number (float)",
"heat_block_zone_1_temp": "number (float)",
"heat_block_zone_2_temp": "number (float)"
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Retrieve amplification data
Returns the amplification data of an experiment based on the parameters specified
Experiment ID
If raw data should be returned, by default it is not returned
If background subtracted data should be returned, by default it is returned
If baseline subtracted data should be returned, by default it is returned
If first derivative data should be returned, by default it is returned
If second derivative data should be returned, by default it is returned
If cq values should be returned, by default it is returned
?
?
Amplification data
Job accepted
Amplification data is not modified if etag is the same
Not authorized
Unexpected error
Response Content-Types: application/json
Response Example (200 OK)
[
{
"partial": "boolean",
"total_cycles": "integer",
"steps": [
{
"step_id": "integer",
"amplification_data": [
[
{
"target_id": "integer",
"well_num": "integer",
"cycle_num": "integer",
"background_subtracted_value": "integer",
"baseline_subtracted_value": "integer",
"dr1_pred": "integer",
"dr2_pred": "integer",
"fluorescence_value": "integer"
}
]
],
"summary_data": [
[
{
"target_id": "integer",
"well_num": "integer",
"replic_group": "integer",
"cq": "integer",
"quantity_m": "float",
"quantity_b": "integer",
"mean_cq": "float",
"mean_quantity_m": "float",
"mean_quantity_b": "integer"
}
]
],
"targets": [
[
{
"target_id": "integer",
"name": "integer",
"equation": {
"slope": "float",
"offset": "float",
"efficiency": "float",
"r2": "float"
}
}
]
]
}
]
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (500 Internal Server Error)
{
"errors": "string"
}
Retrieve melt curve data
Returns the melt curve data of an experiment based on the parameters specified
Experiment ID
If raw data should be returned, by default it is not returned
If normalized data should be returned, by default it is returned
If derivative data should be returned, by default it is returned
If tm values should be returned, by default it is returned
?
Melt curve data along with etag header
Job accepted
Melt curve data is not modified if etag is the same
Not authorized
Unexpected error
Response Content-Types: application/json
Response Example (200 OK)
[
{
"partial": "boolean",
"ramps": [
{
"ramp_id": "integer",
"melt_curve_data": [
{
"well_num": "integer",
"target_id": "integer",
"temperature": "array",
"normalized_data": "array",
"derivative_data": "array",
"tm": "array",
"area": "array"
}
],
"targets": [
{
"target_id": "integer",
"target_name": "string"
}
]
}
]
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (500 Internal Server Error)
{
"errors": "string"
}
Export Experiment
Downloads a zip file which has csv files for temperature, amplification and meltcurve data
Experiment ID
Zipped data
Job accepted
Not authorized
Unexpected error
Response Content-Types: application/zip
Response Example (200 OK)
"string (binary)"
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (default )
{
"errors": "string"
}
AmplificationOptions
Amplification Options
Returns the amplification options for the experiment
Experiment ID
Returns an object amplification_option which has the list of options
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"amplification_option": {
"cq_method": "string",
"baseline_method": "string",
"min_fluorescence": "string",
"min_reliable_cycle": "string",
"min_d1": "integer (int32)",
"min_d2": "boolean",
"baseline_cycle_bounds": "string"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update Amplification Options
Updates the passed amplification options for the experiment
Amplification options to update
Experiment ID
Request Example
{
"amplification_option": {
"cq_method": "string",
"baseline_method": "string",
"min_fluorescence": "string",
"min_reliable_cycle": "string",
"min_d1": "integer (int32)",
"min_d2": "boolean",
"baseline_cycle_bounds": "string"
}
}
Returns an object amplification_option which has the list of options
Not authorized
Not allowed if experiment is derived from GUID
Response Content-Types: application/json
Response Example (200 OK)
{
"amplification_option": {
"cq_method": "string",
"baseline_method": "string",
"min_fluorescence": "string",
"min_reliable_cycle": "string",
"min_d1": "integer (int32)",
"min_d2": "boolean",
"baseline_cycle_bounds": "string"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (422 Unprocessable Entity)
{
"errors": "string"
}
Protocols
Update Protocol
Updates the passed protocol data for the experiment
Protocol ID
Request Example
{
"protocol": {
"lid_temperature": "number (float)"
}
}
Returns an object protocol which has the list of protocol properties
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"protocol": {
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Ramps
Update Ramp
Updates the passed ramp data for the experiment
Ramp ID
Request Example
{
"ramp": {
"rate": "number (float)",
"collect_data": "boolean"
}
}
Returns an object ramp which has the list of ramp properties
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Login
Login
Logs in the user
Request Example
{
"email": "string",
"password": "string"
}
User is logged in to the application. Cookie will be set with the authentication token, the token will expire in a day
Response Content-Types: application/json
Response Example (201 Created)
{
"user_id": "integer",
"authentication_token": "string"
}
Logout
Logout of the application and redirected to the login page
User is logged out
Response Content-Types: application/json
Stages
Create Stage
Create a new stage with default steps created
Protocol ID
Request Example
{
"prev_id": "integer (int64)",
"stage": {
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer"
}
}
Created stage is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"stage": {
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update Stage
Update properties of a stage
Stage ID
Request Example
{
"stage": {
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer"
}
}
Updated stage is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"stage": {
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Delete Stage
Delete the entire stage
Stage ID
Stage is Deleted
Not authorized
Stage delete error
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (422 Unprocessable Entity)
{
"errors": [
"string"
]
}
Reorder Stage
Reorder a stage, prev_id is the stage id where this stage goes after
Stage ID
Request Example
{
"prev_id": "integer (int64)"
}
Moved Stage
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"stage": {
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Steps
Create Step
Create a new step in the stage -- if step is created with no params, it will be the same as previous step; when step is created, default ramp with max rate (5) is created, the ramp is used before this step is reached
Stage ID
Request Example
{
"prev_id": "integer (int64)",
"step": {
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer"
}
}
Created step is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"step": {
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update Step
Update properties of a step
Step ID
Request Example
{
"step": {
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer"
}
}
Updated step is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"step": {
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Delete Step
If last step in the asoociated stage is destroyed, the stage will be destroyed too if it is not the last stage in the protocol.
Step ID
Step is Deleted
Not authorized
Step delete error
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (422 Unprocessable Entity)
{
"errors": [
"string"
]
}
Reorder Step
Reorder a step, prev_id is the step id where this step goes after
Step ID
Request Example
{
"prev_id": "integer (int64)"
}
Updated step is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"step": {
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Users
List all Users
Gives a list of all the users
User response
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
[
{
"user": {
"id": "integer (int64)",
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Create User
Create an user -- only allowed by admin
Request Example
{
"user": {
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
User response
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"user": {
"id": "integer (int64)",
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Show Current User
Show the current user
Current user response
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"user": {
"id": "integer (int64)",
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Show User
show user for the specified id
user response
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"user": {
"id": "integer (int64)",
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update User
If you are admin, you can update any user; otherwise, you can only update yourself
User id
Request Example
{
"user": {
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
User response
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"user": {
"id": "integer (int64)",
"name": "string",
"email": "string",
"role": "string",
"show_banner": "boolean"
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Delete User
Delete a user -- only allowed by admin
User ID
User Deleted
Not authorized
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Samples
List all samples
List all samples for the experiment sort by id
Experiment ID
Object containing list of all the samples
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "integer (int64)",
"name": "string",
"notes": "string",
"samples_wells": [
{
"well_num": "integer"
}
]
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Create Sample
Create a new sample for the experiment
Experiment ID
Request Example
{
"sample": {
"name": "string",
"notes": "string"
}
}
Created sample is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"sample": {
"id": "integer (int64)",
"name": "string",
"notes": "string",
"samples_wells": [
{
"well_num": "integer"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update Sample
Update properties of a sample
Sample ID
Experiment ID
Request Example
{
"sample": {
"name": "string",
"notes": "string"
}
}
Updated sample is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"sample": {
"id": "integer (int64)",
"name": "string",
"notes": "string",
"samples_wells": [
{
"well_num": "integer"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Delete sample
Sample ID
Experiment ID
Sample is Deleted
Not authorized
Sample delete error
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (422 Unprocessable Entity)
{
"errors": [
"string"
]
}
Link Sample
Link sample to a well
Sample ID
Experiment ID
Request Example
{
"wells": [
"integer"
]
}
Updated sample is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"sample": {
"id": "integer (int64)",
"name": "string",
"notes": "string",
"samples_wells": [
{
"well_num": "integer"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Unlink Sample
Unlink sample from a well
Sample ID
Experiment ID
Request Example
{
"wells": [
"integer"
]
}
Updated sample is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"sample": {
"id": "integer (int64)",
"name": "string",
"notes": "string",
"samples_wells": [
{
"well_num": "integer"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Targets
List all targets
List all targets for the experiment sort by id
Experiment ID
Object containing list of all the targets
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"targets_wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
]
Response Example (401 Unauthorized)
{
"errors": "string"
}
Create Target
Create a new target for the experiment
Experiment ID
Request Example
{
"target": {
"name": "string",
"channel": "integer"
}
}
Created target is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"target": {
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"targets_wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Update Target
Update properties of a target
Target ID
Experiment ID
Request Example
{
"target": {
"name": "string",
"channel": "integer"
}
}
Updated target is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"target": {
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"targets_wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Delete target
If target is imported and linked to another experiment, it is not allowed to be deleted.
Target ID
Experiment ID
Target is Deleted
Not authorized
Target delete error
Response Content-Types: application/json
Response Example (401 Unauthorized)
{
"errors": "string"
}
Response Example (422 Unprocessable Entity)
{
"errors": [
"string"
]
}
Link Target
Link target to a well -- first time to call will create the link, subsequent calls will update any changed parameters
Target ID
Experiment ID
Request Example
{
"wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
Updated target is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"target": {
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"targets_wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Unlink Target
Unlink target from a well
Target ID
Experiment ID
Request Example
{
"wells": [
"integer"
]
}
Updated target is returned
Not authorized
Response Content-Types: application/json
Response Example (200 OK)
{
"target": {
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"targets_wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
}
Response Example (401 Unauthorized)
{
"errors": "string"
}
Schema Definitions
AmplificationData:
- partial: boolean
-
Keep polling the data until partial is false
- total_cycles: integer
-
Number of cycles for the experiment
- steps: AmplificationDataSteps
-
Contains amplification data for each step
-
AmplificationDataSteps
Example
{
"partial": "boolean",
"total_cycles": "integer",
"steps": [
{
"step_id": "integer",
"amplification_data": [
[
{
"target_id": "integer",
"well_num": "integer",
"cycle_num": "integer",
"background_subtracted_value": "integer",
"baseline_subtracted_value": "integer",
"dr1_pred": "integer",
"dr2_pred": "integer",
"fluorescence_value": "integer"
}
]
],
"summary_data": [
[
{
"target_id": "integer",
"well_num": "integer",
"replic_group": "integer",
"cq": "integer",
"quantity_m": "float",
"quantity_b": "integer",
"mean_cq": "float",
"mean_quantity_m": "float",
"mean_quantity_b": "integer"
}
]
],
"targets": [
[
{
"target_id": "integer",
"name": "integer",
"equation": {
"slope": "float",
"offset": "float",
"efficiency": "float",
"r2": "float"
}
}
]
]
}
]
}
AmplificationDataSteps:
- step_id: integer
-
Step id
- amplification_data: object[][]
-
Two dimensional array like [['target_id', 'well_num', 'cycle_num', 'background_subtracted_value', 'baseline_subtracted_value', 'dr1_pred', 'dr2_pred' 'fluorescence_value'], [1, 1, 1, 25488, -2003, 34543, 453344, 86], [1, 1, 2, 53984, -409, 56345, 848583, 85]]
-
object[] object - target_id: integer
-
Target ID
- well_num: integer
-
Well number from 1 to 16
- cycle_num: integer
-
Cycle number
- background_subtracted_value: integer
-
?
- baseline_subtracted_value: integer
-
?
- dr1_pred: integer
-
?
- dr2_pred: integer
-
?
- fluorescence_value: integer
-
?
- summary_data: object[][]
-
Two dimensional array like [['target_id','well_num','replic_group','cq','quantity_m','quantity_b','mean_cq','mean_quantity_m','mean_quantity_b'], [1,1,null,null,null,null,null,null,null], [2,12,1,7.314787,4.0,2,6.9858934999999995,4.0,2], [2,14,1,6.657,4.0,2,6.9858934999999995,4.0,2], [2,3,null,6.2,5.7952962,14,null,null,null]]
-
object[] object - target_id: integer
-
Target ID
- well_num: integer
-
Well number from 1 to 16
- replic_group: integer
-
?
- cq: integer
-
?
- quantity_m: float
-
?
- quantity_b: integer
-
?
- mean_cq: float
-
?
- mean_quantity_m: float
-
?
- mean_quantity_b: integer
-
?
- targets: object[][]
-
Two dimensional array like [['id','name','equation'],[1,'target1',null],[2,'target2',{'slope':-0.064624,'offset':7.154049,'efficiency':2979647189313701.5,'r2':0.221279}]]
-
object[] object - target_id: integer
-
Target ID
- name: integer Ch 1 or Ch 2
-
Target name
- equation: object
-
- slope: float
- offset: float
- efficiency: float
- r2: float
Example
{
"step_id": "integer",
"amplification_data": [
[
{
"target_id": "integer",
"well_num": "integer",
"cycle_num": "integer",
"background_subtracted_value": "integer",
"baseline_subtracted_value": "integer",
"dr1_pred": "integer",
"dr2_pred": "integer",
"fluorescence_value": "integer"
}
]
],
"summary_data": [
[
{
"target_id": "integer",
"well_num": "integer",
"replic_group": "integer",
"cq": "integer",
"quantity_m": "float",
"quantity_b": "integer",
"mean_cq": "float",
"mean_quantity_m": "float",
"mean_quantity_b": "integer"
}
]
],
"targets": [
[
{
"target_id": "integer",
"name": "integer",
"equation": {
"slope": "float",
"offset": "float",
"efficiency": "float",
"r2": "float"
}
}
]
]
}
Amplification_option:
- amplification_option: object
-
- cq_method: string Cy0, cpD2
-
Cy0:A Cq calling method based on the max first derivative of the curve (recommended). cpD2:A Cq calling method based on the max second derivative of the curve.
- baseline_method: string sigmoid, linear, median
-
baseline method
- min_fluorescence: string
-
The minimum fluorescence threshold for Cq calling. Cq values will not be called when the fluorescence is below this threshold.
- min_reliable_cycle: string
-
The earliest cycle to use in Cq calling & baseline subtraction. Data for earlier cycles will be ignored.
- min_d1: integer (int32)
-
The threshold which the first derivative of the curve must exceed for a Cq to be called.
- min_d2: boolean false
-
The threshold which the second derivative of the curve must exceed for a Cq to be called.
- baseline_cycle_bounds: string Auto, Manual
-
Automatically or manually detect the baseline cycles
Example
{
"amplification_option": {
"cq_method": "string",
"baseline_method": "string",
"min_fluorescence": "string",
"min_reliable_cycle": "string",
"min_d1": "integer (int32)",
"min_d2": "boolean",
"baseline_cycle_bounds": "string"
}
}
Capabilities:
- capabilities: object
-
- plate: object
-
- rows: integer
-
Josh to describe
- columns: integer
-
Josh to describe
- min_volume_ul: integer
-
Josh to describe
- max_volume_ul: integer
-
Josh to describe
- optics: object
-
- excitation_channels: CapabilitiesWavelength
-
CapabilitiesWavelength - emission_channels: CapabilitiesWavelength
-
CapabilitiesWavelength
- storage: object
-
- microsd_size_gb: integer
-
Storage capacity of the micro sd card in gb
- emmc_size_gb: integer
-
emmc size in gb
- thermal: object
-
- lid: object
-
- max_temp_c: integer
-
Temperature in celcius
- block: object
-
- min_temp_c: integer
-
Temperature in celcius
- max_temp_c: integer
-
Temperature in celcius
Example
{
"capabilities": {
"plate": {
"rows": "integer",
"columns": "integer",
"min_volume_ul": "integer",
"max_volume_ul": "integer"
},
"optics": {
"excitation_channels": [
{
"begin_wavelength": "integer",
"end_wavelength": "integer"
}
],
"emission_channels": [
{
"begin_wavelength": "integer",
"end_wavelength": "integer"
}
]
},
"storage": {
"microsd_size_gb": "integer",
"emmc_size_gb": "integer"
},
"thermal": {
"lid": {
"max_temp_c": "integer"
},
"block": {
"min_temp_c": "integer",
"max_temp_c": "integer"
}
}
}
}
CapabilitiesWavelength:
- begin_wavelength: integer
-
Starting wavelength
- end_wavelength: integer
-
Ending wavelength
Example
{
"begin_wavelength": "integer",
"end_wavelength": "integer"
}
Device:
- serial_number: string
-
Serial number of the device
- model_number: string
-
Hardware model number of the device
- processor_architecture: string
-
Device processor architecture
- software: object
-
- version: string
-
Current software version
- platform: string
-
Current software platform
Example
{
"serial_number": "string",
"model_number": "string",
"processor_architecture": "string",
"software": {
"version": "string",
"platform": "string"
}
}
DeviceStatus:
- experiment_controller: object
-
- machine: object
-
- state: string
-
Status of the machine
- thermal_state: string
-
Thermal state of the machine
- heat_block: object
-
- zone1: object
-
- temperature: float
-
Temperature in celcius
- target_temperature: float
-
Temperature in celcius
- drive: float
-
?
- zone2: object
-
- temperature: float
-
Temperature in celcius
- target_temperature: float
-
Temperature in celcius
- drive: float
-
?
- temperature: float
-
Temperature in celcius
- lid: object
-
- temperature: float
-
Temperature in celcius
- target_temperature: float
-
Temperature in celcius
- drive: float
-
?
- optics: object
-
- intensity: integer
-
?
- collect_data: boolean
-
If data is being collected or not
- lid_open: boolean
-
If lid is open or closed
- well_number: integer
-
Well number
- photodiode_value: string[]
-
?
-
string
- heat_sink: object
-
- temperature: float
-
Temperature in celcius
- fan_drive: float
-
?
- device: object
-
- update_available: string
-
If an update is available or not
Example
{
"experiment_controller": {
"machine": {
"state": "string",
"thermal_state": "string"
}
},
"heat_block": {
"zone1": {
"temperature": "float",
"target_temperature": "float",
"drive": "float"
},
"zone2": {
"temperature": "float",
"target_temperature": "float",
"drive": "float"
},
"temperature": "float"
},
"lid": {
"temperature": "float",
"target_temperature": "float",
"drive": "float"
},
"optics": {
"intensity": "integer",
"collect_data": "boolean",
"lid_open": "boolean",
"well_number": "integer",
"photodiode_value": [
"string"
]
},
"heat_sink": {
"temperature": "float",
"fan_drive": "float"
},
"device": {
"update_available": "string"
}
}
Experiment:
- id: integer (int64)
- guid: string
-
GUID of the experiment
- name: string
-
Name of the experiment
- notes: string
-
Notes of the experiment
- standard_experiment_id: integer (int64)
-
imported standard experiment id
- type: string user, diagnostic, calibration, test_kit
-
experiment type
- time_valid: boolean
- created_at: string (date)
-
Date at which the experiment was created
- started_at: string (date)
-
Date at which the experiment was started
- completed_at: string (date)
-
Date at which the experiment was completed
- completion_status: string
-
If the experiment was completed successfully or aborted
- completion_message: string
-
?
Example
{
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string"
}
FullExperiment:
- guid: string
-
GUID of the experiment
- protocol: FullProtocol
Example
{
"id": "integer (int64)",
"guid": "string",
"name": "string",
"notes": "string",
"standard_experiment_id": "integer (int64)",
"type": "string",
"time_valid": "boolean",
"created_at": "string (date)",
"started_at": "string (date)",
"completed_at": "string (date)",
"completion_status": "string",
"completion_message": "string",
"protocol": {
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)",
"stages": [
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
]
},
"errors": [
"string"
]
}
MeltCurveData:
- partial: boolean
-
Keep polling the data until partial is false
- ramps: object[]
-
Contains temperature, normalized_data, derivative_data, tm and area arrays
-
object - ramp_id: integer
- melt_curve_data: object[]
-
[{'well_num':1, 'target_id':1, 'temperature':[0,1,2,3,4,5], 'normalized_data':[0,1,2,3,4,5], 'derivative_data':[0,1,2,3,4,5], 'tm':[1,2,3], 'area':[2,4,5]}, {'well_num':2, 'target_id':1, 'temperature':[0,1,2,3,4,5], 'normalized_data':[0,1,2,3,4,5], 'derivative_data':[0,1,2,3,4,5], 'tm':[1,2,3], 'area':[2,4,5]}]
-
object - well_num: integer
-
Well number from 1 to 16
- target_id: integer
-
Target ID
- temperature: array
-
Temperature, in degree C
- normalized_data: array
-
?
- derivative_data: array
-
?
- tm: array
-
?
- area: array
-
?
- targets: object[]
-
[{'target_id':1,'target_name':'Ch 1'},{'target_id':2,'target_name':'Ch 2'}]
-
object - target_id: integer
-
Target ID
- target_name: string Ch 1 or Ch 2
-
Target name
Example
{
"partial": "boolean",
"ramps": [
{
"ramp_id": "integer",
"melt_curve_data": [
{
"well_num": "integer",
"target_id": "integer",
"temperature": "array",
"normalized_data": "array",
"derivative_data": "array",
"tm": "array",
"area": "array"
}
],
"targets": [
{
"target_id": "integer",
"target_name": "string"
}
]
}
]
}
Protocol:
- id: integer (int64)
- lid_temperature: number (float) 110
-
Lid temperature, in degree C, default is 110, with precision to one decimal point
- estimate_duration: integer (int32)
-
Estimated duration in seconds
Example
{
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)"
}
FullProtocol:
Example
{
"id": "integer (int64)",
"lid_temperature": "number (float)",
"estimate_duration": "integer (int32)",
"stages": [
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
]
}
Ramp:
- id: integer (int64)
- rate: number (float) 0 ≤ x ≤ 5 0
-
Rate of the ramp, in degrees C/s, precision to 8 decimal point
- collect_data: boolean false
-
Collect data
Example
{
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
Stage:
- id: integer (int64)
- stage_type: string holding, cycling, meltcurve
- name: string <stage_type> Stage
-
Stage name
- num_cycles: integer (int32) x ≥ 1
-
Number of cycles in a stage, must be >= 1, default to 1
- auto_delta: boolean false
-
Auto Delta, default is false
- auto_delta_start_cycle: integer
-
Cycle to start delta temperature
- order_number: integer
-
Sort order
Example
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer"
}
FullStage:
Example
{
"id": "integer (int64)",
"stage_type": "string",
"name": "string",
"num_cycles": "integer (int32)",
"auto_delta": "boolean",
"auto_delta_start_cycle": "integer",
"order_number": "integer",
"steps": [
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
]
}
Step:
- id: integer (int64)
- temperature: number (float)
-
Temperature of the step, in degree C, with precision to one decimal point
- hold_time: integer
-
Hold time of the step, in seconds, 0 means infinite
- name: string Step <order_number>
-
Step name
- pause: boolean false
-
Device will be paused when the step is reached
- collect_data: boolean false
-
Collect data
- delta_temperature: number (float)
-
Delta temperature, in degree C, with precision to two decimal points
- delta_duration_s: integer
-
Delta duration, in second
- order_number: integer
-
Sort order
Example
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer"
}
FullStep:
Example
{
"id": "integer (int64)",
"temperature": "number (float)",
"hold_time": "integer",
"name": "string",
"pause": "boolean",
"collect_data": "boolean",
"delta_temperature": "number (float)",
"delta_duration_s": "integer",
"order_number": "integer",
"ramp": {
"id": "integer (int64)",
"rate": "number (float)",
"collect_data": "boolean"
}
}
WellLayout:
- samples: WellLayoutSample
-
WellLayoutSample - targets: WellLayoutTarget
-
WellLayoutTarget
Example
{
"samples": [
{
"id": "integer (int64)",
"name": "string",
"notes": "string",
"well_num": "integer"
}
],
"targets": [
{
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
WellLayoutSample:
Example
{
"id": "integer (int64)",
"name": "string",
"notes": "string",
"well_num": "integer"
}
WellLayoutTarget:
Example
{
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
Sample:
- id: integer (int64)
- name: string
-
Sample name
- notes: string
-
Sample notes
Example
{
"id": "integer (int64)",
"name": "string",
"notes": "string"
}
FullSample:
- samples_wells: SampleWell
-
SampleWell
Example
{
"id": "integer (int64)",
"name": "string",
"notes": "string",
"samples_wells": [
{
"well_num": "integer"
}
]
}
Target:
- id: integer (int64)
- name: string
-
Target name
- channel: integer 1, 2
-
Target channel
- imported: boolean
-
If set to true, target is imported from a different experiment
Example
{
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean"
}
FullTarget:
- targets_wells: TargetWell
-
TargetWell
Example
{
"id": "integer (int64)",
"name": "string",
"channel": "integer",
"imported": "boolean",
"targets_wells": [
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
]
}
TargetWell:
- well_num: integer
-
Well number from 1 to 16
- well_type: string standard, unknown, positive_control, negative_control
- quantity: object
-
set when well_type is standard
-
- m: float
-
has to be > 0, with 1 digit before dot, and precision to 8 decimal point
- b: integer
- omit: boolean false
-
If set to true, target in this well is not included in the standard curve calculation
Example
{
"well_num": "integer",
"well_type": "string",
"quantity": {
"m": "float",
"b": "integer"
},
"omit": "boolean"
}
TemperatureData:
- elapsed_time: integer (int64)
-
in milliseconds
- lid_temp: number (float)
-
Temperature, in degree C, with precision to two decimal points
- heat_block_zone_1_temp: number (float)
-
Temperature, in degree C, with precision to two decimal points
- heat_block_zone_2_temp: number (float)
-
Temperature, in degree C, with precision to two decimal points
Example
{
"elapsed_time": "integer (int64)",
"lid_temp": "number (float)",
"heat_block_zone_1_temp": "number (float)",
"heat_block_zone_2_temp": "number (float)"
}