FileResource

Resource for loading and manipulating Files in GCN

The following resources are applicable:

/file/content/load/{id}

Mount Point: /CNPortletapp/rest/file/content/load/{id}

GET

Load the file with given id

Parameters

name description type default
id file id. This can either be the localid or a globalid path

Response Body

element: (custom)
media types: */*
application/xml
application/json

response containing file binary data

/file/copy

Mount Point: /CNPortletapp/rest/file/copy

POST

Create a copy of the given file.

Request Body

element: fileCopyRequest
media types: */*
application/xml
application/json

(no documentation provided)

Response Body

element: fileUploadResponse
media types: */*
application/xml
application/json

(no documentation provided)

/file/create

Mount Point: /CNPortletapp/rest/file/create

POST

Create a new file handling multipart form-data. The data and meta data is encoded within separate body parts.

Request Body

element: multiPart
media types: multipart/form-data

request with data for the file to be created

Response Body

element: fileUploadResponse
media types: application/json

response containing the file meta data

POST

Create a new file with the binary data loaded from a URL

Request Body

element: fileCreateRequest
media types: application/json

request

Response Body

element: fileUploadResponse
media types: application/json

response containing the file meta data

/file/createSimple

Mount Point: /CNPortletapp/rest/file/createSimple

POST

Create a new file handling simple post data

Parameters

name description type default
folderId Folder ID where to save the file in query
databodypart (no documentation provided) query
qqfile (no documentation provided) query
description File description query
overwrite (no documentation provided) query false

Request Body

element: multiPart
media types: multipart/form-data

multipart/form-data request data

Response Body

element: fileUploadResponse
media types: application/json

response containing the file meta data

POST

Create a new file handling simple post data

Parameters

name description type default
folderId Folder ID where to save the file in query
nodeId Node ID query 0
databodypart (no documentation provided) query
qqfile File name query
description File description query
overwrite (no documentation provided) query false

Response Body

element: fileUploadResponse
media types: application/json

response containing the file meta data

/file/delete/{id}

Mount Point: /CNPortletapp/rest/file/delete/{id}

POST

Delete the file denoted by id

Parameters

name description type default
id id of the File to delete path
nodeId id of the node (channel) of the file query

Response Body

element: genericResponse
media types: */*
application/xml
application/json

response object

/file/disinherit

Mount Point: /CNPortletapp/rest/file/disinherit

GET

Get the multichannelling exclusion and disinherit status for a list of pages

Parameters

name description type default
id list of page IDs query
nodeId node ID query

Response Body

element: multiDisinheritResponse
media types: */*
application/xml
application/json

response containing the exclusion and disinherit status

POST

Set the multichannelling exclusion and disinherit status for a list of pages

Parameters

name description type default
id list of page IDs query
nodeId node ID query
wait wait timeout in milliseconds query 0

Request Body

element: disinheritRequest
media types: */*
application/xml
application/json

request object

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/disinherit/{id}

Mount Point: /CNPortletapp/rest/file/disinherit/{id}

GET

Get the multichannelling exclusion and disinherit status of the file

Parameters

name description type default
id file ID path
nodeId node ID query

Response Body

element: disinheritResponse
media types: */*
application/xml
application/json

response containing the exclusion and disinherit status

POST

Set the multichannelling exclusion and disinherit status

Parameters

name description type default
id file ID path
nodeId (no documentation provided) query
wait wait timeout in milliseconds query 0

Request Body

element: disinheritRequest
media types: */*
application/xml
application/json

request object

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/load

Mount Point: /CNPortletapp/rest/file/load

POST

Load a list of files specified in the given request. File ids for which no files exist, or the user does not have the necessary permissions, are silently ignored.

Request Body

element: multiObjectLoadRequest
media types: */*
application/xml
application/json

The request with he list of file ids to load.

Response Body

element: multiFileLoadResponse
media types: */*
application/xml
application/json

The list of found files, for which the user has enough permissions.

/file/load/{id}

Mount Point: /CNPortletapp/rest/file/load/{id}

GET

Load the file (without data)

Parameters

