Skip to main content

Actions

The ballerinax/alfresco package exposes the following clients:

ClientPurpose
ClientProvides access to the core features of Alfresco Content Services via the REST API.

Client

Provides access to the core features of Alfresco Content Services via the REST API.

Configuration

FieldTypeDefaultDescription
authhttp:CredentialsConfigRequiredBasic authentication credentials (username and password).
httpVersionhttp:HttpVersionHTTP_2_0HTTP protocol version.
timeoutdecimal30The maximum time to wait (in seconds) for a response before closing the connection.
retryConfighttp:RetryConfig()Retry configuration for failed requests.
secureSockethttp:ClientSecureSocket()SSL/TLS-related options.
proxyhttp:ProxyConfig()Proxy server configuration.
cachehttp:CacheConfig{}HTTP caching related configurations.
circuitBreakerhttp:CircuitBreakerConfig()Circuit breaker configuration for fault tolerance.
compressionhttp:CompressionCOMPRESSION_AUTOSpecifies the way of handling compression (accept-encoding) header.

Initializing the client

import ballerinax/alfresco;

configurable string username = ?;
configurable string password = ?;
configurable string serviceUrl = ?;

alfresco:Client alfrescoClient = check new ({
auth: {
username,
password
}
}, serviceUrl);

Operations

Node operations

getNode

Retrieves metadata for a node by its ID. Supports well-known aliases: -my-, -shared-, -root-.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of a node. You can also use aliases: -my-, -shared-, -root-.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetNodeQueriesNoQuery parameters including include and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry nodeResponse = check alfrescoClient->getNode("-root-");

Sample response:

{
"entry": {
"id": "d4f0a4b2-1a3e-4c5f-9b8e-7d6c5e4f3a2b",
"name": "Company Home",
"nodeType": "cm:folder",
"isFolder": true,
"isFile": false,
"isLocked": false,
"modifiedAt": "2025-03-15T10:30:00.000+0000",
"createdAt": "2024-01-01T00:00:00.000+0000",
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}
createNode

Creates a new node (file or folder) as a child of the specified parent node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the parent node. Supports aliases: -my-, -shared-, -root-.
payloadNodeBodyCreateYesThe node information to create, including name, nodeType, and optional properties.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateNodeQueriesNoQuery parameters including autoRename, include, and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeBodyCreate payload = {
name: "hello.txt",
nodeType: "cm:content",
aspectNames: ["cm:titled"],
properties: {
"cm:title": "hello.txt"
}
};
alfresco:NodeEntry createdNode = check alfrescoClient->createNode("-root-", payload);

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"modifiedAt": "2025-06-01T12:00:00.000+0000",
"createdAt": "2025-06-01T12:00:00.000+0000",
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"},
"parentId": "d4f0a4b2-1a3e-4c5f-9b8e-7d6c5e4f3a2b"
}
}
updateNode

Updates the metadata of an existing node (e.g., name, properties, permissions).

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node to update.
payloadNodeBodyUpdateYesThe node information to update.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdateNodeQueriesNoQuery parameters including include and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry updatedNode = check alfrescoClient->updateNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
name: "renamed-hello.txt",
properties: {
"cm:title": "Renamed Document"
}
});

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "renamed-hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"modifiedAt": "2025-06-01T12:30:00.000+0000",
"createdAt": "2025-06-01T12:00:00.000+0000",
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}
deleteNode

Deletes the specified node. By default, moves the node to the trash can (archive).

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node to delete.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesDeleteNodeQueriesNoQuery parameters including permanent (boolean to permanently delete instead of archiving).

Returns: error?

Sample code:

check alfrescoClient->deleteNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
listNodeChildren

Lists the child nodes of a specified parent node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the parent node. Supports aliases: -my-, -shared-, -root-.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListNodeChildrenQueriesNoQuery parameters including skipCount, maxItems, orderBy, where, include, and fields.

Returns: NodeChildAssociationPaging|error

Sample code:

alfresco:NodeChildAssociationPaging children = check alfrescoClient->listNodeChildren("-root-");

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "abc123", "name": "Documents", "nodeType": "cm:folder", "isFolder": true, "isFile": false}},
{"entry": {"id": "def456", "name": "Shared", "nodeType": "cm:folder", "isFolder": true, "isFile": false}}
]
}
}
copyNode

Copies a node to a new target parent. Optionally renames the copy.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node to copy.
payloadNodeBodyCopyYesThe targetParentId and, optionally, a new name.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCopyNodeQueriesNoQuery parameters including include and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry copiedNode = check alfrescoClient->copyNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
targetParentId: "d4f0a4b2-1a3e-4c5f-9b8e-7d6c5e4f3a2b",
name: "hello-copy.txt"
});

Sample response:

{
"entry": {
"id": "f7e8d9c0-b1a2-3456-7890-abcdef123456",
"name": "hello-copy.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}
moveNode

Moves a node to a new target parent. Optionally renames the node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node to move.
payloadNodeBodyMoveYesThe targetParentId and, optionally, a new name.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesMoveNodeQueriesNoQuery parameters including include and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry movedNode = check alfrescoClient->moveNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
targetParentId: "bbb222-ccc333-ddd444"
});

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"parentId": "bbb222-ccc333-ddd444",
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}
lockNode

Locks a node to prevent concurrent modifications.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node to lock.
payloadNodeBodyLockYesLock details including timeToExpire, type, and lifetime.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesLockNodeQueriesNoQuery parameters including include and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry lockedNode = check alfrescoClient->lockNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
timeToExpire: 300,
'type: "ALLOW_OWNER_CHANGES",
lifetime: "PERSISTENT"
});

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": true,
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}
unlockNode

Unlocks a previously locked node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node to unlock.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUnlockNodeQueriesNoQuery parameters including include and fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry unlockedNode = check alfrescoClient->unlockNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}

