Interface PageResource
- All Superinterfaces:
AuthenticatedResource
Resource used for loading, saving and manipulating GCN pages.
-
Method Summary
Modifier and TypeMethodDescriptionassign
(MultiPageAssignRequest request) Inform a list of users that the list of pages have been put back into revision.autocomplete
(String q, int limit) Do a quick search for pages that contain the given query string in their name or have it as ID.Cancel editing the page.copy
(PageCopyRequest request, long waitMs) Copy a batch of pages or a single copy using thePageCopyRequest
options.create
(PageCreateRequest request) Create a page based on the given pagecreaterequestcreateTag
(String id, Integer constructId, String keyword, ContentTagCreateRequest request) Create a new tag in the given pagecreateTags
(String id, MultiTagCreateRequest request) Create multiple tags in the given pageDelete the page denoted by id.deleteFromWastebin
(PageIdSetRequest request, long waitMs) Remove the given pages from the wastebindeleteFromWastebin
(String id, long waitMs) Remove the page denoted by the given id from the wastebin.javax.ws.rs.core.Response
diffVersions
(String id, Integer nodeId, int oldVersion, int newVersion, boolean source) Render the difference between two versions of the pagejavax.ws.rs.core.Response
diffWithOtherPage
(String id, Integer nodeId, int otherPageId, boolean source) Render the difference between the page and another pagegetLinkedFiles
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId) Get files, which are used by one of the given pagesgetLinkedImages
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId) Get images, which are used by one of the given pagesgetLinkedPages
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId) Get pages, which are used by one of the given pagesgetPagetagUsageInfo
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId, boolean returnPages, PageModelParameterBean pageModel) Get the pages containing pagetags pointing to one of the given pages.getPageUsageInfo
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId, boolean returnPages, PageModelParameterBean pageModel) Get the pages using one of the given pagesgetPrivileges
(Integer id) Get the privileges of the current user on the given pagegetTags
(Integer id, Integer skipCount, Integer maxItems, TagSortAttribute sortBy, SortOrder sortOrder, String search) Get the list of tags (contenttags and templatetags) for this pagegetTemplateUsageInfo
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId, boolean returnTemplates) Get the templates using one of the given pagesgetTotalPageUsage
(List<Integer> pageId, Integer nodeId) Get the total usage information of the given pages.getVariantsUsageInfo
(Integer skipCount, Integer maxItems, String sortBy, String sortOrder, List<Integer> pageId, Integer nodeId, boolean returnPages, PageModelParameterBean pageModel) Get the page variants of the given pageslist
(InFolderParameterBean inFolder, PageListParameterBean pageListParams, FilterParameterBean filterParams, SortParameterBean sortingParams, PagingParameterBean pagingParams, PublishableParameterBean publishParams, WastebinParameterBean wastebinParams) Get a list of pages in the specified folder.
The result can be filtered byid
name
fileName
description
niceUrl
alternateUrls
and sorted byid
name
fileName
niceUrl
alternateUrls
load
(MultiPageLoadRequest request, boolean fillWithNulls) Load a list of pages specified in the givenrequest
.load
(String id, boolean update, boolean template, boolean folder, boolean languageVariants, boolean pageVariants, boolean workflow, boolean translationStatus, boolean versionInfo, boolean disinherited, boolean construct, Integer nodeId, String stagingPackageName) Loads a page from GCN.move
(MultiObjectMoveRequest request) Move multiple pages to another foldermove
(String id, ObjectMoveRequest request) Move the given page to another folderpreview
(PagePreviewRequest request) Render given page in a preview (before actually saving it)publish
(Integer nodeId, MultiPagePublishRequest request) Publish a list of pages.publish
(String id, Integer nodeId, PagePublishRequest request) Publish the page denoted by id (or send it in the queue when the User has not permission to publish the page).Get all pages (for all nodes) in the publish queuepubqueueApprove
(MultiPubqueueApproveRequest request, long waitMs) Approved queued changes to online status of pagesrender
(Integer nodeId, String template, boolean editMode, String proxyprefix, LinksType linksType, boolean tagmap, boolean inherited, boolean publish, Page page) Render a preview of the posted pagerender
(String id, Integer nodeId, String template, boolean editMode, String proxyprefix, LinksType linksType, boolean tagmap, boolean inherited, boolean publish, Integer versionTimestamp) Render the given page Info: This currently doesn't return tag render errors.javax.ws.rs.core.Response
renderContent
(String id, Integer nodeId, Integer versionTimestamp) Render the content of the given page in preview modeRender a tag preview for the posted pageRender a tag of the given pagerestoreFromWastebin
(PageIdSetRequest request, long waitMs) Restore the given pages from the wastebinrestoreFromWastebin
(String id, long waitMs) Restore the given page from the wastebinrestoreTag
(String pageId, String tag, Integer versionTimestamp) Restore a single tag in the page with the given version timestamprestoreVersion
(String id, Integer versionTimestamp) Restore the page version with the given version timestampsave
(String id, PageSaveRequest request) Saves a page into GCNsearch
(boolean update, boolean template, boolean folder, boolean languageVariants, boolean pageVariants, boolean workflow, boolean translationStatus, boolean versionInfo, boolean disinherited, Integer nodeId, String liveUrl) NOTE: This endpoint is currently under construction and will be changed in the future.Suggest the filename to be used for a (new) page, based on other metadatatakeOffline
(String id, PageOfflineRequest request) Take a specific page offlineTranslate the page into the given language.workflowDecline
(String id, WorkflowRequest request) Decline the workflow for the page (i.e.Revoke the last step of the workflowMethods inherited from interface com.gentics.contentnode.rest.resource.AuthenticatedResource
setSessionId
-
Method Details
-
list
@GET PageListResponse list(@BeanParam InFolderParameterBean inFolder, @BeanParam PageListParameterBean pageListParams, @BeanParam FilterParameterBean filterParams, @BeanParam SortParameterBean sortingParams, @BeanParam PagingParameterBean pagingParams, @BeanParam PublishableParameterBean publishParams, @BeanParam WastebinParameterBean wastebinParams) Get a list of pages in the specified folder.
The result can be filtered byid
name
fileName
description
niceUrl
alternateUrls
id
name
fileName
niceUrl
alternateUrls
- Parameters:
inFolder
- Folder ID and recursive parameterspageListParams
- Further page parametersfilterParams
- Filter parameterssortingParams
- Sorting parameterspagingParams
- Paging parameterspublishParams
- Publishable parameterswastebinParams
- Wastebin parameters- Returns:
- A list of pages
-
create
Create a page based on the given pagecreaterequest- Parameters:
request
- containing data for creating the page- Returns:
- PageLoadResponse with the created page
-
copy
@POST @Path("/copy") PageCopyResponse copy(PageCopyRequest request, @QueryParam("wait") @DefaultValue("0") long waitMs) Copy a batch of pages or a single copy using thePageCopyRequest
options.- Parameters:
request
- Request containing data for the batch copywaitMs
- wait timeout in milliseconds- Returns:
- GenericResponse
-
move
@POST @Path("/move/{id}") GenericResponse move(@PathParam("id") String id, ObjectMoveRequest request) Move the given page to another folder- Parameters:
id
- page idrequest
- request- Returns:
- generic response
-
move
Move multiple pages to another folder- Parameters:
request
- request- Returns:
- generic response
-
save
Saves a page into GCN- Parameters:
id
- Id of the page to save. This can either be a local or global idrequest
- page save request- Returns:
- GenericResponse
-
load
@GET @Path("/load/{id}") PageLoadResponse load(@PathParam("id") String id, @DefaultValue("false") @QueryParam("update") boolean update, @QueryParam("template") @DefaultValue("false") boolean template, @QueryParam("folder") @DefaultValue("false") boolean folder, @QueryParam("langvars") @DefaultValue("false") boolean languageVariants, @QueryParam("pagevars") @DefaultValue("false") boolean pageVariants, @QueryParam("workflow") @DefaultValue("false") boolean workflow, @QueryParam("translationstatus") @DefaultValue("false") boolean translationStatus, @QueryParam("versioninfo") @DefaultValue("false") boolean versionInfo, @QueryParam("disinherited") @DefaultValue("false") boolean disinherited, @QueryParam("construct") @DefaultValue("false") boolean construct, @QueryParam("nodeId") Integer nodeId, @QueryParam("package") String stagingPackageName) Loads a page from GCN. For now this page only contains meta data about the page and no contents. When using loading pages, it is important to note that the returned tag data may be loaded differently depending on whether or not the page is loaded for editing ("update" flag is set to true). Loading a page with the update flag set to false allows you to load the page without causing it to be locked for editing, but it means that any tags which have not been filled will be loaded without all their tag parts. Tags that have not been filled, and that do not have default values will be loaded with empty properties in this case. On the other hand, when loading pages for editing, any tags that have no been filled, will have their constituents part auto-generated. Consequently, when loading pages via the REST-API or GCNJSAPI, setting the update flag to true will cause all tags to be loaded with all parts data (auto-generated if necessary), whereas when loading a page with update set to false, any tags which have not had their parts filled will be loaded without their parts data.- Parameters:
id
- The id of the page to load. This can either be a localid or a globalidupdate
- true when the page shall be locked, false if nottemplate
- true if the template information shall be addedfolder
- true if the folder information shall be addedlanguageVariants
- true if the language variants shall be addedworkflow
- true if the workflow information shall be addedtranslationStatus
- true if the translationstatus information shall be addedversionInfo
- true if version information shall be addeddisinherited
- if true, disinherited channel nodes shall be addedconstruct
- if true, the construct info will be added to tagsnodeId
- channel idstagingPackageName
- name of a content staging package, to check the page status in it- Returns:
- PageLoadResponse Response with the loaded page
-
load
@POST @Path("/load") MultiPageLoadResponse load(MultiPageLoadRequest request, @QueryParam("fillWithNulls") @DefaultValue("false") boolean fillWithNulls) Load a list of pages specified in the givenrequest
. Page ids for which no pages exist, or the user does not have the necessary permissions, are silently ignored.- Parameters:
request
- The request with he list of page ids to load.fillWithNulls
- flag to have items, which cannot be loaded returned as "null" objects in the response (instead of just omitting them)- Returns:
- The list of found pages, for which the user has enough permissions.
-
preview
Render given page in a preview (before actually saving it)- Returns:
- preview of the page
- Throws:
NodeException
-
assign
Inform a list of users that the list of pages have been put back into revision.- Parameters:
request
-- Returns:
- response
-
publish
@POST @Path("/publish") GenericResponse publish(@QueryParam("nodeId") Integer nodeId, MultiPagePublishRequest request) Publish a list of pages. Instant publishing will not be done, when using this method.- Parameters:
nodeId
- channel idrequest
- publish request- Returns:
- response object
-
publish
@POST @Path("/publish/{id}") GenericResponse publish(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId, PagePublishRequest request) Publish the page denoted by id (or send it in the queue when the User has not permission to publish the page). If the page is published and the node publishes into a contentrepository with instant publishing, the page will immediately be written into the contentrepository- Parameters:
id
- id of the Page to publish. This can either be a local or globalidnodeId
- channel idrequest
- publish page request- Returns:
- response object
-
delete
@POST @Path("/delete/{id}") GenericResponse delete(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId, @QueryParam("noSync") Boolean noCrSync) Delete the page denoted by id. Note that inherited or localized pages can't be deleted in a channel. However you can delete an inherited page in the master and unlocalize a localized page.- Parameters:
id
- id of the Page to delete. This can either be a local or global idnodeId
- channel idnoCrSync
- don't sync the deletion with the content repo- Returns:
- response object
-
deleteFromWastebin
@POST @Path("/wastebin/delete/{id}") GenericResponse deleteFromWastebin(@PathParam("id") String id, @QueryParam("wait") @DefaultValue("0") long waitMs) Remove the page denoted by the given id from the wastebin.- Parameters:
id
- id of the page to remove from the wastebin. This can either be a local or global idwaitMs
- time in ms for the request to be done in foreground- Returns:
- response object
-
deleteFromWastebin
@POST @Path("/wastebin/delete") GenericResponse deleteFromWastebin(PageIdSetRequest request, @QueryParam("wait") @DefaultValue("0") long waitMs) Remove the given pages from the wastebin- Parameters:
request
- request containing the page IDswaitMs
- time in ms for the request to be done in foreground- Returns:
- response object
-
restoreFromWastebin
@POST @Path("/wastebin/restore/{id}") GenericResponse restoreFromWastebin(@PathParam("id") String id, @QueryParam("wait") @DefaultValue("0") long waitMs) Restore the given page from the wastebin- Parameters:
id
- id of the page to restore from the wastebin. This can either be a local or global idwaitMs
- time in ms for the request to be done in foreground- Returns:
- response object
-
restoreFromWastebin
@POST @Path("/wastebin/restore") GenericResponse restoreFromWastebin(PageIdSetRequest request, @QueryParam("wait") @DefaultValue("0") long waitMs) Restore the given pages from the wastebin- Parameters:
request
- request containing the page IDswaitMs
- time in ms for the request to be done in foreground- Returns:
- response object
-
cancel
@POST @Path("/cancel/{id}") GenericResponse cancel(@PathParam("id") Integer id, @QueryParam("nodeId") Integer nodeId) Cancel editing the page. The page will be rolled back to the last version (changes made since the last version will be lost). The edit lock on the page will be raised, so that other users may edit the page.- Parameters:
id
- id of the Page which is currently editednodeId
- channel id- Returns:
- response object
-
render
@POST @Path("/render") PageRenderResponse render(@QueryParam("nodeId") Integer nodeId, @QueryParam("template") String template, @QueryParam("edit") @DefaultValue("false") boolean editMode, @QueryParam("proxyprefix") String proxyprefix, @QueryParam("links") @DefaultValue("backend") LinksType linksType, @QueryParam("tagmap") @DefaultValue("false") boolean tagmap, @QueryParam("inherited") @DefaultValue("false") boolean inherited, @QueryParam("publish") @DefaultValue("false") boolean publish, Page page) Render a preview of the posted page- Parameters:
nodeId
- node id (if rendering a page for a channel)template
- template to render (if not set, the page's template will be rendered)editMode
- true for rendering in edit mode, false for preview modeproxyprefix
- proxyprefixlinksType
- type of links (frontend or backend)tagmap
- true to also render the tagmap entriesinherited
- true to render the inherited content and propertiespublish
- True to render in publish mode- Returns:
- response containing the rendered page and other important information
-
render
@GET @Path("/render/{id}") PageRenderResponse render(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId, @QueryParam("template") String template, @QueryParam("edit") @DefaultValue("false") boolean editMode, @QueryParam("proxyprefix") String proxyprefix, @QueryParam("links") @DefaultValue("backend") LinksType linksType, @QueryParam("tagmap") @DefaultValue("false") boolean tagmap, @QueryParam("inherited") @DefaultValue("false") boolean inherited, @QueryParam("publish") @DefaultValue("false") boolean publish, @QueryParam("version") Integer versionTimestamp) Render the given page Info: This currently doesn't return tag render errors.- Parameters:
id
- id of the pagenodeId
- node id (if rendering a page for a channel)template
- template to render (if not set, the page's template will be rendered)editMode
- true for rendering in edit mode, false for preview modeproxyprefix
- proxyprefixlinksType
- type of links (frontend or backend)tagmap
- true to also render the tagmap entriesinherited
- true to render the inherited content and propertiespublish
- True to render in publish modeversionTimestamp
- optional version timestamp for rendering a version of the page- Returns:
- response containing the rendered page and other important information
-
renderContent
@GET @Path("/render/content/{id}") javax.ws.rs.core.Response renderContent(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId, @QueryParam("version") Integer versionTimestamp) Render the content of the given page in preview mode- Parameters:
id
- page IDnodeId
- optional node IDversionTimestamp
- optional version timestamp for rendering a version of the page- Returns:
- page content response
-
diffVersions
@GET @Path("/diff/versions/{id}") javax.ws.rs.core.Response diffVersions(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId, @QueryParam("old") @DefaultValue("0") int oldVersion, @QueryParam("new") @DefaultValue("0") int newVersion, @QueryParam("source") @DefaultValue("false") boolean source) Render the difference between two versions of the page- Parameters:
id
- page IDnodeId
- optional node IDoldVersion
- old page versionnewVersion
- new page versionsource
- true to show the diff in the source code, otherwise the diff is shown in the html- Returns:
- page content response
-
diffWithOtherPage
@GET @Path("/diff/{id}") javax.ws.rs.core.Response diffWithOtherPage(@PathParam("id") String id, @QueryParam("nodeId") Integer nodeId, @QueryParam("otherPageId") @DefaultValue("0") int otherPageId, @QueryParam("source") @DefaultValue("false") boolean source) Render the difference between the page and another page- Parameters:
id
- page IDnodeId
- optional node IDotherPageId
- ID of the other pagesource
- true to show the diff in the source code, otherwise the diff is shown in the html- Returns:
- page content response
-
renderTag
@POST @Path("/renderTag/{tag}") PageRenderResponse renderTag(@PathParam("tag") String tag, @QueryParam("nodeId") Integer nodeId, @QueryParam("proxyprefix") String proxyprefix, @QueryParam("links") @DefaultValue("backend") LinksType linksType, Page page) Render a tag preview for the posted page- Parameters:
tag
- name of the tag to rendernodeId
- node id (if rendering a page for a channel)proxyprefix
- proxyprefixlinksType
- type of links (frontend or backend)page
- posted page- Returns:
- response containing the rendered tag and other important information
-
renderTag
@GET @Path("/renderTag/{id}/{tag}") PageRenderResponse renderTag(@PathParam("id") String id, @PathParam("tag") String tag, @QueryParam("nodeId") Integer nodeId, @QueryParam("proxyprefix") String proxyprefix, @QueryParam("links") @DefaultValue("backend") LinksType linksType) Render a tag of the given page- Parameters:
id
- id of the pagetag
- name of the tag to rendernodeId
- node id (if rendering a page for a channel)proxyprefix
- proxyprefixlinksType
- type of links (frontend or backend)- Returns:
- response containing the rendered tag and other important information
-
getTags
@GET @Path("/getTags/{id}") TagListResponse getTags(@PathParam("id") Integer id, @QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") TagSortAttribute sortBy, @QueryParam("sortorder") @DefaultValue("asc") SortOrder sortOrder, @QueryParam("search") String search) Get the list of tags (contenttags and templatetags) for this page- Parameters:
id
- id of the page- Returns:
- response object
-
getPrivileges
Get the privileges of the current user on the given page- Parameters:
id
- id of the page- Returns:
- privileges response
-
createTag
@POST @Path("/newtag/{id}") TagCreateResponse createTag(@PathParam("id") String id, @QueryParam("constructId") Integer constructId, @QueryParam("keyword") String keyword, ContentTagCreateRequest request) Create a new tag in the given page- Parameters:
id
- id of the page. This can either be a local or globalidconstructId
- id of the tags constructkeyword
- keyword of the constructrequest
- tag create request- Returns:
- response containing the rendered tag
-
createTags
@POST @Path("/newtags/{id}") MultiTagCreateResponse createTags(@PathParam("id") String id, MultiTagCreateRequest request) Create multiple tags in the given page- Parameters:
id
- id of the pagerequest
- tag create request- Returns:
- response containing the created tags
-
restoreVersion
@POST @Path("/restore/{id}") PageLoadResponse restoreVersion(@PathParam("id") String id, @QueryParam("version") Integer versionTimestamp) Restore the page version with the given version timestamp- Parameters:
id
- The id of the page that should be restored. This can either be a local or globalidversionTimestamp
- version timestamp
-
restoreTag
@POST @Path("/restore/{pageid}/{tag}") TagListResponse restoreTag(@PathParam("pageid") String pageId, @PathParam("tag") String tag, @QueryParam("version") Integer versionTimestamp) Restore a single tag in the page with the given version timestamp- Parameters:
pageId
- id of the page. This can either be a local or globalidtag
- id or name of the tagversionTimestamp
- version timestamp- Returns:
- restored tag
-
translate
@POST @Path("/translate/{id}") PageLoadResponse translate(@PathParam("id") Integer id, @QueryParam("language") String languageCode, @QueryParam("locked") @DefaultValue("true") boolean locked, @QueryParam("channelId") Integer channelId) Translate the page into the given language. When the language variant of the page exists, it is just locked and returned, otherwise the page is copied into the language variant and returned. This method fails, if the requested language is not available for the node of the page or the user has no permission to create/edit the given language variant- Parameters:
id
- id of the page to translatelanguageCode
- code of the language into which the page shall be translatedlocked
- true if the translation shall be locked, false if notchannelId
- for multichannelling, specify channel in which to create page (can be 0 or equal to node ID to be ignored)- Returns:
- page load response
-
workflowRevoke
Revoke the last step of the workflow- Parameters:
id
- id of the page- Returns:
- generic response
-
workflowDecline
@POST @Path("/workflow/decline/{id}") GenericResponse workflowDecline(@PathParam("id") String id, WorkflowRequest request) Decline the workflow for the page (i.e. give it back to a lower group)- Parameters:
id
- id of the page. This can either be a local or globalidrequest
- request object containing what should be changed about the workflow- Returns:
- generic response
-
getTotalPageUsage
@GET @Path("/usage/total") TotalUsageResponse getTotalPageUsage(@QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId) Get the total usage information of the given pages.- Parameters:
pageId
- list of page idsnodeId
- id of the node- Returns:
- Total usage response
-
getPagetagUsageInfo
@GET @Path("/usage/tag") PageUsageListResponse getPagetagUsageInfo(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId, @QueryParam("pages") @DefaultValue("true") boolean returnPages, @BeanParam PageModelParameterBean pageModel) Get the pages containing pagetags pointing to one of the given pages.- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page idsnodeId
- id of the nodereturnPages
- true (default) if the pages shall be returned, false for only returning the countspageModel
- page model parameters- Returns:
- list of pages
-
getVariantsUsageInfo
@GET @Path("/usage/variant") PageUsageListResponse getVariantsUsageInfo(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId, @QueryParam("pages") @DefaultValue("true") boolean returnPages, @BeanParam PageModelParameterBean pageModel) Get the page variants of the given pages- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page idsnodeId
- id of the nodereturnPages
- true (default) if the pages shall be returned, false for only returning the countspageModel
- page model parameters- Returns:
- list of page variants
-
getPageUsageInfo
@GET @Path("/usage/page") PageUsageListResponse getPageUsageInfo(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId, @QueryParam("pages") @DefaultValue("true") boolean returnPages, @BeanParam PageModelParameterBean pageModel) Get the pages using one of the given pages- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page ids, for which the usage shall be fetchednodeId
- id of the nodereturnPages
- true (default) if the pages shall be returned, false for only returning the countspageModel
- page model parameters- Returns:
- list of pages using the given pages
-
getTemplateUsageInfo
@GET @Path("/usage/template") TemplateUsageListResponse getTemplateUsageInfo(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId, @QueryParam("templates") @DefaultValue("true") boolean returnTemplates) Get the templates using one of the given pages- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page ids, for which the usage shall be fetchednodeId
- id of the nodereturnTemplates
- true (default) if the templates shall be returned, false for only returning the counts- Returns:
- response
-
getLinkedPages
@GET @Path("/usage/linkedPage") ReferencedPagesListResponse getLinkedPages(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId) Get pages, which are used by one of the given pages- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page ids, for which the usage shall be fetchednodeId
- id of the node- Returns:
- response
-
getLinkedFiles
@GET @Path("/usage/linkedFile") ReferencedFilesListResponse getLinkedFiles(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId) Get files, which are used by one of the given pages- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page ids, for which the usage shall be fetchednodeId
- id of the node- Returns:
- response
-
getLinkedImages
@GET @Path("/usage/linkedImage") ReferencedFilesListResponse getLinkedImages(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder, @QueryParam("id") List<Integer> pageId, @QueryParam("nodeId") Integer nodeId) Get images, which are used by one of the given pages- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssortBy
- (optional) attribute to sort by. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".pageId
- list of page ids, for which the usage shall be fetchednodeId
- id of the node- Returns:
- response
-
takeOffline
@POST @Path("/takeOffline/{id}") GenericResponse takeOffline(@PathParam("id") String id, PageOfflineRequest request) Take a specific page offline- Parameters:
id
- ID of the page- Returns:
- Generic response
-
autocomplete
@GET @Path("/autocomplete") @Produces("text/html") String autocomplete(@QueryParam("q") String q, @QueryParam("limit") int limit) Do a quick search for pages that contain the given query string in their name or have it as ID. Return an html representation of the page list, sorted by node name, folder name and page name.- Parameters:
q
- query string, must contain at least three characters (otherwise an empty result is returned).limit
- maximum number of results returned. Default is 15- Returns:
- html representation of matching pages
-
search
@GET @Path("/search") PageLoadResponse search(@DefaultValue("false") @QueryParam("update") boolean update, @QueryParam("template") @DefaultValue("false") boolean template, @QueryParam("folder") @DefaultValue("false") boolean folder, @QueryParam("langvars") @DefaultValue("false") boolean languageVariants, @QueryParam("pagevars") @DefaultValue("false") boolean pageVariants, @QueryParam("workflow") @DefaultValue("false") boolean workflow, @QueryParam("translationstatus") @DefaultValue("false") boolean translationStatus, @QueryParam("versioninfo") @DefaultValue("false") boolean versionInfo, @QueryParam("disinherited") @DefaultValue("false") boolean disinherited, @QueryParam("nodeId") Integer nodeId, @QueryParam("liveUrl") String liveUrl) NOTE: This endpoint is currently under construction and will be changed in the future. Load a page with which resolves to the given liveUrl Please note that the page can only be resolved to a liveUrl if the was already published once. The resolving of liveUrls is always coupled to the publish state of the page. Local changes which have not been published will not be incorporated in the resolving process. Loads a page from GCN. For now this page only contains meta data about the page and no contents. When using loading pages, it is important to note that the returned tag data may be loaded differently depending on whether or not the page is loaded for editing ("update" flag is set to true). Loading a page with the update flag set to false allows you to load the page without causing it to be locked for editing, but it means that any tags which have not been filled will be loaded without all their tag parts. Tags that have not been filled, and that do not have default values will be loaded with empty properties in this case. On the other hand, when loading pages for editing, any tags that have no been filled, will have their constituents part auto-generated. Consequently, when loading pages via the REST-API or GCNJSAPI, setting the update flag to true will cause all tags to be loaded with all parts data (auto-generated if necessary), whereas when loading a page with update set to false, any tags which have not had their parts filled will be loaded without their parts data.- Parameters:
update
- true when the page shall be locked, false if nottemplate
- true if the template information shall be addedfolder
- true if the folder information shall be addedlanguageVariants
- true if the language variants shall be addedworkflow
- true if the workflow information shall be addedtranslationStatus
- true if the translationstatus information shall be addedversionInfo
- true if version information shall be addeddisinherited
- if true, disinherited channel nodes shall be addednodeId
- Optional channel id which can be specified to restrict search to a specific channel. Adding the channel id will speed up the search process.liveUrl
- Live url to search for. (e.g.: hostname.tld/folderA/index.html)- Returns:
- PageLoadResponse Response with the loaded page
-
pubqueue
@GET @Path("/pubqueue") LegacyPageListResponse pubqueue(@QueryParam("skipCount") @DefaultValue("0") Integer skipCount, @QueryParam("maxItems") @DefaultValue("-1") Integer maxItems, @QueryParam("search") String search, @QueryParam("sortby") @DefaultValue("name") String sortBy, @QueryParam("sortorder") @DefaultValue("asc") String sortOrder) Get all pages (for all nodes) in the publish queue- Parameters:
skipCount
- number of items to be skipped, set to 0 for skipping no itemsmaxItems
- maximum number of items to be returned, set to -1 for returning all itemssearch
- (optional) search string (may be empty for no search) - this will filter the results if either the ID, the name (partial match or the description (partial match) matches the given search string.sortBy
- (optional) attribute to sort by. It is possible to sort by name, cdate, edate, pdate, filename, template, folder, masterNode, priority, excluded, deletedat. defaults to namesortOrder
- (optional) result sort order - may be "asc" for ascending or "desc" for descending other strings will be ignored. defaults to "asc".- Returns:
- list of pages in the publish queue
-
pubqueueApprove
@POST @Path("/pubqueue/approve") GenericResponse pubqueueApprove(MultiPubqueueApproveRequest request, @QueryParam("wait") @DefaultValue("0") long waitMs) throws Exception Approved queued changes to online status of pages- Parameters:
request
- request containing page IDswaitMs
- wait timeout in milliseconds- Returns:
- generic response
- Throws:
Exception
-
suggestFilename
@POST @Path("/suggest/filename") PageFilenameSuggestResponse suggestFilename(PageFilenameSuggestRequest request) throws Exception Suggest the filename to be used for a (new) page, based on other metadata- Parameters:
request
- request- Returns:
- response
- Throws:
Exception
-