name description type default
id id of the file path
update true when the file is fetched for updating. Currently, files cannot be locked in the backend, but it is still recommended to set this parameter to true when the file shall be modified. query false
nodeId id of the node (channel) for which the image shall be loaded (when multichannelling is used). query

Response Body

element: fileLoadResponse
media types: */*
application/xml
application/json

response containing the file

/file/localizationinfo

Mount Point: /CNPortletapp/rest/file/localizationinfo

GET

Get localization info for a list of files for a given channel and all master channels

Parameters

name description type default
id list of file ids query
nodeId id of the node to start with query

Response Body

element: localizationInfo
media types: */*
application/xml
application/json

localization info

/file/localizationinfo/{id}

Mount Point: /CNPortletapp/rest/file/localizationinfo/{id}

GET

Get localization info for a file for a given channel and all master channels

Parameters

name description type default
id id of the file path
nodeId id of the node to start with query

Response Body

element: localizationInfo
media types: */*
application/xml
application/json

localization info

/file/localizations/{id}

Mount Point: /CNPortletapp/rest/file/localizations/{id}

GET

Get the IDs an their respective node IDs of localized copies of the specified file.

Parameters

name description type default
id The ID of the master file. path

Response Body

element: localizationsResponse
media types: */*
application/xml
application/json

A map of folder IDs to node IDs of localized copies.

/file/localize/{id}

Mount Point: /CNPortletapp/rest/file/localize/{id}

POST

Localize the given file

Parameters

name description type default
id id of the file to localize path

Request Body

element: localizeRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/move

Mount Point: /CNPortletapp/rest/file/move

POST

Move multiple files to another folder

Request Body

element: multiObjectMoveRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/move/{id}

Mount Point: /CNPortletapp/rest/file/move/{id}

POST

Mpve the given file to another folder

Parameters

name description type default
id file id path

Request Body

element: objectMoveRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/push2master

Mount Point: /CNPortletapp/rest/file/push2master

POST

Push a list of pages from a channel into a master

Request Body

element: multiPushToMasterRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/push2master/{id}

Mount Point: /CNPortletapp/rest/file/push2master/{id}

POST

Push a file from a channel into a master

Parameters

name description type default
id id of the file path

Request Body

element: pushToMasterRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/save/{id}

Mount Point: /CNPortletapp/rest/file/save/{id}

POST

Save the given file

Parameters

name description type default
id (no documentation provided) path

Request Body

element: fileSaveRequest
media types: */*
application/xml
application/json

request with the file to be saved

Response Body

element: genericResponse
media types: application/json

generic response

POST

Save the posted content into the given file

Parameters

name description type default
id id of the file path

Request Body

element: multiPart
media types: multipart/form-data

request with data for the file to be created

Response Body

element: genericResponse
media types: application/json

generic response

/file/unlocalize

Mount Point: /CNPortletapp/rest/file/unlocalize

POST

Unlocalize files in a channel

Request Body

element: multiUnlocalizeRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/unlocalize/{id}

Mount Point: /CNPortletapp/rest/file/unlocalize/{id}

POST

Unlocalize the given file

Parameters

name description type default
id id of the file to unlocalize path

Request Body

element: unlocalizeRequest
media types: */*
application/xml
application/json

request

Response Body

element: genericResponse
media types: */*
application/xml
application/json

generic response

/file/usage/file

Mount Point: /CNPortletapp/rest/file/usage/file

GET

Get the files using one of the given files

Parameters

name description type default
skipCount number of items to be skipped, set to 0 for skipping no items query 0
maxItems maximum number of items to be returned, set to -1 for returning all items query -1
sortby (no documentation provided) query name
sortorder (no documentation provided) query asc
id list of file ids, for which the usage shall be fetched query
nodeId id of the node query
files true (default) if the files shall be returned, false for only returning the counts query true

Response Body

element: fileUsageListResponse
media types: */*
application/xml
application/json

response

/file/usage/folder

Mount Point: /CNPortletapp/rest/file/usage/folder

GET

Get the folders using one of the given files.

Parameters

