From d9122649c0766f51e8ed31938dc91fb79ea1b8fd Mon Sep 17 00:00:00 2001 From: Mohit Singh Date: Wed, 17 Apr 2024 09:59:15 +0530 Subject: [PATCH 1/7] [MNT-24127] Added Endpoint to calculate Size --- .../webapp/definitions/alfresco-core.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index 625717be..1b9d5c27 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -2484,6 +2484,35 @@ paths: description: Unexpected error schema: $ref: '#/definitions/Error' + '/nodes/{nodeId}/calculateSize': + get: + tags: + - nodes + summary: Get folder size + description: | + Get the size of a folder + operationId: getFolderSize + produces: + - application/json + parameters: + - $ref: '#/parameters/nodeTargetIdParam' + responses: + '202': + description: Request Accepted + '200': + description: Successful response + schema: + $ref: '#/definitions/calculateSizeResponse' + '401': + description: Authentication failed + '403': + description: Current user does not have permission for **nodeId** + '404': + description: Entity with **nodeId** does not exist + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' '/nodes/{nodeId}/secondary-children': post: @@ -10690,6 +10719,13 @@ definitions: $ref: '#/definitions/PermissionsInfo' definition: $ref: '#/definitions/Definition' + calculateSizeResponse: + type: object + properties: + id: + type: string + size: + type: string ProbeEntry: type: object required: From 0d66cc5d24b7eb28615fc3bae8fe8c74d7b6bcb3 Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Tue, 18 Jun 2024 18:13:45 +0530 Subject: [PATCH 2/7] [MNT-24127] Added Endpoint to Calculate Folder Size. --- .../webapp/definitions/alfresco-core.yaml | 95 ++++++++++++++++--- 1 file changed, 84 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index 1b9d5c27..bf9cd5dc 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -123,12 +123,19 @@ parameters: description: The identifier of a target node. required: true type: string - nodeFolderIdParam: - name: nodeId - in: path - description: The identifier of a folder node. - required: true - type: string + maxItemsForSizeParam: + name: maxItems + in: query + description: | + This assists in handling scenarios where ***large files*** or ***subfolders*** exist within a folder, + allowing the folder size determination mechanism to function in chunks. + + So that calculating the huge folder will be done efficiently. + If not supplied then the default value is 100. + required: false + type: integer + minimum: 1 + default: 100 nodeMinimalEntryIncludeParam: name: include in: query @@ -2485,22 +2492,79 @@ paths: schema: $ref: '#/definitions/Error' '/nodes/{nodeId}/calculateSize': - get: + post: + x-alfresco-since: "5.2" tags: - nodes - summary: Get folder size + summary: Calculate a folder size description: | - Get the size of a folder - operationId: getFolderSize + + This may be executed against a node specified by **nodeId** and this nodeId must be a valid node ID. + Furthermore, this POST endpoint will be executed **asynchronously** with a `202` HTTP response signifying that + the request has been accepted successfully. + + The response body will include the ```nodeId``` of the pending action, which can be used in a + **GET/calculateSize** endpoint to check if the action's status has been completed, at which point the result will be returned, comprising ```the size of the node in bytes```. + + Essentially, ```maxItems``` ***parameter*** is utilized for pagination purposes. + + By default, **results are limited to the first 100.** + Results can be restricted using "paging". For example: + + ```JSON + "paging": { + "maxItems": "50", + "skipCount": "28" + } + ``` + This assists in handling scenarios where large files or subfolders exist within a folder, allowing the folder size determination mechanism to function in chunks. + + operationId: calculateSize produces: - application/json parameters: - $ref: '#/parameters/nodeTargetIdParam' + - $ref: '#/parameters/maxItemsForSizeParam' responses: '202': description: Request Accepted + schema: + $ref: '#/definitions/sizeAcknowledgedResponse' + '401': + description: Authentication failed + '403': + description: Current user does not have permission for **nodeId** + '404': + description: Entity with **nodeId** does not exist + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + get: + x-alfresco-since: "5.2" + tags: + - nodes + summary: Get the size of folder after initiating POST/calculate Endpoint. + description: | + ***Receiving the size*** + + This endpoint takes ```nodeId``` as a path parameter and returns the result after executing above POST request. + + Below are the three stages, which reflect the status for the present execution ***nodeId***. + + ``` + NOT INITIATED: Not Iniated yet. + IN-PROGRESS: Calculating execution is in progress. + COMPLETED: Calculation has been done. + ``` + operationId: getSize + produces: + - application/json + parameters: + - $ref: '#/parameters/nodeTargetIdParam' + responses: '200': - description: Successful response + description: Successful Response schema: $ref: '#/definitions/calculateSizeResponse' '401': @@ -10726,6 +10790,15 @@ definitions: type: string size: type: string + calculatedAtTime: + type: string + status: + type: string + sizeAcknowledgedResponse: + type: object + properties: + executionId: + type: string ProbeEntry: type: object required: From d6815e14c026819e7b110da6f42b4dca27825e1b Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Wed, 19 Jun 2024 15:08:15 +0530 Subject: [PATCH 3/7] [MNT-24127] Added Endpoint to Calculate Folder Size. --- .../webapp/definitions/alfresco-core.yaml | 377 +++++++++--------- 1 file changed, 187 insertions(+), 190 deletions(-) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index bf9cd5dc..af6b25f2 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -455,14 +455,14 @@ parameters: name: attachment in: query description: | - **true** enables a web browser to download the file as an attachment. - **false** means a web browser may preview the file in a new tab or window. - - You can only set this parameter to **false** if the content type of the file is in the supported list; - for example, certain image files and PDF files. - - If the content type is not supported for preview, then a value of **false** is ignored, and - the attachment will be returned in the response. + **true** enables a web browser to download the file as an attachment. + **false** means a web browser may preview the file in a new tab or window. + + You can only set this parameter to **false** if the content type of the file is in the supported list; + for example, certain image files and PDF files. + + If the content type is not supported for preview, then a value of **false** is ignored, and + the attachment will be returned in the response. required: false default: true type: boolean @@ -1338,21 +1338,21 @@ paths: - nodes summary: Delete a node description: | - **Note:** this endpoint is available in Alfresco 5.2 and newer versions. - - Deletes the node **nodeId**. - - If **nodeId** is a folder, then its children are also deleted. - - Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin. - - Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted - node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. - - **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary - child association is restored. This applies recursively for any primary children. No other secondary child associations or - peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original - associations were to nodes inside or outside the restored hierarchy. + **Note:** this endpoint is available in Alfresco 5.2 and newer versions. + + Deletes the node **nodeId**. + + If **nodeId** is a folder, then its children are also deleted. + + Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin. + + Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted + node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. + + **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary + child association is restored. This applies recursively for any primary children. No other secondary child associations or + peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original + associations were to nodes inside or outside the restored hierarchy. operationId: deleteNode parameters: - $ref: '#/parameters/nodeIdParam' @@ -2493,7 +2493,6 @@ paths: $ref: '#/definitions/Error' '/nodes/{nodeId}/calculateSize': post: - x-alfresco-since: "5.2" tags: - nodes summary: Calculate a folder size @@ -2541,7 +2540,6 @@ paths: schema: $ref: '#/definitions/Error' get: - x-alfresco-since: "5.2" tags: - nodes summary: Get the size of folder after initiating POST/calculate Endpoint. @@ -2577,7 +2575,6 @@ paths: description: Unexpected error schema: $ref: '#/definitions/Error' - '/nodes/{nodeId}/secondary-children': post: x-alfresco-since: "5.2" @@ -4527,7 +4524,7 @@ paths: **nodeId** does not exist '412': description: | - Content is archived and is inaccessible + Content is archived and is inaccessible '501': description: The actual ContentStore implementation can't fulfil this request default: @@ -5807,45 +5804,45 @@ paths: - groups summary: List group memberships description: | - **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. - - Gets a list of group membership information for person **personId**. - - You can use the `-me-` string in place of `` to specify the currently authenticated user. - - You can use the **include** parameter to return additional information. - - You can use the **where** parameter to filter the returned groups by **isRoot**. For example, the following **where** - clause will return just the root groups: - - ``` - (isRoot=true) - ``` - - The **where** parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow - a result set even further. For example, the following where clause will only return groups belonging to the - `MY.ZONE` zone. - - ``` - where=(zones in ('MY.ZONE')) - ``` - - This may be combined with the isRoot filter, as shown below: - - ``` - where=(isRoot=false AND zones in ('MY.ZONE')) - ``` - - ***Note:*** restrictions include - * `AND` is the only supported operator when combining `isRoot` and `zones` filters - * Only one zone is supported by the filter - * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. - - - The default sort order for the returned list is for groups to be sorted by ascending displayName. - You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: - * id - * displayName + **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. + + Gets a list of group membership information for person **personId**. + + You can use the `-me-` string in place of `` to specify the currently authenticated user. + + You can use the **include** parameter to return additional information. + + You can use the **where** parameter to filter the returned groups by **isRoot**. For example, the following **where** + clause will return just the root groups: + + ``` + (isRoot=true) + ``` + + The **where** parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow + a result set even further. For example, the following where clause will only return groups belonging to the + `MY.ZONE` zone. + + ``` + where=(zones in ('MY.ZONE')) + ``` + + This may be combined with the isRoot filter, as shown below: + + ``` + where=(isRoot=false AND zones in ('MY.ZONE')) + ``` + + ***Note:*** restrictions include + * `AND` is the only supported operator when combining `isRoot` and `zones` filters + * Only one zone is supported by the filter + * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. + + + The default sort order for the returned list is for groups to be sorted by ascending displayName. + You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: + * id + * displayName operationId: listGroupMembershipsForPerson produces: - application/json @@ -6452,45 +6449,45 @@ paths: schema: $ref: '#/definitions/Error' '/sites/{siteId}/site-membership-requests/{inviteeId}/approve': - post: - tags: - - sites - summary: Approve a site membership request - description: | - Approve a site membership request. - operationId: approveSiteMembershipRequest - produces: - - application/json - parameters: - - $ref: '#/parameters/siteIdParam' - - $ref: '#/parameters/inviteeIdParam' - - in: body - name: siteMembershipApprovalBody - description: | - Accepting a request to join, optionally, allows assignment of a role to the user. - required: false - schema: - $ref: '#/definitions/SiteMembershipApprovalBody' - responses: - '200': - description: Successful response - '400': - description: | - Invalid parameter: value of **siteId** or **inviteeId** is invalid - '401': - description: Authentication failed - '403': - description: Current user does not have permission to approve membership request - '404': - description: | - **siteId** or **inviteeId** does not exist - '422': - description: | - Integrity exception or not allowed to approve membership request. - default: - description: Unexpected error - schema: - $ref: '#/definitions/Error' + post: + tags: + - sites + summary: Approve a site membership request + description: | + Approve a site membership request. + operationId: approveSiteMembershipRequest + produces: + - application/json + parameters: + - $ref: '#/parameters/siteIdParam' + - $ref: '#/parameters/inviteeIdParam' + - in: body + name: siteMembershipApprovalBody + description: | + Accepting a request to join, optionally, allows assignment of a role to the user. + required: false + schema: + $ref: '#/definitions/SiteMembershipApprovalBody' + responses: + '200': + description: Successful response + '400': + description: | + Invalid parameter: value of **siteId** or **inviteeId** is invalid + '401': + description: Authentication failed + '403': + description: Current user does not have permission to approve membership request + '404': + description: | + **siteId** or **inviteeId** does not exist + '422': + description: | + Integrity exception or not allowed to approve membership request. + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' '/sites/{siteId}/site-membership-requests/{inviteeId}/reject': post: tags: @@ -6771,9 +6768,9 @@ paths: - sites summary: List group membership for site description: | - **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. - - Gets a list of group membership for site **siteId**. + **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. + + Gets a list of group membership for site **siteId**. operationId: listSiteGroups produces: - application/json @@ -8134,7 +8131,7 @@ paths: ``` where=(isRoot=false AND displayName in ('MY.GROUP.NAME')) ``` - + ``` where=(zones in ('MY.ZONE') AND displayName in ('MY.GROUP.NAME')) ``` @@ -8675,7 +8672,7 @@ paths: parameters: - $ref: '#/parameters/auditApplicationIdParam' - $ref: '#/parameters/skipCountParam' - - $ref: '#/parameters/omitTotalItemsParam' + - $ref: '#/parameters/omitTotalItemsParam' - $ref: '#/parameters/orderByParam' - $ref: '#/parameters/maxItemsParam' - name: where @@ -8953,44 +8950,44 @@ paths: schema: $ref: '#/definitions/Error' '/action-definitions': - get: - x-alfresco-since: "5.2.2" - tags: - - actions - summary: Retrieve list of available actions - description: | - **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. - - Gets a list of all available actions - - The default sort order for the returned list is for actions to be sorted by ascending name. - You can override the default by using the **orderBy** parameter. - - You can use any of the following fields to order the results: - * name - * title - operationId: listActions - produces: - - application/json - parameters: - - $ref: '#/parameters/skipCountParam' - - $ref: '#/parameters/maxItemsParam' - - $ref: '#/parameters/orderByParam' - - $ref: '#/parameters/fieldsParam' - responses: - '200': - description: Successful response - schema: - $ref: '#/definitions/ActionDefinitionList' - '400': - description: | - Invalid parameter: value of **maxItems**, **skipCount** or **orderBy** is invalid - '401': - description: Authentication failed - default: - description: Unexpected error - schema: - $ref: '#/definitions/Error' + get: + x-alfresco-since: "5.2.2" + tags: + - actions + summary: Retrieve list of available actions + description: | + **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. + + Gets a list of all available actions + + The default sort order for the returned list is for actions to be sorted by ascending name. + You can override the default by using the **orderBy** parameter. + + You can use any of the following fields to order the results: + * name + * title + operationId: listActions + produces: + - application/json + parameters: + - $ref: '#/parameters/skipCountParam' + - $ref: '#/parameters/maxItemsParam' + - $ref: '#/parameters/orderByParam' + - $ref: '#/parameters/fieldsParam' + responses: + '200': + description: Successful response + schema: + $ref: '#/definitions/ActionDefinitionList' + '400': + description: | + Invalid parameter: value of **maxItems**, **skipCount** or **orderBy** is invalid + '401': + description: Authentication failed + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' '/action-definitions/{actionDefinitionId}': get: x-alfresco-since: "5.2.2" @@ -9265,7 +9262,7 @@ definitions: SiteContainerPaging: type: object required: - - list + - list properties: list: type: object @@ -9305,10 +9302,10 @@ definitions: role: type: string enum: - - SiteConsumer - - SiteCollaborator - - SiteContributor - - SiteManager + - SiteConsumer + - SiteCollaborator + - SiteContributor + - SiteManager id: type: string SiteMembershipBodyUpdate: @@ -9319,10 +9316,10 @@ definitions: role: type: string enum: - - SiteConsumer - - SiteCollaborator - - SiteContributor - - SiteManager + - SiteConsumer + - SiteCollaborator + - SiteContributor + - SiteManager SiteMemberPaging: type: object required: @@ -9776,8 +9773,8 @@ definitions: list: type: object required: - - pagination - - entries + - pagination + - entries properties: pagination: $ref: '#/definitions/Pagination' @@ -10092,8 +10089,8 @@ definitions: required: - target properties: - target: - type: object + target: + type: object FavoritePaging: type: object required: @@ -10412,8 +10409,8 @@ definitions: AssociationBody: type: object required: - - targetId - - assocType + - targetId + - assocType properties: targetId: type: string @@ -10432,8 +10429,8 @@ definitions: ChildAssociationBody: type: object required: - - childId - - assocType + - childId + - assocType properties: childId: type: string @@ -10474,8 +10471,8 @@ definitions: type: string default: ALLOWED enum: - - ALLOWED - - DENIED + - ALLOWED + - DENIED PermissionsInfo: type: object properties: @@ -10598,14 +10595,14 @@ definitions: type: string default: ALLOW_OWNER_CHANGES enum: - - ALLOW_OWNER_CHANGES - - FULL + - ALLOW_OWNER_CHANGES + - FULL lifetime: type: string default: PERSISTENT enum: - - PERSISTENT - - EPHEMERAL + - PERSISTENT + - EPHEMERAL NodePaging: type: object properties: @@ -10720,15 +10717,15 @@ definitions: Node: type: object required: - - id - - name - - nodeType - - isFolder - - isFile - - createdAt - - createdByUser - - modifiedAt - - modifiedByUser + - id + - name + - nodeType + - isFolder + - isFile + - createdAt + - createdByUser + - modifiedAt + - modifiedByUser properties: id: type: string @@ -11222,8 +11219,8 @@ definitions: createdByUser: $ref: '#/definitions/UserInfo' createdAt: - type: string - format: date-time + type: string + format: date-time values: type: object ActionConstraint: @@ -11319,12 +11316,12 @@ definitions: items: $ref: '#/definitions/ActionDefinition' ActionDefinitionEntry: - type: object - required: - - entry - properties: - entry: - $ref: '#/definitions/ActionDefinition' + type: object + required: + - entry + properties: + entry: + $ref: '#/definitions/ActionDefinition' ActionDefinition: type: object required: @@ -11517,8 +11514,8 @@ definitions: description: How to combine the clauses of this condition ("and" or "or") type: string enum: - - and - - or + - and + - or default: "and" compositeConditions: description: Nested list of composite clauses in this condition From 41c996a56504b657d20da1481dfe5ef6b9877fc9 Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Wed, 19 Jun 2024 15:52:17 +0530 Subject: [PATCH 4/7] [MNT-24127] Added Endpoint to Calculate Folder Size. --- .../webapp/definitions/alfresco-core.yaml | 370 +++++++++--------- 1 file changed, 185 insertions(+), 185 deletions(-) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index af6b25f2..11de5b67 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -455,14 +455,14 @@ parameters: name: attachment in: query description: | - **true** enables a web browser to download the file as an attachment. - **false** means a web browser may preview the file in a new tab or window. - - You can only set this parameter to **false** if the content type of the file is in the supported list; - for example, certain image files and PDF files. - - If the content type is not supported for preview, then a value of **false** is ignored, and - the attachment will be returned in the response. + **true** enables a web browser to download the file as an attachment. + **false** means a web browser may preview the file in a new tab or window. + + You can only set this parameter to **false** if the content type of the file is in the supported list; + for example, certain image files and PDF files. + + If the content type is not supported for preview, then a value of **false** is ignored, and + the attachment will be returned in the response. required: false default: true type: boolean @@ -1338,21 +1338,21 @@ paths: - nodes summary: Delete a node description: | - **Note:** this endpoint is available in Alfresco 5.2 and newer versions. - - Deletes the node **nodeId**. - - If **nodeId** is a folder, then its children are also deleted. - - Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin. - - Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted - node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. - - **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary - child association is restored. This applies recursively for any primary children. No other secondary child associations or - peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original - associations were to nodes inside or outside the restored hierarchy. + **Note:** this endpoint is available in Alfresco 5.2 and newer versions. + + Deletes the node **nodeId**. + + If **nodeId** is a folder, then its children are also deleted. + + Deleted nodes move to the trashcan unless the **permanent** query parameter is **true** and the current user is the owner of the node or an admin. + + Deleting a node deletes it from its primary parent and also from any secondary parents. Peer associations are also deleted, where the deleted + node is either a source or target of an association. This applies recursively to any hierarchy of primary children of the deleted node. + + **Note:** If the node is not permanently deleted, and is later successfully restored to its former primary parent, then the primary + child association is restored. This applies recursively for any primary children. No other secondary child associations or + peer associations are restored for any of the nodes in the primary parent-child hierarchy of restored nodes, regardless of whether the original + associations were to nodes inside or outside the restored hierarchy. operationId: deleteNode parameters: - $ref: '#/parameters/nodeIdParam' @@ -5804,45 +5804,45 @@ paths: - groups summary: List group memberships description: | - **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. - - Gets a list of group membership information for person **personId**. - - You can use the `-me-` string in place of `` to specify the currently authenticated user. - - You can use the **include** parameter to return additional information. - - You can use the **where** parameter to filter the returned groups by **isRoot**. For example, the following **where** - clause will return just the root groups: - - ``` - (isRoot=true) - ``` - - The **where** parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow - a result set even further. For example, the following where clause will only return groups belonging to the - `MY.ZONE` zone. - - ``` - where=(zones in ('MY.ZONE')) - ``` - - This may be combined with the isRoot filter, as shown below: - - ``` - where=(isRoot=false AND zones in ('MY.ZONE')) - ``` - - ***Note:*** restrictions include - * `AND` is the only supported operator when combining `isRoot` and `zones` filters - * Only one zone is supported by the filter - * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. - - - The default sort order for the returned list is for groups to be sorted by ascending displayName. - You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: - * id - * displayName + **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. + + Gets a list of group membership information for person **personId**. + + You can use the `-me-` string in place of `` to specify the currently authenticated user. + + You can use the **include** parameter to return additional information. + + You can use the **where** parameter to filter the returned groups by **isRoot**. For example, the following **where** + clause will return just the root groups: + + ``` + (isRoot=true) + ``` + + The **where** parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow + a result set even further. For example, the following where clause will only return groups belonging to the + `MY.ZONE` zone. + + ``` + where=(zones in ('MY.ZONE')) + ``` + + This may be combined with the isRoot filter, as shown below: + + ``` + where=(isRoot=false AND zones in ('MY.ZONE')) + ``` + + ***Note:*** restrictions include + * `AND` is the only supported operator when combining `isRoot` and `zones` filters + * Only one zone is supported by the filter + * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. + + + The default sort order for the returned list is for groups to be sorted by ascending displayName. + You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: + * id + * displayName operationId: listGroupMembershipsForPerson produces: - application/json @@ -6449,45 +6449,45 @@ paths: schema: $ref: '#/definitions/Error' '/sites/{siteId}/site-membership-requests/{inviteeId}/approve': - post: - tags: - - sites - summary: Approve a site membership request - description: | - Approve a site membership request. - operationId: approveSiteMembershipRequest - produces: - - application/json - parameters: - - $ref: '#/parameters/siteIdParam' - - $ref: '#/parameters/inviteeIdParam' - - in: body - name: siteMembershipApprovalBody - description: | - Accepting a request to join, optionally, allows assignment of a role to the user. - required: false - schema: - $ref: '#/definitions/SiteMembershipApprovalBody' - responses: - '200': - description: Successful response - '400': - description: | - Invalid parameter: value of **siteId** or **inviteeId** is invalid - '401': - description: Authentication failed - '403': - description: Current user does not have permission to approve membership request - '404': - description: | - **siteId** or **inviteeId** does not exist - '422': - description: | - Integrity exception or not allowed to approve membership request. - default: - description: Unexpected error - schema: - $ref: '#/definitions/Error' + post: + tags: + - sites + summary: Approve a site membership request + description: | + Approve a site membership request. + operationId: approveSiteMembershipRequest + produces: + - application/json + parameters: + - $ref: '#/parameters/siteIdParam' + - $ref: '#/parameters/inviteeIdParam' + - in: body + name: siteMembershipApprovalBody + description: | + Accepting a request to join, optionally, allows assignment of a role to the user. + required: false + schema: + $ref: '#/definitions/SiteMembershipApprovalBody' + responses: + '200': + description: Successful response + '400': + description: | + Invalid parameter: value of **siteId** or **inviteeId** is invalid + '401': + description: Authentication failed + '403': + description: Current user does not have permission to approve membership request + '404': + description: | + **siteId** or **inviteeId** does not exist + '422': + description: | + Integrity exception or not allowed to approve membership request. + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' '/sites/{siteId}/site-membership-requests/{inviteeId}/reject': post: tags: @@ -6768,9 +6768,9 @@ paths: - sites summary: List group membership for site description: | - **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. - - Gets a list of group membership for site **siteId**. + **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. + + Gets a list of group membership for site **siteId**. operationId: listSiteGroups produces: - application/json @@ -8131,7 +8131,7 @@ paths: ``` where=(isRoot=false AND displayName in ('MY.GROUP.NAME')) ``` - + ``` where=(zones in ('MY.ZONE') AND displayName in ('MY.GROUP.NAME')) ``` @@ -8950,44 +8950,44 @@ paths: schema: $ref: '#/definitions/Error' '/action-definitions': - get: - x-alfresco-since: "5.2.2" - tags: - - actions - summary: Retrieve list of available actions - description: | - **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. - - Gets a list of all available actions - - The default sort order for the returned list is for actions to be sorted by ascending name. - You can override the default by using the **orderBy** parameter. - - You can use any of the following fields to order the results: - * name - * title - operationId: listActions - produces: - - application/json - parameters: - - $ref: '#/parameters/skipCountParam' - - $ref: '#/parameters/maxItemsParam' - - $ref: '#/parameters/orderByParam' - - $ref: '#/parameters/fieldsParam' - responses: - '200': - description: Successful response - schema: - $ref: '#/definitions/ActionDefinitionList' - '400': - description: | - Invalid parameter: value of **maxItems**, **skipCount** or **orderBy** is invalid - '401': - description: Authentication failed - default: - description: Unexpected error - schema: - $ref: '#/definitions/Error' + get: + x-alfresco-since: "5.2.2" + tags: + - actions + summary: Retrieve list of available actions + description: | + **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. + + Gets a list of all available actions + + The default sort order for the returned list is for actions to be sorted by ascending name. + You can override the default by using the **orderBy** parameter. + + You can use any of the following fields to order the results: + * name + * title + operationId: listActions + produces: + - application/json + parameters: + - $ref: '#/parameters/skipCountParam' + - $ref: '#/parameters/maxItemsParam' + - $ref: '#/parameters/orderByParam' + - $ref: '#/parameters/fieldsParam' + responses: + '200': + description: Successful response + schema: + $ref: '#/definitions/ActionDefinitionList' + '400': + description: | + Invalid parameter: value of **maxItems**, **skipCount** or **orderBy** is invalid + '401': + description: Authentication failed + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' '/action-definitions/{actionDefinitionId}': get: x-alfresco-since: "5.2.2" @@ -9262,7 +9262,7 @@ definitions: SiteContainerPaging: type: object required: - - list + - list properties: list: type: object @@ -9302,10 +9302,10 @@ definitions: role: type: string enum: - - SiteConsumer - - SiteCollaborator - - SiteContributor - - SiteManager + - SiteConsumer + - SiteCollaborator + - SiteContributor + - SiteManager id: type: string SiteMembershipBodyUpdate: @@ -9316,10 +9316,10 @@ definitions: role: type: string enum: - - SiteConsumer - - SiteCollaborator - - SiteContributor - - SiteManager + - SiteConsumer + - SiteCollaborator + - SiteContributor + - SiteManager SiteMemberPaging: type: object required: @@ -9773,8 +9773,8 @@ definitions: list: type: object required: - - pagination - - entries + - pagination + - entries properties: pagination: $ref: '#/definitions/Pagination' @@ -10089,8 +10089,8 @@ definitions: required: - target properties: - target: - type: object + target: + type: object FavoritePaging: type: object required: @@ -10409,8 +10409,8 @@ definitions: AssociationBody: type: object required: - - targetId - - assocType + - targetId + - assocType properties: targetId: type: string @@ -10429,8 +10429,8 @@ definitions: ChildAssociationBody: type: object required: - - childId - - assocType + - childId + - assocType properties: childId: type: string @@ -10471,8 +10471,8 @@ definitions: type: string default: ALLOWED enum: - - ALLOWED - - DENIED + - ALLOWED + - DENIED PermissionsInfo: type: object properties: @@ -10595,14 +10595,14 @@ definitions: type: string default: ALLOW_OWNER_CHANGES enum: - - ALLOW_OWNER_CHANGES - - FULL + - ALLOW_OWNER_CHANGES + - FULL lifetime: type: string default: PERSISTENT enum: - - PERSISTENT - - EPHEMERAL + - PERSISTENT + - EPHEMERAL NodePaging: type: object properties: @@ -10717,15 +10717,15 @@ definitions: Node: type: object required: - - id - - name - - nodeType - - isFolder - - isFile - - createdAt - - createdByUser - - modifiedAt - - modifiedByUser + - id + - name + - nodeType + - isFolder + - isFile + - createdAt + - createdByUser + - modifiedAt + - modifiedByUser properties: id: type: string @@ -11219,8 +11219,8 @@ definitions: createdByUser: $ref: '#/definitions/UserInfo' createdAt: - type: string - format: date-time + type: string + format: date-time values: type: object ActionConstraint: @@ -11316,12 +11316,12 @@ definitions: items: $ref: '#/definitions/ActionDefinition' ActionDefinitionEntry: - type: object - required: - - entry - properties: - entry: - $ref: '#/definitions/ActionDefinition' + type: object + required: + - entry + properties: + entry: + $ref: '#/definitions/ActionDefinition' ActionDefinition: type: object required: @@ -11514,8 +11514,8 @@ definitions: description: How to combine the clauses of this condition ("and" or "or") type: string enum: - - and - - or + - and + - or default: "and" compositeConditions: description: Nested list of composite clauses in this condition From 8677fba4e50870cf64268a4b48e19017eece1b26 Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Fri, 21 Jun 2024 12:23:10 +0530 Subject: [PATCH 5/7] [MNT-24127] Added Endpoint to Calculate Folder Size. --- src/main/webapp/definitions/alfresco-core.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index 11de5b67..aeea1630 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -2542,7 +2542,7 @@ paths: get: tags: - nodes - summary: Get the size of folder after initiating POST/calculate Endpoint. + summary: Get the size of folder after initiating POST/calculateSize Endpoint. description: | ***Receiving the size*** @@ -10785,17 +10785,22 @@ definitions: properties: id: type: string + description: Provides the id for which POST/calculateSize has been initiated. size: type: string + description: Provides a folder size in bytes. calculatedAtTime: type: string + description: Provides the time when the calculating folder size will be completed. status: type: string + description: Provides a status that signifies the completion of the calculateSize mechanism. sizeAcknowledgedResponse: type: object properties: executionId: type: string + description: Provides nodeId indicating that the request has been acknowledged. ProbeEntry: type: object required: From f439d5cc0e1c52b6c9e73af69eaa10db26806e2f Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Fri, 21 Jun 2024 18:18:55 +0530 Subject: [PATCH 6/7] [MNT-24127] Added Endpoint to Calculate Folder Size. --- src/main/webapp/definitions/alfresco-core.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index aeea1630..c7d0afd7 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -2529,6 +2529,9 @@ paths: description: Request Accepted schema: $ref: '#/definitions/sizeAcknowledgedResponse' + '400': + description: | + Invalid parameter: **nodeId** is not of Folder Type '401': description: Authentication failed '403': @@ -2565,6 +2568,9 @@ paths: description: Successful Response schema: $ref: '#/definitions/calculateSizeResponse' + '400': + description: | + Invalid parameter: **nodeId** is not of Folder Type '401': description: Authentication failed '403': From 4cce1f4b031332804fe657e8572cd55359e6e602 Mon Sep 17 00:00:00 2001 From: mohit-singh4 Date: Mon, 24 Jun 2024 10:16:08 +0530 Subject: [PATCH 7/7] [MNT-24127] Added Endpoint to Calculate Folder Size. --- src/main/webapp/definitions/alfresco-core.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/webapp/definitions/alfresco-core.yaml b/src/main/webapp/definitions/alfresco-core.yaml index c7d0afd7..e475f72f 100755 --- a/src/main/webapp/definitions/alfresco-core.yaml +++ b/src/main/webapp/definitions/alfresco-core.yaml @@ -10798,6 +10798,9 @@ definitions: calculatedAtTime: type: string description: Provides the time when the calculating folder size will be completed. + numberOfFiles: + type: integer + description: Provides the number of files in the folder. status: type: string description: Provides a status that signifies the completion of the calculateSize mechanism.