curl --request POST \
--url https://cloudlab.scispot.io/labsheets/create-children \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"labsheet": "Sample Manager",
"parent": "SMPL000001",
"children": [
{
"quantity": 1
},
{
"quantity": 1
}
],
"waitRefresh": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
labsheet: 'Sample Manager',
parent: 'SMPL000001',
children: [{quantity: 1}, {quantity: 1}],
waitRefresh: true
})
};
fetch('https://cloudlab.scispot.io/labsheets/create-children', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labsheets/create-children"
payload = {
"labsheet": "Sample Manager",
"parent": "SMPL000001",
"children": [{ "quantity": 1 }, { "quantity": 1 }],
"waitRefresh": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"ids": [
"<uuid>",
"<uuid>"
]
}{
"success": false,
"message": "Invalid Authentication Token"
}{
"success": false,
"message": "Missing Authentication Token"
}{
"success": false,
"message": "Not found"
}{
"success": false,
"message": "Conflict"
}{
"success": false,
"message": "Validation error"
}{
"success": false,
"message": "Operation failed"
}Create Children Samples
Create children samples from existing samples in labsheets.
NOTE: To perform this operation, it is necessary that the labsheet has an ID column and a Quantity column. Also, the parent sample should have quantity greater than or equal to the sum of quantity of children.
curl --request POST \
--url https://cloudlab.scispot.io/labsheets/create-children \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"labsheet": "Sample Manager",
"parent": "SMPL000001",
"children": [
{
"quantity": 1
},
{
"quantity": 1
}
],
"waitRefresh": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
labsheet: 'Sample Manager',
parent: 'SMPL000001',
children: [{quantity: 1}, {quantity: 1}],
waitRefresh: true
})
};
fetch('https://cloudlab.scispot.io/labsheets/create-children', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labsheets/create-children"
payload = {
"labsheet": "Sample Manager",
"parent": "SMPL000001",
"children": [{ "quantity": 1 }, { "quantity": 1 }],
"waitRefresh": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"ids": [
"<uuid>",
"<uuid>"
]
}{
"success": false,
"message": "Invalid Authentication Token"
}{
"success": false,
"message": "Missing Authentication Token"
}{
"success": false,
"message": "Not found"
}{
"success": false,
"message": "Conflict"
}{
"success": false,
"message": "Validation error"
}{
"success": false,
"message": "Operation failed"
}Authorizations
Personal access token from Scispot Account → Personal Tokens
Body
The name of the labsheet where the parent sample is located.
The ID of the parent sample.
The array of children samples to create.
Show child attributes
Show child attributes
Optional. Waits for the data to be reindexed before returning a success. This will add up to 1 second of latency to the requests, so only use this flag if there is a need to query this item again.
Optional. Identifier type used to resolve the parent/children.
Optional. Labsheet to create the children in, if different from the parent's labsheet. If not provided, the children will be created in the same labsheet as the parent.