Node content operations

getNodeContent

Retrieves the binary content of a node (file download).

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersGetNodeContentHeadersNoHeaders including If-Modified-Since and Range.
queriesGetNodeContentQueriesNoQuery parameters including attachment.

Returns: byte[]|error?

Sample code:

byte[]? fileContent = check alfrescoClient->getNodeContent("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

<binary content bytes>
updateNodeContent

Updates the binary content of a node (file upload/replace).

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
payloadbyte[]YesThe binary content to upload.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdateNodeContentQueriesNoQuery parameters including majorVersion, comment, name, include, and fields.

Returns: NodeEntry|error

Sample code:

import ballerina/io;

byte[] fileContent = check io:fileReadBytes("resources/hello.txt");
alfresco:NodeEntry result = check alfrescoClient->updateNodeContent("a1b2c3d4-e5f6-7890-abcd-ef1234567890", fileContent);

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"content": {
"mimeType": "text/plain",
"mimeTypeName": "Plain Text",
"sizeInBytes": 1024,
"encoding": "UTF-8"
},
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}

Comment operations

listComments

Lists comments on a specified node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListCommentsQueriesNoQuery parameters including skipCount, maxItems, and fields.

Returns: CommentPaging|error

Sample code:

alfresco:CommentPaging comments = check alfrescoClient->listComments("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{
"entry": {
"id": "comment-001",
"content": "Please review this document.",
"title": "",
"createdAt": "2025-06-01T12:00:00.000+0000",
"modifiedAt": "2025-06-01T12:00:00.000+0000",
"createdBy": {"id": "admin", "displayName": "Administrator"},
"modifiedBy": {"id": "admin", "displayName": "Administrator"},
"edited": false,
"canEdit": true,
"canDelete": true
}
}
]
}
}
createComment

Creates a new comment on a specified node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
payloadCommentBodyYesThe comment text.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateCommentQueriesNoQuery parameters including fields.

Returns: CommentEntry|error

Sample code:

alfresco:CommentEntry comment = check alfrescoClient->createComment("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
content: "Please review this document."
});

Sample response:

{
"entry": {
"id": "comment-002",
"content": "Please review this document.",
"title": "",
"createdAt": "2025-06-01T14:00:00.000+0000",
"modifiedAt": "2025-06-01T14:00:00.000+0000",
"createdBy": {"id": "admin", "displayName": "Administrator"},
"modifiedBy": {"id": "admin", "displayName": "Administrator"},
"edited": false,
"canEdit": true,
"canDelete": true
}
}
updateComment

Updates the content of an existing comment.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
commentIdstringYesThe identifier of the comment.
payloadCommentBodyYesThe updated comment text.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdateCommentQueriesNoQuery parameters including fields.

Returns: CommentEntry|error

Sample code:

alfresco:CommentEntry updated = check alfrescoClient->updateComment("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "comment-002", {
content: "Updated comment text."
});

Sample response:

{
"entry": {
"id": "comment-002",
"content": "Updated comment text.",
"title": "",
"createdAt": "2025-06-01T14:00:00.000+0000",
"modifiedAt": "2025-06-01T14:30:00.000+0000",
"createdBy": {"id": "admin", "displayName": "Administrator"},
"modifiedBy": {"id": "admin", "displayName": "Administrator"},
"edited": true,
"canEdit": true,
"canDelete": true
}
}
deleteComment

Deletes a comment from a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
commentIdstringYesThe identifier of the comment.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteComment("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "comment-002");

Tag operations

listTagsForNode

Lists all tags assigned to a specific node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListTagsForNodeQueriesNoQuery parameters including skipCount, maxItems, and fields.

Returns: TagPaging|error

Sample code:

alfresco:TagPaging tags = check alfrescoClient->listTagsForNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "tag-001", "tag": "important"}}
]
}
}
createTagForNode

Creates and assigns a new tag to a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
payloadTagBodyYesThe tag value.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateTagForNodeQueriesNoQuery parameters including fields.

Returns: TagEntry|error

Sample code:

alfresco:TagEntry tag = check alfrescoClient->createTagForNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
tag: "important"
});

Sample response:

{"entry": {"id": "tag-001", "tag": "important"}}
deleteTagFromNode

Removes a tag from a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
tagIdstringYesThe identifier of the tag.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteTagFromNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "tag-001");
listTags

Lists all tags in the repository.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListTagsQueriesNoQuery parameters including skipCount, maxItems, orderBy, and fields.

Returns: TagPaging|error

Sample code:

alfresco:TagPaging allTags = check alfrescoClient->listTags();

Sample response:

{
"list": {
"pagination": {"count": 3, "hasMoreItems": false, "totalItems": 3, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "tag-001", "tag": "important"}},
{"entry": {"id": "tag-002", "tag": "draft"}},
{"entry": {"id": "tag-003", "tag": "archived"}}
]
}
}
getTag

Retrieves a tag by its ID.

Parameters:

NameTypeRequiredDescription
tagIdstringYesThe identifier of the tag.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetTagQueriesNoQuery parameters including fields.

Returns: TagEntry|error

Sample code:

alfresco:TagEntry tag = check alfrescoClient->getTag("tag-001");

Sample response:

{"entry": {"id": "tag-001", "tag": "important"}}
updateTag

Updates the value of an existing tag.

Parameters:

NameTypeRequiredDescription
tagIdstringYesThe identifier of the tag.
payloadTagBodyYesThe new tag value.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdateTagQueriesNoQuery parameters including fields.

Returns: TagEntry|error

Sample code:

alfresco:TagEntry updatedTag = check alfrescoClient->updateTag("tag-001", {
tag: "critical"
});

Sample response:

{"entry": {"id": "tag-001", "tag": "critical"}}

Rating operations

listRatings

Lists all ratings for a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListRatingsQueriesNoQuery parameters including skipCount, maxItems, and fields.

