ContentStagingResource Resource

Content Staging REST API

GET /content/package

Get packages list.

Request Parameters
name type description default constraints
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 Body
media type data type description
application/json ContentPackageListResponse (JSON) list of packages

Example

Request
GET /content/package
Content-Type: */*
Accept: application/json

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

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

PUT /content/package

Create new package.

Request Body
media type data type description
application/json StagedContentPackage (JSON) package model
Response Body
media type data type description
application/json ContentPackageLoadResponse (JSON) created package

Example

Request
PUT /content/package
Content-Type: application/json
Accept: application/json

                
{
  "forms" : 12345,
  "files" : 12345,
  "pages" : 12345,
  "folders" : 12345,
  "images" : 12345,
  "nodes" : 12345,
  "channels" : 12345,
  "name" : "...",
  "description" : "...",
  "timestamp" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "contentPackage" : {
    "forms" : 12345,
    "files" : 12345,
    "pages" : 12345,
    "folders" : 12345,
    "images" : 12345,
    "nodes" : 12345,
    "channels" : 12345,
    "name" : "...",
    "description" : "...",
    "timestamp" : 12345
  },
  "import" : {
    "running" : true,
    "progress" : {
      "done" : 12345,
      "total" : 12345,
      "started" : 12345,
      "finished" : 12345
    },
    "messages" : [ { }, { } ],
    "responseInfo" : {
      "responseCode" : "OK",
      "responseMessage" : "...",
      "property" : "..."
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /content/package/{name}

Delete the package with the given name

Request Parameters
name type description
name path package name
Response Body
media type data type description
application/json GenericResponse (JSON) response

Example

Request
DELETE /content/package/{name}
Content-Type: */*
Accept: application/json

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

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

GET /content/package/{name}

Get the package by its name

Request Parameters
name type description
name path package name
Response Body
media type data type description
application/json ContentPackageLoadResponse (JSON) response

Example

Request
GET /content/package/{name}
Content-Type: */*
Accept: application/json

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

                
{
  "contentPackage" : {
    "forms" : 12345,
    "files" : 12345,
    "pages" : 12345,
    "folders" : 12345,
    "images" : 12345,
    "nodes" : 12345,
    "channels" : 12345,
    "name" : "...",
    "description" : "...",
    "timestamp" : 12345
  },
  "import" : {
    "running" : true,
    "progress" : {
      "done" : 12345,
      "total" : 12345,
      "started" : 12345,
      "finished" : 12345
    },
    "messages" : [ { }, { } ],
    "responseInfo" : {
      "responseCode" : "OK",
      "responseMessage" : "...",
      "property" : "..."
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /content/package/{name}

Update the package with the given name.

Request Parameters
name type description
name path package name
Request Body
media type data type description
application/json StagedContentPackage (JSON) model for updating
Response Body
media type data type description
application/json ContentPackageLoadResponse (JSON) updated package

Example

Request
POST /content/package/{name}
Content-Type: application/json
Accept: application/json

                
{
  "forms" : 12345,
  "files" : 12345,
  "pages" : 12345,
  "folders" : 12345,
  "images" : 12345,
  "nodes" : 12345,
  "channels" : 12345,
  "name" : "...",
  "description" : "...",
  "timestamp" : 12345
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "contentPackage" : {
    "forms" : 12345,
    "files" : 12345,
    "pages" : 12345,
    "folders" : 12345,
    "images" : 12345,
    "nodes" : 12345,
    "channels" : 12345,
    "name" : "...",
    "description" : "...",
    "timestamp" : 12345
  },
  "import" : {
    "running" : true,
    "progress" : {
      "done" : 12345,
      "total" : 12345,
      "started" : 12345,
      "finished" : 12345
    },
    "messages" : [ { }, { } ],
    "responseInfo" : {
      "responseCode" : "OK",
      "responseMessage" : "...",
      "property" : "..."
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /content/package/{name}/export

Export the CMS entities, contained in the package with the given name, into the package, i.e. make a package sync.

Request Parameters
name type description default constraints
name path package name    
wait query wait timeout in ms. When set to 0, response will be sent, when the action completes 0 long
Response Body
media type data type description
application/json GenericResponse (JSON) response

Example

Request
POST /content/package/{name}/export
Content-Type: */*
Accept: application/json

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

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

POST /content/package/{name}/import

Import the entities of a package of given name into CMS.

