The CREATE_FILE action is used to create a new file in the ACS repository.
The input parameters for CREATE_FILE are:
Parameter | Type | Required | Description |
---|---|---|---|
autorename | Boolean | Optional | If true, then a name conflict will cause an attempt to auto rename by finding a unique name using an integer suffix. |
fileName | String | Required | Name of the file to be created. |
targetFileMetadata | JSON | Optional | Metadata to be set to the file in ACS. Metadata is a JSON object that contains key-value pairs, each of them holding a property name for example, cm:title) and a property value (for example, Introduction to AWS). |
targetFileType | String | Optional | ACS content type of the file to be stored in ACS, for example fin:invoice. By default, cm:content. |
targetFolder | Array<json>, JSON | Optional | Folder in which to store the result created. If the received value contains multiple references to folders, only the first of them will be used. |
targetFolderId | String | Optional | The nodeId of the folder to store the record in. For example 775a8f2d-8123-49a7-ae1f-f3f49d4eae20. |
targetFolderPath | String | Optional | The location path or relative path of the folder to store the record in. For example, a location path: /app:company_home/app:user_homes/cm:hruser and a relative path: /User Homes/hruser. |
underscoreMetadata | Boolean | Optional | If set to true, the input targetFileMetadata can have its namespace prefixes written with _ instead of :, for example cm_title instead of cm:title. The output response will also have its prefixes replaced. This allows the JSON to be used in an expression, for example ${metadata.cm_title}, whereas ${metadata.cm:title} is not valid. |
The output parameters from CREATE_FILE are:
Parameter | Type | Required | Description |
---|---|---|---|
response | Array<json> | Optional | Response for the calls. |
file | Array<json> | Optional | A list of ACS nodes containing just one element corresponding to the created file. |