Scispot API - ELN API - Update

Write To A Documentation

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:

  • elements: (array) This will serve as the base object. This array will contain all other elemennts that will be added into the documentation. Elements can either contain section, text, or file json objects as described below

Here are the structure of each element object. Currently only sections and texts are supported

  • type: (String) The identifier of what this type this JSON object will be. Currently supports "text", "section", "text"

Section type only :

  • items: (array) An array of elements that will be embedded within a section. Note nested sections are not allowed

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.

post/labspace/documentation/write

Request

  • Base URL: https://cloudlab.scispot.io
  • URL: https://cloudlab.scispot.io/labspace/documentation/write
  • Auth: HTTP bearer

Request body

namestring
uuidstring
hridstring
contentType'text' | 'image' | 'json'
contentToAppendobject
contentToReplaceobject
contentToHeadobject
start_datestring
end_datestring

Response

OK

successboolean

Changes

No recorded changes to this operation across all 1 revision of this API.