Request Parameters
name type description default constraints
name path package name    
wait query wait timeout in ms. When set to 0, response will be sent, when the action completes 0 long
Response Body
media type data type description
application/json GenericResponse (JSON) response

Example

Request
POST /content/package/{name}/import
Content-Type: */*
Accept: application/json

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

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

POST /content/package/{name}/status

Check the staging package inclusion package for the bulk of various types.

Request Body
media type data type description
application/json IdTypeMapRequest (JSON) request
Response Body
media type data type description
application/json StagingStatusResponse (JSON) staging status response

Example

Request
POST /content/package/{name}/status
Content-Type: application/json
Accept: application/json

                
{
  "languageVariants" : true,
  "ids" : {
    "property1" : [ "...", "..." ],
    "property2" : [ "...", "..." ]
  }
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /content/package/{name}/zip

Download the package of the given name as ZIP archive.

Request Parameters
name type description
name path package name
Response Body
media type data type description
application/zip object download response

Example

Request
GET /content/package/{name}/zip
Content-Type: */*
Accept: application/zip

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

                
...
                
              

POST /content/package/{name}/zip

Upload the package of the given name in the form of ZIP archive.

Request Parameters
name type description
name path package name
Request Body
media type data type
multipart/form-data object
Response Body
media type data type description
application/json ContentPackageLoadResponse (JSON) package response

Example

Request
POST /content/package/{name}/zip
Content-Type: multipart/form-data
Accept: application/json

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

                
{
  "contentPackage" : {
    "forms" : 12345,
    "files" : 12345,
    "pages" : 12345,
    "folders" : 12345,
    "images" : 12345,
    "nodes" : 12345,
    "channels" : 12345,
    "name" : "...",
    "description" : "...",
    "timestamp" : 12345
  },
  "import" : {
    "running" : true,
    "progress" : {
      "done" : 12345,
      "total" : 12345,
      "started" : 12345,
      "finished" : 12345
    },
    "messages" : [ { }, { } ],
    "responseInfo" : {
      "responseCode" : "OK",
      "responseMessage" : "...",
      "property" : "..."
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /content/package/{name}/{type}/{uuid}

Remove an entity from the package of a given name.

Request Parameters
name type description
name path package name
type path Type of the object to remove. supported values are: node, file, image, folder, page, form
uuid path Global ID of the object to remove
Response Body
media type data type description
application/json ContentPackageLoadResponse (JSON) the package status after the removal.

Example

Request
DELETE /content/package/{name}/{type}/{uuid}
Content-Type: */*
Accept: application/json

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

                
{
  "contentPackage" : {
    "forms" : 12345,
    "files" : 12345,
    "pages" : 12345,
    "folders" : 12345,
    "images" : 12345,
    "nodes" : 12345,
    "channels" : 12345,
    "name" : "...",
    "description" : "...",
    "timestamp" : 12345
  },
  "import" : {
    "running" : true,
    "progress" : {
      "done" : 12345,
      "total" : 12345,
      "started" : 12345,
      "finished" : 12345
    },
    "messages" : [ { }, { } ],
    "responseInfo" : {
      "responseCode" : "OK",
      "responseMessage" : "...",
      "property" : "..."
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /content/package/{name}/{type}/{uuid}

Add an entity, keeping its folder path, to the package of a given name.

Request Parameters
name type description default constraints
name path package name    
type path Type of the object to add. supported values are: node, file, image, folder, page, form    
uuid path Global ID of the object to add    
recursive query Should the contained objects be added recursively. Applicable to the folders only. false boolean
Response Body
media type data type description
application/json ContentPackageLoadResponse (JSON) the package status after the add.

Example

Request
PUT /content/package/{name}/{type}/{uuid}
Content-Type: */*
Accept: application/json

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

                
{
  "contentPackage" : {
    "forms" : 12345,
    "files" : 12345,
    "pages" : 12345,
    "folders" : 12345,
    "images" : 12345,
    "nodes" : 12345,
    "channels" : 12345,
    "name" : "...",
    "description" : "...",
    "timestamp" : 12345
  },
  "import" : {
    "running" : true,
    "progress" : {
      "done" : 12345,
      "total" : 12345,
      "started" : 12345,
      "finished" : 12345
    },
    "messages" : [ { }, { } ],
    "responseInfo" : {
      "responseCode" : "OK",
      "responseMessage" : "...",
      "property" : "..."
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}