TemplateResource Resource

Resource used for loading, saving and manipulating GCN templates.

GET /template

List templates assigned to the given list of nodes.
The result can be filtered by

  • id
  • name
  • description
and sorted by
  • id
  • name
  • description
  • cdate
  • edate

Request Parameters
name type description default constraints multivalued
checkPermission query true if the access permission should be checked for every template true boolean no
inherited query true to only return inherited templates in the given node, false to only get local/localized templates, null to get local and inherited templates   boolean no
nodeId query list of node IDs     yes
page query Returned page, if paging is used. Paging starts with 1 1 int no
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int no
perms query Flag to add permission information for the returned items. false boolean no
q query Query string for filtering     no
reduce query true if the list should be reduced to the unique template occurrences only. valid only when InFolderParameterBean#recursive flag is set. false boolean no
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name   no
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TemplateInNodeResponse (JSON) response containing the list of assigned templates

Example

Request
GET /template
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "userassignment", "deletetemplates" ],
    "property2" : [ "publishform", "userassignment" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template

Create a new template

Request Body
media type data type description
application/json TemplateCreateRequest (JSON) create request
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TemplateLoadResponse (JSON) created template

Example

Request
POST /template
Content-Type: application/json
Accept: application/json

                
{
  "nodeId" : 12345,
  "folderIds" : [ "...", "..." ],
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  }
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/link

Link the given templates to the given folders. For linking templates to folders, the user must have the following permissions:

  • edit the template (which includes viewing the template)
  • link templates to all target folders (which includes viewing folder and viewing templates in the folder)
If at least on of these permissions is not granted to the user, the method will fail.

Request Body
media type data type description
application/json MultiLinkRequest (JSON) request containing the list of folders and other data
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) generic response

Example

Request
POST /template/link
Content-Type: application/json
Accept: application/json

                
{
  "templateIds" : [ "...", "..." ],
  "recursive" : true,
  "folderIds" : [ "...", "..." ],
  "nodeId" : 12345,
  "delete" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/unlink

Unlink the given templates from the given folders. For unlinking templates from folders, the user must have the following permissions:

  • edit the template (which includes viewing the template)
  • link templates to all target folders (which includes viewing folder and viewing templates in the folder)
If at least on of these permissions is not granted to the user, the method will fail.

Request Body
media type data type description
application/json MultiLinkRequest (JSON) request containing the list of folders and other data
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) generic response

Example

Request
POST /template/unlink
Content-Type: application/json
Accept: application/json

                
{
  "templateIds" : [ "...", "..." ],
  "recursive" : true,
  "folderIds" : [ "...", "..." ],
  "nodeId" : 12345,
  "delete" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /template/{id}

Delete the template with given id

Request Parameters
name type description
id path The template id (either local or global)
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) generic response

Example

Request
DELETE /template/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /template/{id}

Load the template with the given id and return it.

Request Parameters
name type description default constraints
id path The template id (either local or global)    
construct query if true, the construct info will be added to tags false boolean
nodeId query channel id   int
update query true when the template shall be locked, false if not false boolean
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TemplateLoadResponse (JSON) template load response

Example

Request
GET /template/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/{id}

Update the template with given id

Request Parameters
name type description
id path The template id (either local or global)
Request Body
media type data type description
application/json TemplateSaveRequest (JSON) template update request
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) generic response

Example