Returns: RatingPaging|error

Sample code:

alfresco:RatingPaging ratings = check alfrescoClient->listRatings("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "likes", "aggregate": {"numberOfRatings": 3}, "myRating": true}}
]
}
}
createRating

Creates a rating for a node. Supports likes (boolean) and fiveStar (integer) schemes.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
payloadRatingBodyYesThe rating value: boolean for likes, integer for fiveStar.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateRatingQueriesNoQuery parameters including fields.

Returns: RatingEntry|error

Sample code:

alfresco:RatingEntry rating = check alfrescoClient->createRating("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
id: "likes",
myRating: true
});

Sample response:

{"entry": {"id": "likes", "aggregate": {"numberOfRatings": 4}, "myRating": true}}
getRating

Retrieves a specific rating for a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
ratingIdstringYesThe identifier of the rating (e.g., likes or fiveStar).
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetRatingQueriesNoQuery parameters including fields.

Returns: RatingEntry|error

Sample code:

alfresco:RatingEntry rating = check alfrescoClient->getRating("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "likes");

Sample response:

{"entry": {"id": "likes", "aggregate": {"numberOfRatings": 4}, "myRating": true}}
deleteRating

Removes the current user's rating from a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
ratingIdstringYesThe identifier of the rating.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteRating("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "likes");

Version operations

listVersionHistory

Lists the version history of a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListVersionHistoryQueriesNoQuery parameters including skipCount, maxItems, include, and fields.

Returns: VersionPaging|error

Sample code:

alfresco:VersionPaging versions = check alfrescoClient->listVersionHistory("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "2.0", "versionComment": "Updated content", "name": "hello.txt", "nodeType": "cm:content", "isFolder": false, "isFile": true, "modifiedAt": "2025-06-01T14:00:00.000+0000", "modifiedByUser": {"id": "admin", "displayName": "Administrator"}, "content": {"mimeType": "text/plain", "sizeInBytes": 2048}}},
{"entry": {"id": "1.0", "versionComment": "Initial version", "name": "hello.txt", "nodeType": "cm:content", "isFolder": false, "isFile": true, "modifiedAt": "2025-06-01T12:00:00.000+0000", "modifiedByUser": {"id": "admin", "displayName": "Administrator"}, "content": {"mimeType": "text/plain", "sizeInBytes": 1024}}}
]
}
}
getVersion

Retrieves metadata for a specific version of a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
versionIdstringYesThe version identifier (e.g., 1.0, 2.0).
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: VersionEntry|error

Sample code:

alfresco:VersionEntry version = check alfrescoClient->getVersion("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "1.0");

Sample response:

{
"entry": {
"id": "1.0",
"versionComment": "Initial version",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"modifiedAt": "2025-06-01T12:00:00.000+0000",
"modifiedByUser": {"id": "admin", "displayName": "Administrator"},
"content": {"mimeType": "text/plain", "sizeInBytes": 1024}
}
}
deleteVersion

Deletes a specific version from the version history of a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
versionIdstringYesThe version identifier.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteVersion("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "1.0");
getVersionContent

Retrieves the binary content of a specific version of a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
versionIdstringYesThe version identifier.
headersGetVersionContentHeadersNoHeaders including If-Modified-Since and Range.
queriesGetVersionContentQueriesNoQuery parameters including attachment.

Returns: byte[]|error?

Sample code:

byte[]? versionContent = check alfrescoClient->getVersionContent("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "1.0");

Sample response:

<binary content bytes>
revertVersion

Reverts the node to a previous version, creating a new version entry.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
versionIdstringYesThe version identifier to revert to.
payloadRevertBodyYesRevert options including majorVersion and comment.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesRevertVersionQueriesNoQuery parameters including fields.

Returns: VersionEntry|error

Sample code:

alfresco:VersionEntry revertedVersion = check alfrescoClient->revertVersion("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "1.0", {
majorVersion: true,
comment: "Reverting to initial version"
});

Sample response:

{
"entry": {
"id": "3.0",
"versionComment": "Reverting to initial version",
"name": "hello.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"modifiedAt": "2025-06-01T15:00:00.000+0000",
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}

Rendition operations

listRenditions

Lists all renditions for a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListRenditionsQueriesNoQuery parameters including where.

Returns: RenditionPaging|error

Sample code:

alfresco:RenditionPaging renditions = check alfrescoClient->listRenditions("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "doclib", "content": {"mimeType": "image/png", "mimeTypeName": "PNG Image", "sizeInBytes": 4096}, "status": "CREATED"}},
{"entry": {"id": "pdf", "content": {"mimeType": "application/pdf", "mimeTypeName": "Adobe PDF Document", "sizeInBytes": 8192}, "status": "CREATED"}}
]
}
}
createRendition

Creates a rendition for a node (e.g., doclib thumbnail or pdf preview).

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
payloadRenditionBodyCreateYesThe rendition ID to create (e.g., doclib, pdf).
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->createRendition("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
id: "pdf"
});
getRendition

Retrieves rendition information for a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
renditionIdstringYesThe name of the rendition (e.g., doclib, pdf).
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: RenditionEntry|error

Sample code:

