Attach Image to Protocol
curl --request POST \
--url https://cloudlab.scispot.io/labspace/protocol/attach-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Protocol",
"hrid": "MY_PROTOCOL",
"image_uuid": "<uuid>",
"image_name": "gel-image.png",
"image_mime_type": "image/png",
"position": "append"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Protocol',
hrid: 'MY_PROTOCOL',
image_uuid: '<uuid>',
image_name: 'gel-image.png',
image_mime_type: 'image/png',
position: 'append'
})
};
fetch('https://cloudlab.scispot.io/labspace/protocol/attach-image', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labspace/protocol/attach-image"
payload = {
"name": "My Protocol",
"hrid": "MY_PROTOCOL",
"image_uuid": "<uuid>",
"image_name": "gel-image.png",
"image_mime_type": "image/png",
"position": "append"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"uuid": "<uuid>",
"image_uuid": "<uuid>",
"extension": "png",
"name": "My Protocol",
"position": "append"
}{
"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"
}Update
Attach Image to Protocol
Embeds an image — already uploaded to the labspace S3 bucket — into a Protocol, Experiment, or Documentation page by generating an XML tag and applying it at the chosen position.
Validation notes: provide at least one of name, hrid, uuid.
POST
https://cloudlab.scispot.io
/
labspace
/
protocol
/
attach-image
Attach Image to Protocol
curl --request POST \
--url https://cloudlab.scispot.io/labspace/protocol/attach-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Protocol",
"hrid": "MY_PROTOCOL",
"image_uuid": "<uuid>",
"image_name": "gel-image.png",
"image_mime_type": "image/png",
"position": "append"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Protocol',
hrid: 'MY_PROTOCOL',
image_uuid: '<uuid>',
image_name: 'gel-image.png',
image_mime_type: 'image/png',
position: 'append'
})
};
fetch('https://cloudlab.scispot.io/labspace/protocol/attach-image', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labspace/protocol/attach-image"
payload = {
"name": "My Protocol",
"hrid": "MY_PROTOCOL",
"image_uuid": "<uuid>",
"image_name": "gel-image.png",
"image_mime_type": "image/png",
"position": "append"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"uuid": "<uuid>",
"image_uuid": "<uuid>",
"extension": "png",
"name": "My Protocol",
"position": "append"
}{
"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
application/json
⌘I