Request
POST /template/{id}
Content-Type: application/json
Accept: application/json

                
{
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  },
  "unlock" : true,
  "syncPages" : true,
  "sync" : [ "...", "..." ],
  "forceSync" : true,
  "delete" : [ "...", "..." ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /template/getTags/{id}

This method has been deprecated. because new endpoint exists. use GET TemplateResource instead

Get the list of templatetags for this template

Request Parameters
name type description default constraints
id path id of the template. The local or global id    
maxItems query -1 int
search query    
skipCount query 0 int
sortby query name "name"
sortorder query asc "ASC" or "DESC" or "NONE" or "asc" or "desc" or "none"
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TagListResponse (JSON) response object

Example

Request
GET /template/getTags/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tags" : [ {
    "id" : 12345,
    "name" : "...",
    "constructId" : 12345,
    "construct" : {
      "keyword" : "...",
      "mayBeSubtag" : true,
      "mayContainSubtags" : true,
      "id" : 12345,
      "globalId" : "...",
      "name" : "...",
      "description" : "...",
      "creator" : { },
      "cdate" : 12345,
      "editor" : { },
      "edate" : 12345,
      "category" : { },
      "externalEditorUrl" : "...",
      "parts" : [ { }, { } ],
      "visibleInMenu" : true,
      "nameI18n" : {
        "property1" : "...",
        "property2" : "..."
      },
      "descriptionI18n" : {
        "property1" : "...",
        "property2" : "..."
      },
      "autoEnable" : true,
      "liveEditorTagName" : "...",
      "openEditorOnInsert" : true,
      "editorControlStyle" : "ABOVE",
      "editorControlsInside" : true,
      "categoryId" : 12345
    },
    "active" : true,
    "properties" : {
      "property1" : {
        "type" : "RICHTEXT",
        "stringValue" : "...",
        "booleanValue" : true,
        "fileId" : 12345,
        "imageId" : 12345,
        "folderId" : 12345,
        "pageId" : 12345,
        "formId" : 12345,
        "stringValues" : [ "...", "..." ],
        "options" : [ { }, { } ],
        "selectedOptions" : [ { }, { } ],
        "datasourceId" : 12345,
        "overview" : { },
        "templateId" : 12345,
        "contentTagId" : 12345,
        "templateTagId" : 12345,
        "nodeId" : 12345,
        "partId" : 12345,
        "id" : 12345,
        "globalId" : "..."
      },
      "property2" : {
        "type" : "LOCALFILE",
        "stringValue" : "...",
        "booleanValue" : true,
        "fileId" : 12345,
        "imageId" : 12345,
        "folderId" : 12345,
        "pageId" : 12345,
        "formId" : 12345,
        "stringValues" : [ "...", "..." ],
        "options" : [ { }, { } ],
        "selectedOptions" : [ { }, { } ],
        "datasourceId" : 12345,
        "overview" : { },
        "templateId" : 12345,
        "contentTagId" : 12345,
        "templateTagId" : 12345,
        "nodeId" : 12345,
        "partId" : 12345,
        "id" : 12345,
        "globalId" : "..."
      }
    },
    "type" : "OBJECTTAG"
  }, {
    "id" : 12345,
    "name" : "...",
    "constructId" : 12345,
    "construct" : {
      "keyword" : "...",
      "mayBeSubtag" : true,
      "mayContainSubtags" : true,
      "id" : 12345,
      "globalId" : "...",
      "name" : "...",
      "description" : "...",
      "creator" : { },
      "cdate" : 12345,
      "editor" : { },
      "edate" : 12345,
      "category" : { },
      "externalEditorUrl" : "...",
      "parts" : [ { }, { } ],
      "visibleInMenu" : true,
      "nameI18n" : {
        "property1" : "...",
        "property2" : "..."
      },
      "descriptionI18n" : {
        "property1" : "...",
        "property2" : "..."
      },
      "autoEnable" : true,
      "liveEditorTagName" : "...",
      "openEditorOnInsert" : true,
      "editorControlStyle" : "CLICK",
      "editorControlsInside" : true,
      "categoryId" : 12345
    },
    "active" : true,
    "properties" : {
      "property1" : {
        "type" : "FILE",
        "stringValue" : "...",
        "booleanValue" : true,
        "fileId" : 12345,
        "imageId" : 12345,
        "folderId" : 12345,
        "pageId" : 12345,
        "formId" : 12345,
        "stringValues" : [ "...", "..." ],
        "options" : [ { }, { } ],
        "selectedOptions" : [ { }, { } ],
        "datasourceId" : 12345,
        "overview" : { },
        "templateId" : 12345,
        "contentTagId" : 12345,
        "templateTagId" : 12345,
        "nodeId" : 12345,
        "partId" : 12345,
        "id" : 12345,
        "globalId" : "..."
      },
      "property2" : {
        "type" : "NODE",
        "stringValue" : "...",
        "booleanValue" : true,
        "fileId" : 12345,
        "imageId" : 12345,
        "folderId" : 12345,
        "pageId" : 12345,
        "formId" : 12345,
        "stringValues" : [ "...", "..." ],
        "options" : [ { }, { } ],
        "selectedOptions" : [ { }, { } ],
        "datasourceId" : 12345,
        "overview" : { },
        "templateId" : 12345,
        "contentTagId" : 12345,
        "templateTagId" : 12345,
        "nodeId" : 12345,
        "partId" : 12345,
        "id" : 12345,
        "globalId" : "..."
      }
    },
    "type" : "OBJECTTAG"
  } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/link/{id}

Link the given template to the given folders. For linking templates to folders, the user must have the following permissions:

  • edit the template (which includes viewing the template)
  • link templates to all target folders (which includes viewing folder and viewing templates in the folder)
If at least on of these permissions is not granted to the user, the method will fail.

Request Parameters
name type description
id path id of the template
Request Body
media type data type description
application/json LinkRequest (JSON) request containing the list of folders and other data
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) generic response

Example

