Content actions are used to perform operations against the Content repository. These actions support creating, retrieving, updating, moving, and managing repository content.
The Content Connector executes actions against the Content repository. Any content action available in a Service Task can also be used as a trigger action and uses the same configuration properties.
CREATE_ACTION
The CREATE_CONTENT action is used to create content in the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| contentType | Required | The content type to assign to the new repository item, including
any properties defined by the associated schemas. For
example:{
"metadataType": "my-custom-type",
"properties": {
"my_prop": "value1"
}
}
|
| name | Optional | Name of the content that will be created. |
| targetContainer | Required | Reference to the repository container where the content will be created. The value can be a content reference or a content object. If multiple content references are provided, only the first is used. |
DELETE_CONTENT
The DELETE_CONTENT action is used to delete content from the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or the content object, to be deleted. If multiple content references are provided, only the first content object is used. |
FETCH_CONTENT
The FETCH_CONTENT action is used to fetch content from the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or the content object, to be deleted. If multiple content references are provided, only the first content object is used. |
UPDATE_METADATA
The UPDATE_METADATA action is used to update metadata of the content within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or the content object, to be deleted. If multiple content references are provided, only the first content object is used. |
| metadata | Optional | Metadata properties to update, expressed as key-value pairs. The supplied values are applied as a patch to the existing metadata rather than replacing all metadata values. |
UPDATE_FILE
The UPDATE_FILE action is used to update the file within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| sourceContent | Optional | Reference to the content item, or content object, whose binary content will be copied to the target content. One of sourceContent, sourceJSON or sourceText must be provided. If multiple content references are supplied, only the first content object is used. |
| sourceJSON | Optional | JSON content that will become the binary content of the target content item. One of sourceContent, sourceJSON or sourceText must be provided. If multiple content references are supplied, only the first content object is used. |
| sourceText | Optional | Text content that will become the binary content of the target content item. One of sourceContent, sourceJSON or sourceText must be provided. If multiple content references are supplied, only the first content object is used. |
| targetContet | Required | Reference to the content item, or content object, whose binary content will be updated. If multiple content references are supplied, only the first content object is used. |
MOVE_CONTENT
The MOVE_CONTENT action is used to move the content within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| sourceContent | Required | Reference to the content item, or content object, that will be moved. If multiple content references are provided, only the first content object is used. |
| targetContent | Required | Reference to the destination content item, or content object, into which the source content will be moved. If multiple content references are provided, only the first content object is used. |
ADD_PERMISSION
The ADD_PERMISSION action is used to add permission to the defined content within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or content object, to which permissions will be added. If multiple content references are provided, only the first content object is used. |
| permissions | Required | List of permissions to grant to users or groups. Permissions are
specified as JSON objects that define the permission type, whether
it is granted, and the target user or group. For
example: {
"permission": "Read",
"granted": true,
"group": {
"id": "1234567890",
"name": "hr"
}
},
{
"permission": "Read",
"granted": true,
"group": {
"id": "9876543210",
"name": "sales"
}
}
]
|
REMOVE_PERMISSIONS
The REMOVE_PERMISSION action is used to remove permission from the defined content within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or content object, from which permissions will be removed. If multiple content references are provided, only the first content object is used. |
| permissions | Required | List of permissions to remove from users or groups. Permissions
are specified as JSON objects that define the permission type,
whether it is granted, and the target user or group. For
example: {
"permission": "Read",
"granted": false,
"group": {
"id": "1234567890",
"name": "hr"
}
},
{
"permission": "Read",
"granted": false,
"group": {
"id": "9876543210",
"name": "sales"
}
}
]
|
READ_FILE
The READ_FILE action is used to read the contents of a file stored within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or content object, whose binary content will be read. If multiple content references are provided, only the first content object is used. |
| contentFormat | Required | Format of the binary content to return. Supported values are JSON and String. |
SET_CONTENT_TYPE
The SET_CONTENT_TYPE action is used to set the content type of the content already existing within the application.
The payload for the action is:
| Property | Required | Description |
|---|---|---|
| content | Required | Reference to the content item, or content object, whose content type will be modified. If multiple content references are provided, only the first content object is used. |
| contentType | Required | The content type to assign to the content item. The value includes the content type name defined in the repository Content Types and any properties defined by the associated schemas. |