name description type default
skipCount number of items to be skipped, set to 0 for skipping no items query 0
maxItems maximum number of items to be returned, set to -1 for returning all items query -1
sortby (no documentation provided) query name
sortorder (no documentation provided) query asc
id list of file ids, for which the usage shall be fetched query
nodeId id of the node query
folders true (default) if the folders shall be returned, false for only returning the counts query true

Response Body

element: folderUsageListResponse
media types: */*
application/xml
application/json

response

/file/usage/image

Mount Point: /CNPortletapp/rest/file/usage/image

GET

Get the images using one of the given files

Parameters

name description type default
skipCount number of items to be skipped, set to 0 for skipping no items query 0
maxItems maximum number of items to be returned, set to -1 for returning all items query -1
sortby (no documentation provided) query name
sortorder (no documentation provided) query asc
id list of file ids, for which the usage shall be fetched query
nodeId id of the node query
files true (default) if the files shall be returned, false for only returning the counts query true

Response Body

element: fileUsageListResponse
media types: */*
application/xml
application/json

response

/file/usage/page

Mount Point: /CNPortletapp/rest/file/usage/page

GET

Get the pages using one of the given files

Parameters

name description type default
skipCount number of items to be skipped, set to 0 for skipping no items query 0
maxItems maximum number of items to be returned, set to -1 for returning all items query -1
sortby (no documentation provided) query name
sortorder (no documentation provided) query asc
id list of file ids, for which the usage shall be fetched query
nodeId id of the node query
pages true (default) if the pages shall be returned, false for only returning the counts query true
template true for adding template info to the pages, default is false query false
folder true for adding folder info to the pages, default is false query false
langvars true for adding the language variants to the pages, default is false query false

Response Body

element: pageUsageListResponse
media types: */*
application/xml
application/json

response

/file/usage/template

Mount Point: /CNPortletapp/rest/file/usage/template

GET

Get the templates using one of the given files

Parameters

name description type default
skipCount number of items to be skipped, set to 0 for skipping no items query 0
maxItems maximum number of items to be returned, set to -1 for returning all items query -1
sortby (no documentation provided) query name
sortorder (no documentation provided) query asc
id list of file ids, for which the usage shall be fetched query
nodeId id of the node query
templates true (default) if the templates shall be returned, false for only returning the counts query true

Response Body

element: templateUsageListResponse
media types: */*
application/xml
application/json

response

/file/usage/total

Mount Point: /CNPortletapp/rest/file/usage/total

GET

Get the total usage information for the given files.

Parameters

name description type default
id (no documentation provided) query
nodeId id of the node query

Response Body

element: totalUsageResponse
media types: */*
application/xml
application/json

response

/file/wastebin/delete

Mount Point: /CNPortletapp/rest/file/wastebin/delete

POST

Remove the given files from the wastebin

Parameters

name description type default
wait time in ms for the request to be done in foreground query 0

Request Body

element: idSetRequest
media types: */*
application/xml
application/json

request containing the file IDs

Response Body

element: genericResponse
media types: */*
application/xml
application/json

response object

/file/wastebin/delete/{id}

Mount Point: /CNPortletapp/rest/file/wastebin/delete/{id}

POST

Remove the file denoted by the given id from the wastebin.

Parameters

name description type default
id id of the file to remove from the wastebin. This can either be a local or global id path
wait time in ms for the request to be done in foreground query 0

Response Body

element: genericResponse
media types: */*
application/xml
application/json

response object

/file/wastebin/restore

Mount Point: /CNPortletapp/rest/file/wastebin/restore

POST

Restore the given files from the wastebin

Parameters

name description type default
wait time in ms for the request to be done in foreground query 0

Request Body

element: idSetRequest
media types: */*
application/xml
application/json

request containing the file IDs

Response Body

element: genericResponse
media types: */*
application/xml
application/json

response object

/file/wastebin/restore/{id}

Mount Point: /CNPortletapp/rest/file/wastebin/restore/{id}

POST

Restore the given file from the wastebin

Parameters

name description type default
id id of the file to restore from the wastebin. This can either be a local or global id path
wait time in ms for the request to be done in foreground query 0

Response Body

element: genericResponse
media types: */*
application/xml
application/json

response object