Interface ContentStagingResource
@Path("/content")
public interface ContentStagingResource
Content Staging REST API
-
Method Summary
Modifier and TypeMethodDescriptionAdd an entity, keeping its folder path, to the package of a given name.create
(StagedContentPackage model) Create new package.com.gentics.contentnode.rest.model.response.GenericResponse
Delete the package with the given namejakarta.ws.rs.core.Response
Download the package of the given name as ZIP archive.com.gentics.contentnode.rest.model.response.GenericResponse
exportFromCms
(String name, long waitMs) Export the CMS entities, contained in the package with the given name, into the package, i.e.folderList
(String name, List<jakarta.ws.rs.core.PathSegment> segments, String filter) List the contents of a given folder of a package of the given name.jakarta.ws.rs.core.Response
getImportErrors
(String name) Retrieve a list of import errorscom.gentics.contentnode.rest.model.response.GenericResponse
importIntoCms
(String name, long waitMs, boolean isTest) Import the entities of a package of given name into CMS.list
(com.gentics.contentnode.rest.resource.parameter.FilterParameterBean filterParams, com.gentics.contentnode.rest.resource.parameter.SortParameterBean sortingParams, com.gentics.contentnode.rest.resource.parameter.PagingParameterBean pagingParams) Get packages list.
The result can be filtered byname
description
and sorted byname
description
nodes
pages
folders
files
images
Get the package by its nameRemove an entity from the package of a given name.Check the staging package inclusion package for the bulk of various types.update
(String name, StagedContentPackage model) Update the package with the given name.Upload the package of the given name in the form of ZIP archive.
-
Method Details
-
list
@GET @Path("/package") ContentPackageListResponse list(@BeanParam com.gentics.contentnode.rest.resource.parameter.FilterParameterBean filterParams, @BeanParam com.gentics.contentnode.rest.resource.parameter.SortParameterBean sortingParams, @BeanParam com.gentics.contentnode.rest.resource.parameter.PagingParameterBean pagingParams) throws Exception Get packages list.
The result can be filtered byname
description
name
description
nodes
pages
folders
files
images
- Parameters:
filterParams
- filter parameterssortingParams
- sorting parameterspagingParams
- paging parameters- Returns:
- list of packages
- Throws:
Exception
-
create
@PUT @Path("/package") ContentPackageLoadResponse create(StagedContentPackage model) throws Exception Create new package.- Parameters:
model
- package model- Returns:
- created package
- Throws:
Exception
-
read
@GET @Path("/package/{name}") ContentPackageLoadResponse read(@PathParam("name") String name) throws Exception Get the package by its name- Parameters:
name
- package name- Returns:
- response
- Throws:
Exception
-
update
@POST @Path("/package/{name}") ContentPackageLoadResponse update(@PathParam("name") String name, StagedContentPackage model) throws Exception Update the package with the given name.- Parameters:
name
- package namemodel
- model for updating- Returns:
- updated package
- Throws:
Exception
-
delete
@DELETE @Path("/package/{name}") com.gentics.contentnode.rest.model.response.GenericResponse delete(@PathParam("name") String name) throws Exception Delete the package with the given name- Parameters:
name
- package name- Returns:
- response
- Throws:
Exception
-
add
@PUT @Path("/package/{name}/{type}/{uuid}") ContentPackageLoadResponse add(@PathParam("name") String name, @PathParam("type") String objectType, @PathParam("uuid") String objectUuid, @QueryParam("recursive") @DefaultValue("false") boolean recursive) throws Exception Add an entity, keeping its folder path, to the package of a given name.- Parameters:
name
- package nameobjectType
- Type of the object to add. supported values are: node, file, image, folder, page, formobjectUuid
- Global ID of the object to addrecursive
- Should the contained objects be added recursively. Applicable to the folders only.- Returns:
- the package status after the add.
- Throws:
Exception
-
remove
@DELETE @Path("/package/{name}/{type}/{uuid}") ContentPackageLoadResponse remove(@PathParam("name") String name, @PathParam("type") String objectType, @PathParam("uuid") String objectUuid) throws Exception Remove an entity from the package of a given name.- Parameters:
name
- package nameobjectType
- Type of the object to remove. supported values are: node, file, image, folder, page, formobjectUuid
- Global ID of the object to remove- Returns:
- the package status after the removal.
- Throws:
Exception
-
download
@GET @Path("/package/{name}/zip") @Produces("application/zip") jakarta.ws.rs.core.Response download(@PathParam("name") String name) throws Exception Download the package of the given name as ZIP archive.- Parameters:
name
- package name- Returns:
- download response
- Throws:
Exception
-
upload
@POST @Path("/package/{name}/zip") @Consumes("multipart/form-data") ContentPackageLoadResponse upload(@PathParam("name") String name, org.glassfish.jersey.media.multipart.FormDataMultiPart multiPart) throws Exception Upload the package of the given name in the form of ZIP archive.- Parameters:
name
- package namemultiPart
-- Returns:
- package response
- Throws:
Exception
-
getImportErrors
@GET @Path("/package/{name}/import/errors") jakarta.ws.rs.core.Response getImportErrors(@PathParam("name") String name) throws Exception Retrieve a list of import errors- Parameters:
name
- package name- Returns:
- response containing the error list
- Throws:
Exception
-
importIntoCms
@POST @Path("/package/{name}/import") com.gentics.contentnode.rest.model.response.GenericResponse importIntoCms(@PathParam("name") String name, @QueryParam("wait") @DefaultValue("0") long waitMs, @QueryParam("test") @DefaultValue("false") boolean isTest) throws Exception Import the entities of a package of given name into CMS.- Parameters:
name
- package namewaitMs
- wait timeout in ms. When set to 0, response will be sent, when the action completesisTest
- do not make an actual import, but test instead if the package can be imported.- Returns:
- response
- Throws:
Exception
-
exportFromCms
@POST @Path("/package/{name}/export") com.gentics.contentnode.rest.model.response.GenericResponse exportFromCms(@PathParam("name") String name, @QueryParam("wait") @DefaultValue("0") long waitMs) throws Exception Export the CMS entities, contained in the package with the given name, into the package, i.e. make a package sync.- Parameters:
name
- package namewaitMs
- wait timeout in ms. When set to 0, response will be sent, when the action completes- Returns:
- response
- Throws:
Exception
-
status
@POST @Path("/package/{name}/status") StagingStatusResponse status(String name, com.gentics.contentnode.rest.model.request.IdTypeMapRequest request) throws Exception Check the staging package inclusion package for the bulk of various types.- Parameters:
name
- package namerequest
- request- Returns:
- staging status response
- Throws:
NodeException
Exception
-
folderList
@GET @Path("/package/{name}/list/{pathSegments: .*}") ContentPackageFolderResponse folderList(@PathParam("name") String name, @PathParam("pathSegments") List<jakarta.ws.rs.core.PathSegment> segments, @QueryParam("filter") String filter) throws Exception List the contents of a given folder of a package of the given name.- Parameters:
name
- package namesegments
- folder pathfilter
- filter the results- Returns:
- download response
- Throws:
Exception
-