Logotype Sitevision Developer
Log in
Log in

ContentNodes REST API endpoint

Disclaimer: This endpoint documentation is generated from the latest Sitevision version. It might differ from the actual Sitevision environment where your website resides.

Use the RestApi utility of the Public API for server-side access of this endpoint.

ContentNodes

Provides a list of headless content nodes for the given page node

Applicable to: sv:page, sv:article, sv:structurePage, sv:sitePage, sv:collaborationGroupPage, sv:template, sv:collaborationGroupTemplate.

GET

Returns a list with headless content nodes for a page node.

Typical Sitevision headless modules are the Text module, the Image module, the Image Slideshow module and the Video module, but all WebApp-based content modules that exposes headless are also included.

Requires that the caller is authorized to READ the node.

Note: Legacy Text portlets (i.e. created before and not changed after SiteVision 3) will not be included in the result. In order to include them you have to convert them by clicking in them and publish the page.

Name Type Default Values Description Since
includeLinkedContent boolean Whether or not content from linked layouts/portlets should be included in the response.
textPortletFormat String PLAIN PLAIN, JSON, MARKDOWN The data format for text portlets in the returned result. (MARKDOWN since 2025.07.1) 10

Example response

[
   {
      "type": "text",
      "name": "Rubrik",
      "contentIdentifier": "heading",
      "properties": {
         "textContent": "Instagram"
      }
   },
   {
      "type": "text",
      "name": "Ingress",
      "contentIdentifier": "summary",
      "properties": {
         "textContent": "Sjö bäckasiner vemod och dimma rot och oss se sin där tidigare dag, från tiden dunge annat bra sax samma sax plats groda erfarenheter. Det år olika i hav sällan mot tidigare från, miljoner där sig denna bäckasiner som rännil."
      }
   },
   {
      "type": "image",
      "name": "Bild",
      "properties": {
         "image": {
            "displayName": "gräs.png",
            "alt": "En vacker äng i närbild",
            "mimeType": "image/png",
            "URI": "/images/18.27f1fe4c168c1d8175137f69/1557748066330/gra%CC%88s.png",
            "URL": "http://leaf.sitevision.net/images/18.27f1fe4c168c1d8175137f69/1557748066330/gra%CC%88s.png",
            "id": "18.27f1fe4c168c1d8175137f69",
            "caption": "En promenad längs en vacker äng är livsnjutning"
         }
      }
   },
   {
      "type": "imageslideshow",
      "name": "Bildspel",
      "properties": {
         "images": [
            {
               "displayName": "gräs.png",
               "alt": "En vacker äng i närbild",
               "mimeType": "image/png",
               "URI": "/images/18.27f1fe4c168c1d8175137f69/1557748066330/gra%CC%88s.png",
               "URL": "http://leaf.sitevision.net/images/18.27f1fe4c168c1d8175137f69/1557748066330/gra%CC%88s.png",
               "id": "18.27f1fe4c168c1d8175137f69"
            },
            {
               "displayName": "trädtoppar.png",
               "alt": "Trädtoppar med lite fåglar som flyger",
               "mimeType": "image/png",
               "URI": "/images/18.27f1fe4c168c1d8175137f6a/1557748066237/tra%CC%88dtoppar.png",
               "URL": "http://leaf.sitevision.net/images/18.27f1fe4c168c1d8175137f6a/1557748066237/tra%CC%88dtoppar.png",
               "id": "18.27f1fe4c168c1d8175137f6a"
            }
         ]
      }
   },
   {
      "type": "video",
      "name": "Video",
      "properties": {
         "video": [
            {
               "displayName": "sitevision-intro.mp4",
               "mimeType": "video/mp4",
               "streamURI": "/download-streamed/18.1cec052117f219333abe/1645543074651/sitevision-intro.mp4",
               "streamURL": "http://leaf.sitevision.net/download-streamed/18.1cec052117f219333abe/1645543074651/sitevision-intro.mp4",
               "URI": "/download/18.1cec052117f219333abe/1645543074651/sitevision-intro.mp4",
               "URL": "http://leaf.sitevision.net/download/18.1cec052117f219333abe/1645543074651/sitevision-intro.mp4",
               "id": "18.1cec052117f219333abe"
            },
         ]
      }
   }
]

Example input

{
   "textPortletFormat": "JSON"
}

Example response

[
   {
      "type": "text",
      "name": "Text",
      "properties": {
         "textContent": [
            {
               "type": "block",
               "htmlName": "h1",
               "attributes": {},
               "children": [
                  {
                     "type": "text",
                     "content": "Heading"
                  }
               ]
            },
            {
               "type": "block",
               "htmlName": "p",
               "attributes": {},
               "children": [
                  {
                     "type": "text",
                     "content": "Lorem ipsum dolor sit amet"
                  }
               ]
            },
            {
               "type": "block",
               "htmlName": "h2",
               "attributes": {},
               "children": [
                  {
                     "type": "text",
                     "content": "Heading 2"
                  }
               ]
            },
            {
               "type": "block",
               "htmlName": "p",
               "attributes": {},
               "children": [
                  {
                     "type": "text",
                     "content": "Lorem ipsum "
                  },
                  {
                     "type": "inline",
                     "htmlName": "a",
                     "attributes": {
                        "href": "https://sitevision.se"
                     },
                     "children": [
                        {
                           "type": "text",
                           "content": "www.sitevision.se"
                        }
                     ]
                  }
               ]
            }
         ]
      }
   }
]

JSON text portlet format node types

// Block
{
    "type": "block",
    "htmlName": "p", // hx, ul, ol, blockquote, table
    "attributes": {},
    "children": [...]
}

// Inline
{
    "type": "inline",
    "htmlName": "a", // em, strong, q, code, sub, sup, span, abbr, li, td...
    "attributes": {
      "href": "https://sitevision.se"
    }
    "children": [...]
}

// Text (always a child)
{
    "type": "text",
    "content": "Hello"
}

// Line break (always a child)
{
   "type": "lineBreak",
   "htmlName": "br"
}
Did you find the content on this page useful?