This endpoint allows users to append the contentType, using contentToAppend, replace using contentToReplace, and add to the head using contentToHeadto the protocol.
If contentType is “image”, then the contentToAppend, contentToReplace, and/or contentToHead will need to be a JSON Object with the following properties:
uuid: (String) The uuid of the image. This can be found using after uploading the file using the https://new.scispot.io/files/store endpoint.
name: (String) The name of the image
If contentType is “json”, then the contentToAppend, contentToReplace, and/or contentToHead will need to be a JSON Object with the following properties:
Here are the structure of each element object. Currently only sections, texts, or files are supported
Section type only :
Text type only:
content: (string) The text to be added in
headers : (string) What header to use for the text. Currently supports “h1”, “h2’, “h3”, “h4”, “h5”, “h6”. (Optional)
bold : (boolean) Add bold formatting to the text) (Optional)
italics : (boolean) Add italics formatting to the text (Optional)
underline : (boolean) Add underline formatting to the text (Optional)
strikethrough: (boolean) Add strikethroughformatting to the text (Optional)
File Type only
uuid: (String) The uuid of the file. This can be found using after uploading the file using the https://new.scispot.io/files/store endpoint.
name: (String) The name of the file, eg. “file.csv”
fileType: (String) The type of the file, eg. “csv”
Example of a valid JSON for contentType “json”:
{
"elements": [
{
"type": "section",
"items": [
{
"type": "text",
"header": "h3",
"bold": true,
"italics": true
"content": "This is the title of the section"
},
{
"type": "text",
"content": "This is the content of my section"
}
]
},
{
"type": "text",
"content": "Some text outside the section"
},
{
"type": "file",
"uuid": "e1962cf0-e905-4111-8ed2-3c1b754b1b08",
"name": "test.csv",
"fileType": "csv"
}
]
}
Validation notes: provide at least one of name, hrid, uuid; provide at least one of contentToAppend, contentToReplace, contentToHead.
Provide one of name, uuid, or hrid and at least one of contentToAppend, contentToReplace, or contentToHead. contentType defaults to text and supports image and json payloads.
Personal access token from Scispot Account → Personal Tokens
OK