alfresco:RenditionEntry rendition = check alfrescoClient->getRendition("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "pdf");

Sample response:

{"entry": {"id": "pdf", "content": {"mimeType": "application/pdf", "mimeTypeName": "Adobe PDF Document", "sizeInBytes": 8192}, "status": "CREATED"}}
getRenditionContent

Retrieves the binary content of a rendition.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
renditionIdstringYesThe name of the rendition (e.g., doclib, pdf).
headersGetRenditionContentHeadersNoHeaders including If-Modified-Since and Range.
queriesGetRenditionContentQueriesNoQuery parameters including attachment and placeholder.

Returns: byte[]|error?

Sample code:

byte[]? renditionContent = check alfrescoClient->getRenditionContent("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "pdf");

Sample response:

<binary content bytes>

Association operations

listSecondaryChildren

Lists secondary child associations for a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the parent node. Supports aliases: -my-, -shared-, -root-.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListSecondaryChildrenQueriesNoQuery parameters including where, include, skipCount, maxItems, and fields.

Returns: NodeChildAssociationPaging|error

Sample code:

alfresco:NodeChildAssociationPaging secondaryChildren = check alfrescoClient->listSecondaryChildren("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 0, "hasMoreItems": false, "totalItems": 0, "skipCount": 0, "maxItems": 100},
"entries": []
}
}
createSecondaryChildAssociation

Creates a secondary child association between two nodes.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the parent node.
payloadChildAssociationBodyYesThe child node ID and association type.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateSecondaryChildAssociationQueriesNoQuery parameters including fields.

Returns: ChildAssociationEntry|error

Sample code:

alfresco:ChildAssociationEntry assoc = check alfrescoClient->createSecondaryChildAssociation("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
childId: "f7e8d9c0-b1a2-3456-7890-abcdef123456",
assocType: "cm:contains"
});

Sample response:

{"entry": {"childId": "f7e8d9c0-b1a2-3456-7890-abcdef123456", "assocType": "cm:contains"}}
deleteSecondaryChildAssociation

Deletes a secondary child association.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the parent node.
childIdstringYesThe identifier of the child node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesDeleteSecondaryChildAssociationQueriesNoQuery parameters including assocType.

Returns: error?

Sample code:

check alfrescoClient->deleteSecondaryChildAssociation("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "f7e8d9c0-b1a2-3456-7890-abcdef123456");
listParents

Lists the parent nodes of a specified node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListParentsQueriesNoQuery parameters including where, include, skipCount, maxItems, and fields.

Returns: NodeAssociationPaging|error

Sample code:

alfresco:NodeAssociationPaging parents = check alfrescoClient->listParents("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "d4f0a4b2-1a3e-4c5f-9b8e-7d6c5e4f3a2b", "name": "Company Home", "nodeType": "cm:folder", "isFolder": true, "isFile": false}}
]
}
}
listTargetAssociations

Lists the target peer associations of a node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the source node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListTargetAssociationsQueriesNoQuery parameters including where, include, skipCount, maxItems, and fields.

Returns: NodeAssociationPaging|error

Sample code:

alfresco:NodeAssociationPaging targets = check alfrescoClient->listTargetAssociations("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 0, "hasMoreItems": false, "totalItems": 0, "skipCount": 0, "maxItems": 100},
"entries": []
}
}
createAssociation

Creates a peer-to-peer association between two nodes.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the source node.
payloadAssociationBodyYesThe target node ID and association type.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateAssociationQueriesNoQuery parameters including fields.

Returns: AssociationEntry|error

Sample code:

alfresco:AssociationEntry assoc = check alfrescoClient->createAssociation("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
targetId: "f7e8d9c0-b1a2-3456-7890-abcdef123456",
assocType: "cm:references"
});

Sample response:

{"entry": {"targetId": "f7e8d9c0-b1a2-3456-7890-abcdef123456", "assocType": "cm:references"}}
deleteAssociation

Deletes a peer-to-peer association.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the source node.
targetIdstringYesThe identifier of the target node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesDeleteAssociationQueriesNoQuery parameters including assocType.

Returns: error?

Sample code:

check alfrescoClient->deleteAssociation("a1b2c3d4-e5f6-7890-abcd-ef1234567890", "f7e8d9c0-b1a2-3456-7890-abcdef123456");
listSourceAssociations

Lists the source peer associations of a node (i.e., nodes that point to this node).

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the target node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListSourceAssociationsQueriesNoQuery parameters including where, include, and fields.

Returns: NodeAssociationPaging|error

Sample code:

alfresco:NodeAssociationPaging sources = check alfrescoClient->listSourceAssociations("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 0, "hasMoreItems": false, "totalItems": 0, "skipCount": 0, "maxItems": 100},
"entries": []
}
}

Deleted node (trash can) operations

listDeletedNodes

Lists nodes in the trash can (archived/deleted nodes).

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListDeletedNodesQueriesNoQuery parameters including skipCount, maxItems, and include.

Returns: DeletedNodesPaging|error

Sample code:

alfresco:DeletedNodesPaging deletedNodes = check alfrescoClient->listDeletedNodes();

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "old-file.txt", "nodeType": "cm:content", "isFolder": false, "isFile": true, "archivedAt": "2025-06-01T16:00:00.000+0000", "archivedByUser": {"id": "admin", "displayName": "Administrator"}}}
]
}
}
getDeletedNode

Retrieves metadata for a specific deleted node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the deleted node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetDeletedNodeQueriesNoQuery parameters including include.

Returns: DeletedNodeEntry|error

Sample code:

alfresco:DeletedNodeEntry deletedNode = check alfrescoClient->getDeletedNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "old-file.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"archivedAt": "2025-06-01T16:00:00.000+0000",
"archivedByUser": {"id": "admin", "displayName": "Administrator"}
}
}
deleteDeletedNode

Permanently deletes a node from the trash can.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the deleted node.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteDeletedNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
restoreDeletedNode

Restores a deleted node from the trash can to its original or a specified location.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the deleted node.
payloadDeletedNodeBodyRestoreYesOptional target folder ID and association type for restore.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesRestoreDeletedNodeQueriesNoQuery parameters including fields.

Returns: NodeEntry|error

Sample code:

alfresco:NodeEntry restoredNode = check alfrescoClient->restoreDeletedNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890", {});

Sample response:

{
"entry": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "old-file.txt",
"nodeType": "cm:content",
"isFolder": false,
"isFile": true,
"isLocked": false,
"createdByUser": {"id": "admin", "displayName": "Administrator"},
"modifiedByUser": {"id": "admin", "displayName": "Administrator"}
}
}