Request
POST /template/link/{id}
Content-Type: application/json
Accept: application/json

                
{
  "recursive" : true,
  "folderIds" : [ "...", "..." ],
  "nodeId" : 12345,
  "delete" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /template/load/{id}

This method has been deprecated. Use GET /template/{id} instead

Load the template with the given id and return it.

Request Parameters
name type description constraints
id path The template id  
nodeId query channel id int
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TemplateLoadResponse (JSON)

Example

Request
GET /template/load/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/unlink/{id}

Unlink the given template from the given folders. For unlinking templates from folders, the user must have the following permissions:

  • edit the template (which includes viewing the template)
  • link templates to all target folders (which includes viewing folder and viewing templates in the folder)
If at least on of these permissions is not granted to the user, the method will fail.

Request Parameters
name type description
id path id of the template
Request Body
media type data type description
application/json LinkRequest (JSON) request containing the list of folders and other data
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) generic response

Example

Request
POST /template/unlink/{id}
Content-Type: application/json
Accept: application/json

                
{
  "recursive" : true,
  "folderIds" : [ "...", "..." ],
  "nodeId" : 12345,
  "delete" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/{id}/copy

Create a copy of the template

Request Parameters
name type description
id path template id
Request Body
media type data type description
application/json TemplateCopyRequest (JSON) copy request
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TemplateLoadResponse (JSON) response containing the generated copy

Example

Request
POST /template/{id}/copy
Content-Type: application/json
Accept: application/json

                
{
  "folderId" : 12345,
  "nodeId" : 12345
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "OBJECTTAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /template/{id}/folders

Get the folders to which the template is assigned.
The result can be filtered by

  • id
  • name
  • description
and sorted by
  • id
  • name
  • description

Request Parameters
name type description default constraints
id path template ID    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json PagedFolderListResponse (JSON) response containing a list of folders

Example

Request
GET /template/{id}/folders
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "inheritance", "updateitems" ],
    "property2" : [ "translatepages", "deleteform" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /template/{id}/nodes

Get the nodes to which the template is assigned.
The result can be filtered by

  • id
  • name
and sorted by
  • id
  • name

Request Parameters
name type description default constraints
id path template ID    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json NodeList (JSON) response containing a list of nodes

Example

Request
GET /template/{id}/nodes
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "deleteitems", "create" ],
    "property2" : [ "createtemplates", "createoverview" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /template/{id}/tag

Get the list of template tags for this template

Request Parameters
name type description default constraints
id path id of the template. The local or global id    
embed query Comma separated list of attributes that contain references to other objects, which shall be embedded into the returned objects.    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TagList (JSON) List of template tags

Example

Request
GET /template/{id}/tag
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "deletetemplates", "deleteitems" ],
    "property2" : [ "publishpages", "userassignment" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /template/{id}/tagstatus

Get the tag status for a template. The tag status will contain a list of all template tags, which are editable in pages together with the count of pages in sync, out of sync, incompatible or missing.
The result can be filtered by

  • name
and sorted by
  • name

Request Parameters
name type description default constraints
id path template ID    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TagStatusResponse (JSON) response

Example

Request
GET /template/{id}/tagstatus
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "translatepages", "deletetemplates" ],
    "property2" : [ "updatefolder", "setperm" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /template/{id}/unlock

Unlock a template

Request Parameters
name type description
id path template id (either local or global)
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TemplateLoadResponse (JSON) template load response

Example

Request
POST /template/{id}/unlock
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "template" : {
    "inheritedFrom" : "...",
    "masterNode" : "...",
    "id" : 12345,
    "globalId" : "...",
    "name" : "...",
    "description" : "...",
    "creator" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "cdate" : 12345,
    "editor" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "edate" : 12345,
    "locked" : true,
    "markupLanguage" : {
      "id" : 12345,
      "name" : "...",
      "extension" : "...",
      "contentType" : "...",
      "feature" : "...",
      "excludeFromPublishing" : true
    },
    "inherited" : true,
    "folderId" : 12345,
    "masterId" : 12345,
    "path" : "...",
    "templateTags" : {
      "property1" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      },
      "property2" : {
        "mandatory" : true,
        "editableInPage" : true,
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      }
    },
    "objectTags" : {
      "property1" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "TEMPLATETAG"
      },
      "property2" : {
        "id" : 12345,
        "name" : "...",
        "constructId" : 12345,
        "construct" : { },
        "active" : true,
        "properties" : {
          "property1" : { },
          "property2" : { }
        },
        "type" : "CONTENTTAG"
      }
    },
    "source" : "...",
    "channelSetId" : 12345,
    "channelId" : 12345,
    "master" : true
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}