Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT-24127] Added Endpoint to Calculate the Folder Size. #215

Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d912264
[MNT-24127] Added Endpoint to calculate Size
mohit-singh4 Apr 17, 2024
0d66cc5
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 18, 2024
d6815e1
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 19, 2024
41c996a
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 19, 2024
8677fba
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 21, 2024
f439d5c
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 21, 2024
4cce1f4
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 24, 2024
da50808
Merge branch 'master' of github.com:Alfresco/rest-api-explorer into f…
mohit-singh4 Jun 25, 2024
bd02296
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 25, 2024
58b79e2
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 25, 2024
2747ef9
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 28, 2024
be8fd6f
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 28, 2024
c60dd43
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jun 28, 2024
86225e2
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jul 2, 2024
162d5f6
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jul 2, 2024
8a4bd1e
[MNT-24127] Added Endpoint to Calculate Folder Size.
mohit-singh4 Jul 22, 2024
13f0338
[feature/MNT-24127] AddedEndpointToCalculateTheFolderSize
mohit-singh4 Jul 23, 2024
a449659
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Added Swagg…
mohit-singh4 Jul 31, 2024
526085b
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Added swagg…
mohit-singh4 Aug 5, 2024
2ded532
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Added swagg…
mohit-singh4 Aug 6, 2024
f241a31
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Added swagg…
mohit-singh4 Aug 7, 2024
1236919
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Aug 22, 2024
32e6ef0
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Aug 22, 2024
083b1b0
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Aug 23, 2024
85297a2
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Aug 23, 2024
ba492a6
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Aug 28, 2024
417181c
size details api as per the relationship API framework
kavitshah-gl Sep 3, 2024
531616c
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Sep 4, 2024
0af2182
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Sep 13, 2024
87d62e7
[feature/MNT-24127-AddedEndpointToCalculateTheFolderSize] Updated swa…
Sep 19, 2024
2607921
Merge branch 'master' of github.com:Alfresco/rest-api-explorer into f…
Nov 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 128 additions & 3 deletions src/main/webapp/definitions/alfresco-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ parameters:
description: The identifier of a target node.
required: true
type: string
jobIdParam:
name: jobId
in: path
description: The identifier of a job.
required: true
type: string
nodeFolderIdParam:
mohit-singh4 marked this conversation as resolved.
Show resolved Hide resolved
name: nodeId
in: path
Expand Down Expand Up @@ -2198,6 +2204,83 @@ paths:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/nodes/{nodeId}/size-details':
post:
tags:
- nodes
summary: Accepts request to generate Node Size Details
description: |

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 ```jobId``` of the pending/completed action.
operationId: getNodeSizeDetailsRequest
produces:
- application/json
parameters:
- $ref: '#/parameters/nodeTargetIdParam'
responses:
'202':
description: Request Accepted
schema:
$ref: '#/definitions/sizeDetailsRequestResultEntry'
'401':
description: Authentication failed
'403':
description: Current user does not have permission for **nodeId**
'404':
description: |
**nodeId** or **folderId** does not exist
'422':
description: |
Invalid parameter: value of **nodeId** is invalid
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/nodes/{nodeId}/size-details/{jobId}':
get:
tags:
- nodes
summary: Get the result of a background job to get the size of a node.
description: |
***Receiving the size***
This endpoint takes ```nodeId``` and ```jobId``` as the path parameters and returns the result after executing above GET request.
The size details job can be in one of three states:

```
NOT-INITIATED: Not Initiated yet.
IN-PROGRESS: Calculation is in progress.
COMPLETED: Calculation has been done.
```

operationId: getNodeSizeDetails
produces:
- application/json
parameters:
- $ref: '#/parameters/nodeTargetIdParam'
- $ref: '#/parameters/jobIdParam'
responses:
'200':
description: Successful Response
schema:
$ref: '#/definitions/getNodeSizeDetailsResponse'
'401':
description: Authentication failed
'403':
description: Current user does not have permission for **nodeId**
'404':
description: |
**nodeId** or **jobId** does not exist
'422':
description: |
Invalid parameter: value of **nodeId** is invalid
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/nodes/{nodeId}/renditions':
post:
x-alfresco-since: "5.2"
Expand Down Expand Up @@ -2484,7 +2567,6 @@ paths:
description: Unexpected error
schema:
$ref: '#/definitions/Error'

'/nodes/{nodeId}/secondary-children':
post:
x-alfresco-since: "5.2"
Expand Down Expand Up @@ -4434,7 +4516,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:
Expand Down Expand Up @@ -8582,7 +8664,7 @@ paths:
parameters:
- $ref: '#/parameters/auditApplicationIdParam'
- $ref: '#/parameters/skipCountParam'
- $ref: '#/parameters/omitTotalItemsParam'
- $ref: '#/parameters/omitTotalItemsParam'
- $ref: '#/parameters/orderByParam'
- $ref: '#/parameters/maxItemsParam'
- name: where
Expand Down Expand Up @@ -10690,6 +10772,34 @@ definitions:
$ref: '#/definitions/PermissionsInfo'
definition:
$ref: '#/definitions/Definition'
getNodeSizeDetailsResponse:
type: object
properties:
id:
type: string
description: Provides the nodeId for which POST/size-details has been initiated.
sizeInBytes:
type: string
description: The folder size in bytes.
calculatedAt:
type: string
description: Provides the timestamp when the calculation of folder size is 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.
```
NOT-INITIATED: Not Initiated yet.
IN-PROGRESS: Calculation is in progress.
COMPLETED: Calculation has been done.

```
jobId:
type: string
description: Provides the getId for which POST/size-details has been initiated.
ProbeEntry:
type: object
required:
Expand Down Expand Up @@ -11298,6 +11408,21 @@ definitions:
id:
type: string
description: The unique identifier of the action pending execution
sizeDetailsRequestResultEntry:
type: object
required:
- entry
properties:
entry:
$ref: '#/definitions/sizeDetailsRequestExecResult'
sizeDetailsRequestExecResult:
type: object
required:
- jobId
properties:
jobId:
type: string
description: The unique identifier of the size details execution request
Definition:
properties:
properties:
Expand Down