Download operations

createDownload

Creates a download ZIP for one or more nodes. Returns a download entry with a status to poll.

Parameters:

NameTypeRequiredDescription
payloadDownloadBodyCreateYesAn array of node IDs to include in the download ZIP.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateDownloadQueriesNoQuery parameters including fields.

Returns: DownloadEntry|error

Sample code:

alfresco:DownloadEntry download = check alfrescoClient->createDownload({
nodeIds: ["a1b2c3d4-e5f6-7890-abcd-ef1234567890", "f7e8d9c0-b1a2-3456-7890-abcdef123456"]
});

Sample response:

{
"entry": {
"id": "dl-001",
"status": "PENDING",
"filesAdded": 0,
"bytesAdded": 0,
"totalFiles": 2,
"totalBytes": 3072
}
}
getDownload

Retrieves the status of a download request.

Parameters:

NameTypeRequiredDescription
downloadIdstringYesThe identifier of the download.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetDownloadQueriesNoQuery parameters including fields.

Returns: DownloadEntry|error

Sample code:

alfresco:DownloadEntry status = check alfrescoClient->getDownload("dl-001");

Sample response:

{
"entry": {
"id": "dl-001",
"status": "DONE",
"filesAdded": 2,
"bytesAdded": 3072,
"totalFiles": 2,
"totalBytes": 3072
}
}
cancelDownload

Cancels a download request.

Parameters:

NameTypeRequiredDescription
downloadIdstringYesThe identifier of the download.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->cancelDownload("dl-001");

People operations

listPeople

Lists all people (users) in the repository.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListPeopleQueriesNoQuery parameters including skipCount, maxItems, orderBy, and fields.

Returns: PersonPaging|error

Sample code:

alfresco:PersonPaging people = check alfrescoClient->listPeople();

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "admin", "firstName": "Administrator", "email": "[email protected]", "enabled": true}},
{"entry": {"id": "jdoe", "firstName": "John", "lastName": "Doe", "email": "[email protected]", "enabled": true}}
]
}
}
createPerson

Creates a new person (user) in the repository.

Parameters:

NameTypeRequiredDescription
payloadPersonBodyCreateYesThe person details including id, firstName, lastName, email, and password.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreatePersonQueriesNoQuery parameters including fields.

Returns: PersonEntry|error

Sample code:

alfresco:PersonEntry person = check alfrescoClient->createPerson({
id: "jsmith",
firstName: "Jane",
lastName: "Smith",
email: "[email protected]",
password: "S3cur3P@ss!"
});

Sample response:

{
"entry": {
"id": "jsmith",
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"enabled": true
}
}
getPerson

Retrieves details for a specific person.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person (username or -me-).
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetPersonQueriesNoQuery parameters including fields.

Returns: PersonEntry|error

Sample code:

alfresco:PersonEntry person = check alfrescoClient->getPerson("-me-");

Sample response:

{
"entry": {
"id": "admin",
"firstName": "Administrator",
"email": "[email protected]",
"enabled": true
}
}
updatePerson

Updates details of an existing person.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person.
payloadPersonBodyUpdateYesThe person fields to update.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdatePersonQueriesNoQuery parameters including fields.

Returns: PersonEntry|error

Sample code:

alfresco:PersonEntry updatedPerson = check alfrescoClient->updatePerson("jsmith", {
jobTitle: "Senior Developer"
});

Sample response:

{
"entry": {
"id": "jsmith",
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"jobTitle": "Senior Developer",
"enabled": true
}
}
requestPasswordReset

Requests a password reset for a person. Sends a reset email.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person.
payloadClientBodyYesThe client name for the password reset.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->requestPasswordReset("jsmith", {
'client: "alfresco"
});
resetPassword

Resets the password for a person using a reset token.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person.
payloadPasswordResetBodyYesThe new password and reset token.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->resetPassword("jsmith", {
password: "N3wS3cur3P@ss!",
id: "reset-token-abc123"
});

Site operations

listSites

Lists all sites in the repository.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListSitesQueriesNoQuery parameters including skipCount, maxItems, orderBy, where, and fields.

Returns: SitePaging|error

Sample code:

alfresco:SitePaging sites = check alfrescoClient->listSites();

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "engineering", "guid": "site-guid-001", "title": "Engineering", "description": "Engineering team site", "visibility": "PRIVATE"}}
]
}
}
createSite

Creates a new site.

Parameters:

NameTypeRequiredDescription
payloadSiteBodyCreateYesThe site details including title, visibility, and optional description and id.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateSiteQueriesNoQuery parameters including skipConfiguration, skipAddToFavorites, and fields.

Returns: SiteEntry|error

Sample code:

alfresco:SiteEntry site = check alfrescoClient->createSite({
title: "Marketing",
description: "Marketing team collaboration site",
visibility: "MODERATED"
});

Sample response:

{
"entry": {
"id": "marketing",
"guid": "site-guid-002",
"title": "Marketing",
"description": "Marketing team collaboration site",
"visibility": "MODERATED"
}
}
getSite

Retrieves details of a specific site.

Parameters:

NameTypeRequiredDescription
siteIdstringYesThe identifier of the site.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetSiteQueriesNoQuery parameters including relations and fields.

Returns: SiteEntry|error

Sample code:

alfresco:SiteEntry site = check alfrescoClient->getSite("engineering");

Sample response:

{
"entry": {
"id": "engineering",
"guid": "site-guid-001",
"title": "Engineering",
"description": "Engineering team site",
"visibility": "PRIVATE"
}
}
updateSite

Updates the properties of an existing site.

Parameters:

NameTypeRequiredDescription
siteIdstringYesThe identifier of the site.
payloadSiteBodyUpdateYesThe site properties to update.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdateSiteQueriesNoQuery parameters including fields.

