Link Samples to Test in Labflow
curl --request POST \
--url https://cloudlab.scispot.io/labflows/link-samples-to-test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"labflowId": "<uuid>",
"protocoltemplateId": "<uuid>",
"sampleUuids": [
"<uuid>",
"<uuid>"
],
"sampleEntityUuid": "<uuid>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
labflowId: '<uuid>',
protocoltemplateId: '<uuid>',
sampleUuids: ['<uuid>', '<uuid>'],
sampleEntityUuid: '<uuid>'
})
};
fetch('https://cloudlab.scispot.io/labflows/link-samples-to-test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labflows/link-samples-to-test"
payload = {
"labflowId": "<uuid>",
"protocoltemplateId": "<uuid>",
"sampleUuids": ["<uuid>", "<uuid>"],
"sampleEntityUuid": "<uuid>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Samples linked successfully",
"performTestStepId": "<uuid>",
"protocoltemplateId": "<uuid>",
"samplesLinked": 2
}{
"success": false,
"message": "Invalid Authentication Token"
}{
"success": false,
"message": "Missing Authentication Token"
}{
"success": false,
"message": "Validation error"
}{
"success": false,
"message": "Operation failed"
}Labflows API
Link Samples to Test in Labflow
Link one or more samples to an existing test within a labflow. Provide the labflowId, the
protocoltemplateId identifying the test, and the sampleUuids of the samples to link.
POST
https://cloudlab.scispot.io
/
labflows
/
link-samples-to-test
Link Samples to Test in Labflow
curl --request POST \
--url https://cloudlab.scispot.io/labflows/link-samples-to-test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"labflowId": "<uuid>",
"protocoltemplateId": "<uuid>",
"sampleUuids": [
"<uuid>",
"<uuid>"
],
"sampleEntityUuid": "<uuid>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
labflowId: '<uuid>',
protocoltemplateId: '<uuid>',
sampleUuids: ['<uuid>', '<uuid>'],
sampleEntityUuid: '<uuid>'
})
};
fetch('https://cloudlab.scispot.io/labflows/link-samples-to-test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labflows/link-samples-to-test"
payload = {
"labflowId": "<uuid>",
"protocoltemplateId": "<uuid>",
"sampleUuids": ["<uuid>", "<uuid>"],
"sampleEntityUuid": "<uuid>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Samples linked successfully",
"performTestStepId": "<uuid>",
"protocoltemplateId": "<uuid>",
"samplesLinked": 2
}{
"success": false,
"message": "Invalid Authentication Token"
}{
"success": false,
"message": "Missing Authentication Token"
}{
"success": false,
"message": "Validation error"
}{
"success": false,
"message": "Operation failed"
}Authorizations
Personal access token from Scispot Account → Personal Tokens
Body
application/json
The id of the labflow that contains the test.
The id of the protocol template (test) to link the samples to.
The uuids of the samples to link to the test.
A single sample uuid.
(Optional) The uuid of the entity/labsheet the samples belong to, used to disambiguate the samples when needed.
⌘I