Returns: SiteEntry|error

Sample code:

alfresco:SiteEntry updatedSite = check alfrescoClient->updateSite("engineering", {
description: "Updated engineering site description",
visibility: "PUBLIC"
});

Sample response:

{
"entry": {
"id": "engineering",
"guid": "site-guid-001",
"title": "Engineering",
"description": "Updated engineering site description",
"visibility": "PUBLIC"
}
}
deleteSite

Deletes a site.

Parameters:

NameTypeRequiredDescription
siteIdstringYesThe identifier of the site.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesDeleteSiteQueriesNoQuery parameters including permanent.

Returns: error?

Sample code:

check alfrescoClient->deleteSite("marketing");

Site membership operations

listSiteMemberships

Lists all members of a specific site.

Parameters:

NameTypeRequiredDescription
siteIdstringYesThe identifier of the site.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListSiteMembershipsQueriesNoQuery parameters including skipCount, maxItems, and fields.

Returns: SiteMemberPaging|error

Sample code:

alfresco:SiteMemberPaging members = check alfrescoClient->listSiteMemberships("engineering");

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "admin", "person": {"id": "admin", "firstName": "Administrator"}, "role": "SiteManager"}},
{"entry": {"id": "jsmith", "person": {"id": "jsmith", "firstName": "Jane", "lastName": "Smith"}, "role": "SiteContributor"}}
]
}
}
createSiteMembership

Adds a person as a member of a site with a specified role.

Parameters:

NameTypeRequiredDescription
siteIdstringYesThe identifier of the site.
payloadSiteMembershipBodyCreateYesThe person ID and role (SiteConsumer, SiteContributor, SiteCollaborator, SiteManager).
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateSiteMembershipQueriesNoQuery parameters including fields.

Returns: SiteMemberEntry|error

Sample code:

alfresco:SiteMemberEntry member = check alfrescoClient->createSiteMembership("engineering", {
id: "jsmith",
role: "SiteContributor"
});

Sample response:

{
"entry": {
"id": "jsmith",
"person": {"id": "jsmith", "firstName": "Jane", "lastName": "Smith"},
"role": "SiteContributor"
}
}
deleteSiteMembership

Removes a person from a site.

Parameters:

NameTypeRequiredDescription
siteIdstringYesThe identifier of the site.
personIdstringYesThe identifier of the person.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteSiteMembership("engineering", "jsmith");

Group operations

listGroups

Lists all groups in the repository.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListGroupsQueriesNoQuery parameters including skipCount, maxItems, orderBy, where, include, and fields.

Returns: GroupPaging|error

Sample code:

alfresco:GroupPaging groups = check alfrescoClient->listGroups();

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "GROUP_ALFRESCO_ADMINISTRATORS", "displayName": "ALFRESCO_ADMINISTRATORS", "isRoot": true}},
{"entry": {"id": "GROUP_EVERYONE", "displayName": "EVERYONE", "isRoot": true}}
]
}
}
createGroup

Creates a new group.

Parameters:

NameTypeRequiredDescription
payloadGroupBodyCreateYesThe group details including id, displayName, and optional parentIds.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateGroupQueriesNoQuery parameters including include and fields.

Returns: GroupEntry|error

Sample code:

alfresco:GroupEntry group = check alfrescoClient->createGroup({
id: "GROUP_DEVELOPERS",
displayName: "Developers"
});

Sample response:

{
"entry": {
"id": "GROUP_DEVELOPERS",
"displayName": "Developers",
"isRoot": true
}
}
getGroup

Retrieves details of a specific group.

Parameters:

NameTypeRequiredDescription
groupIdstringYesThe identifier of the group.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetGroupQueriesNoQuery parameters including include and fields.

Returns: GroupEntry|error

Sample code:

alfresco:GroupEntry group = check alfrescoClient->getGroup("GROUP_DEVELOPERS");

Sample response:

{
"entry": {
"id": "GROUP_DEVELOPERS",
"displayName": "Developers",
"isRoot": true
}
}
updateGroup

Updates the display name of a group.

Parameters:

NameTypeRequiredDescription
groupIdstringYesThe identifier of the group.
payloadGroupBodyUpdateYesThe updated group details.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesUpdateGroupQueriesNoQuery parameters including include and fields.

Returns: GroupEntry|error

Sample code:

alfresco:GroupEntry updatedGroup = check alfrescoClient->updateGroup("GROUP_DEVELOPERS", {
displayName: "Engineering Developers"
});

Sample response:

{
"entry": {
"id": "GROUP_DEVELOPERS",
"displayName": "Engineering Developers",
"isRoot": true
}
}
deleteGroup

Deletes a group.

Parameters:

NameTypeRequiredDescription
groupIdstringYesThe identifier of the group.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesDeleteGroupQueriesNoQuery parameters including cascade (boolean to delete sub-groups).

Returns: error?

Sample code:

check alfrescoClient->deleteGroup("GROUP_DEVELOPERS");
listGroupMemberships

Lists members of a specific group.

Parameters:

NameTypeRequiredDescription
groupIdstringYesThe identifier of the group.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListGroupMembershipsQueriesNoQuery parameters including skipCount, maxItems, orderBy, and where.

Returns: GroupMemberPaging|error

Sample code:

alfresco:GroupMemberPaging members = check alfrescoClient->listGroupMemberships("GROUP_DEVELOPERS");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "jsmith", "displayName": "Jane Smith", "memberType": "PERSON"}}
]
}
}
createGroupMembership

Adds a person or group as a member of a group.

Parameters:

NameTypeRequiredDescription
groupIdstringYesThe identifier of the group.
payloadGroupMembershipBodyCreateYesThe member ID and member type (PERSON or GROUP).
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateGroupMembershipQueriesNoQuery parameters including fields.

Returns: GroupMemberEntry|error

Sample code:

alfresco:GroupMemberEntry member = check alfrescoClient->createGroupMembership("GROUP_DEVELOPERS", {
id: "jsmith",
memberType: "PERSON"
});

Sample response:

{"entry": {"id": "jsmith", "displayName": "Jane Smith", "memberType": "PERSON"}}
deleteGroupMembership

Removes a member from a group.

Parameters:

NameTypeRequiredDescription
groupIdstringYesThe identifier of the group.
groupMemberIdstringYesThe identifier of the member to remove.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteGroupMembership("GROUP_DEVELOPERS", "jsmith");
listSharedLinks

Lists all shared links the current user has access to.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListSharedLinksQueriesNoQuery parameters including skipCount, maxItems, where, include, and fields.

Returns: SharedLinkPaging|error

Sample code:

alfresco:SharedLinkPaging sharedLinks = check alfrescoClient->listSharedLinks();

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "abc123xyz", "nodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "hello.txt", "modifiedAt": "2025-06-01T12:00:00.000+0000"}}
]
}
}
createSharedLink

Creates a shared link for a node, enabling external sharing.

Parameters:

NameTypeRequiredDescription
payloadSharedLinkBodyCreateYesThe nodeId and optional expiresAt datetime.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateSharedLinkQueriesNoQuery parameters including include and fields.

Returns: SharedLinkEntry|error

Sample code:

alfresco:SharedLinkEntry sharedLink = check alfrescoClient->createSharedLink({
nodeId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
});

Sample response:

{
"entry": {
"id": "abc123xyz",
"nodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"modifiedAt": "2025-06-01T12:00:00.000+0000"
}
}
getSharedLink

Retrieves details of a shared link.

Parameters:

NameTypeRequiredDescription
sharedIdstringYesThe identifier of the shared link.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetSharedLinkQueriesNoQuery parameters including fields.

Returns: SharedLinkEntry|error

Sample code:

alfresco:SharedLinkEntry link = check alfrescoClient->getSharedLink("abc123xyz");

Sample response:

{
"entry": {
"id": "abc123xyz",
"nodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "hello.txt",
"modifiedAt": "2025-06-01T12:00:00.000+0000"
}
}
deleteSharedLink

Deletes a shared link.

Parameters:

NameTypeRequiredDescription
sharedIdstringYesThe identifier of the shared link.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteSharedLink("abc123xyz");
emailSharedLink

Sends an email with a shared link to specified recipients.

Parameters:

NameTypeRequiredDescription
sharedIdstringYesThe identifier of the shared link.
payloadSharedLinkBodyEmailYesEmail details including client, message, and recipientEmails.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->emailSharedLink("abc123xyz", {
'client: "alfresco",
message: "Please review this document.",
recipientEmails: ["[email protected]"]
});

Search & find operations

findNodes

Searches for nodes by a term string.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesFindNodesQueriesYesQuery parameters including term (required), rootNodeId, nodeType, include, orderBy, skipCount, maxItems, and fields.

Returns: NodePaging|error

Sample code:

alfresco:NodePaging results = check alfrescoClient->findNodes(term = "quarterly report");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "abc123", "name": "Q3-Quarterly-Report.pdf", "nodeType": "cm:content", "isFolder": false, "isFile": true}}
]
}
}
findSites

Searches for sites by a term string.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesFindSitesQueriesYesQuery parameters including term (required), skipCount, maxItems, orderBy, and fields.

Returns: SitePaging|error

Sample code:

alfresco:SitePaging siteResults = check alfrescoClient->findSites(term = "engineering");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "engineering", "guid": "site-guid-001", "title": "Engineering", "visibility": "PRIVATE"}}
]
}
}
findPeople

Searches for people by a term string.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesFindPeopleQueriesYesQuery parameters including term (required), skipCount, maxItems, orderBy, and fields.

Returns: PersonPaging|error

Sample code:

alfresco:PersonPaging peopleResults = check alfrescoClient->findPeople(term = "jane");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "jsmith", "firstName": "Jane", "lastName": "Smith", "email": "[email protected]"}}
]
}
}

Audit operations

listAuditApps

Lists all audit applications in the repository.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListAuditAppsQueriesNoQuery parameters including skipCount, maxItems, and fields.

Returns: AuditAppPaging|error

Sample code:

alfresco:AuditAppPaging auditApps = check alfrescoClient->listAuditApps();

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "alfresco-access", "name": "alfresco-access", "isEnabled": true}}
]
}
}
getAuditApp

Retrieves details of a specific audit application.

Parameters:

NameTypeRequiredDescription
auditApplicationIdstringYesThe identifier of the audit application.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesGetAuditAppQueriesNoQuery parameters including fields.

Returns: AuditApp|error

Sample code:

alfresco:AuditApp auditApp = check alfrescoClient->getAuditApp("alfresco-access");

Sample response:

{"id": "alfresco-access", "name": "alfresco-access", "isEnabled": true}
listAuditEntriesForAuditApp

Lists audit entries for a specific audit application.

Parameters:

NameTypeRequiredDescription
auditApplicationIdstringYesThe identifier of the audit application.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListAuditEntriesForAuditAppQueriesNoQuery parameters including skipCount, maxItems, where, include, orderBy, and fields.

Returns: AuditEntryPaging|error

Sample code:

alfresco:AuditEntryPaging entries = check alfrescoClient->listAuditEntriesForAuditApp("alfresco-access");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": true, "totalItems": 500, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "1", "auditApplicationId": "alfresco-access", "createdByUser": {"id": "admin", "displayName": "Administrator"}, "createdAt": "2025-06-01T12:00:00.000+0000"}}
]
}
}
listAuditEntriesForNode

Lists audit entries associated with a specific node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListAuditEntriesForNodeQueriesNoQuery parameters including skipCount, maxItems, and fields.

Returns: AuditEntryPaging|error

Sample code:

alfresco:AuditEntryPaging nodeAudit = check alfrescoClient->listAuditEntriesForNode("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "42", "auditApplicationId": "alfresco-access", "createdByUser": {"id": "admin", "displayName": "Administrator"}, "createdAt": "2025-06-01T12:00:00.000+0000"}}
]
}
}

Action operations

listActions

Lists all available action definitions in the repository.

Parameters:

NameTypeRequiredDescription
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListActionsQueriesNoQuery parameters including skipCount, maxItems, orderBy, and fields.

Returns: ActionDefinitionList|error

Sample code:

alfresco:ActionDefinitionList actions = check alfrescoClient->listActions();

Sample response:

{
"list": {
"pagination": {"count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "copy", "name": "copy", "title": "Copy", "description": "Copy a node to a destination folder"}},
{"entry": {"id": "move", "name": "move", "title": "Move", "description": "Move a node to a destination folder"}}
]
}
}
actionDetails

Retrieves details of a specific action definition.

Parameters:

NameTypeRequiredDescription
actionDefinitionIdstringYesThe identifier of the action definition.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: ActionDefinitionEntry|error

Sample code:

alfresco:ActionDefinitionEntry actionDef = check alfrescoClient->actionDetails("copy");

Sample response:

{
"entry": {
"id": "copy",
"name": "copy",
"title": "Copy",
"description": "Copy a node to a destination folder",
"applicableTypes": [],
"trackStatus": false,
"parameterDefinitions": [
{"name": "destination-folder", "type": "d:noderef", "multiValued": false, "mandatory": true, "displayLabel": "Destination Folder"}
]
}
}
actionExec

Executes an action against a target node.

Parameters:

NameTypeRequiredDescription
payloadActionBodyExecYesThe action definition ID, target node ID, and optional parameters.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: ActionExecResultEntry|error

Sample code:

alfresco:ActionExecResultEntry result = check alfrescoClient->actionExec({
actionDefinitionId: "copy",
targetId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
params: {
"destination-folder": "d4f0a4b2-1a3e-4c5f-9b8e-7d6c5e4f3a2b"
}
});

Sample response:

{"entry": {"id": "action-exec-001"}}
nodeActions

Lists the action definitions applicable to a specific node.

Parameters:

NameTypeRequiredDescription
nodeIdstringYesThe identifier of the node.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesNodeActionsQueriesNoQuery parameters including skipCount, maxItems, orderBy, and fields.

Returns: ActionDefinitionList|error

Sample code:

alfresco:ActionDefinitionList nodeActions = check alfrescoClient->nodeActions("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

Sample response:

{
"list": {
"pagination": {"count": 5, "hasMoreItems": false, "totalItems": 5, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": "copy", "name": "copy", "title": "Copy"}},
{"entry": {"id": "move", "name": "move", "title": "Move"}},
{"entry": {"id": "check-out", "name": "check-out", "title": "Check Out"}},
{"entry": {"id": "check-in", "name": "check-in", "title": "Check In"}},
{"entry": {"id": "extract-metadata", "name": "extract-metadata", "title": "Extract Metadata"}}
]
}
}

Favorites & activities

listFavorites

Lists all favorites for a person.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person (or -me-).
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListFavoritesQueriesNoQuery parameters including skipCount, maxItems, where, include, orderBy, and fields.

Returns: FavoritePaging|error

Sample code:

alfresco:FavoritePaging favorites = check alfrescoClient->listFavorites("-me-");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"targetGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "createdAt": "2025-06-01T12:00:00.000+0000"}}
]
}
}
createFavorite

Creates a new favorite for a person (file, folder, or site).

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person (or -me-).
payloadFavoriteBodyCreateYesThe target to favorite.
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesCreateFavoriteQueriesNoQuery parameters including include and fields.

Returns: FavoriteEntry|error

Sample code:

alfresco:FavoriteEntry favorite = check alfrescoClient->createFavorite("-me-", {
target: {
file: {
guid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
});

Sample response:

{
"entry": {
"targetGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"createdAt": "2025-06-01T15:00:00.000+0000"
}
}
deleteFavorite

Removes a favorite for a person.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person (or -me-).
favoriteIdstringYesThe identifier of the favorite.
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: error?

Sample code:

check alfrescoClient->deleteFavorite("-me-", "a1b2c3d4-e5f6-7890-abcd-ef1234567890");
listActivitiesForPerson

Lists activities (activity feed) for a person.

Parameters:

NameTypeRequiredDescription
personIdstringYesThe identifier of the person (or -me-).
headersmap<string|string[]>NoHeaders to be sent with the request.
queriesListActivitiesForPersonQueriesNoQuery parameters including skipCount, maxItems, who, siteId, and fields.

Returns: ActivityPaging|error

Sample code:

alfresco:ActivityPaging activities = check alfrescoClient->listActivitiesForPerson("-me-");

Sample response:

{
"list": {
"pagination": {"count": 1, "hasMoreItems": false, "totalItems": 1, "skipCount": 0, "maxItems": 100},
"entries": [
{"entry": {"id": 1001, "siteId": "engineering", "postPersonId": "admin", "activityType": "org.alfresco.documentlibrary.file-added", "postedAt": "2025-06-01T12:00:00.000+0000"}}
]
}
}

Probe operations

getProbe

Checks the health/readiness of the Alfresco repository. Used for liveness and readiness probes.

Parameters:

NameTypeRequiredDescription
probeIdstringYesThe probe identifier (-ready- or -live-).
headersmap<string|string[]>NoHeaders to be sent with the request.

Returns: ProbeEntry|error

Sample code:

alfresco:ProbeEntry probe = check alfrescoClient->getProbe("-ready-");

Sample response:

{"entry": {"message": "READY"}}