UNPKG

alfresco-js-api

Version:

JavaScript client library for the Alfresco REST API

1,417 lines (1,336 loc) 118 kB
swagger: '2.0' info: description: | **GS Core API** Provides access to the core features of Alfresco Governance Services. version: '1' title: Alfresco Governance Services REST API basePath: /alfresco/api/-default-/public/gs/versions/1 securityDefinitions: basicAuth: type: basic description: HTTP Basic Authentication security: - basicAuth: [] consumes: - application/json produces: - application/json tags: - name: file-plans description: Retrieve and manage file plans - name: record-categories description: Retrieve and manage record categories - name: record-folders description: Retrieve and manage record folders - name: gs-sites description: Retrieve and manage the Records Management site - name: records description: Perform record specific operations - name: files description: Perform operations on non-record files - name: transfer-containers description: Retrieve and manage transfer containers - name: transfers description: Retrieve and manage transfers - name: unfiled-containers description: Retrieve and manage unfiled records containers - name: unfiled-record-folders description: Retrieve and manage unfiled record folders paths: ## GS sites '/gs-sites': post: tags: - gs-sites summary: Create the Records Management (RM) site description: | Creates the RM site with the given details. **Note:** The default site id is rm and the default site name is Records Management. The id of a site cannot be updated once the site has been created. For example, to create an RM site named "Records Management" with "Records Management Description" as description, the following body could be used: ```JSON { "title": "Records Management", "description": "Records Management Description" } ``` The creator will be added as a member with Site Manager role. When you create the RM site, the **filePlan** structure is also created including special containers, such as containers for transfers, holds and, unfiled records. operationId: createRMSite produces: - application/json parameters: - name: skipAddToFavorites in: query description: Flag to indicate whether the RM site should not be added to the user's site favorites. type: boolean default: false - in: body name: siteBodyCreate description: The site details required: true schema: $ref: '#/definitions/RMSiteBodyCreate' responses: '201': description: Successful response schema: $ref: '#/definitions/RMSiteEntry' '400': description: | Invalid parameter: **title**, or **description** exceed the maximum length; or **siteBodyCreate** invalid '401': description: Authentication failed '409': description: Site with the given identifier already exists default: description: Unexpected error schema: $ref: '#/definitions/Error' '/gs-sites/rm': get: tags: - gs-sites summary: Get the Records Management (RM) site description: | Gets information for RM site. operationId: getRMSite produces: - application/json parameters: - $ref: '#/parameters/fieldsParam' responses: '200': description: Successful response schema: $ref: '#/definitions/RMSiteEntry' '400': description: | Invalid parameter: GET request is only supported for the RM site '401': description: Authentication failed '404': description: | RM site does not exist default: description: Unexpected error schema: $ref: '#/definitions/Error' delete: tags: - gs-sites summary: Delete the Records Management (RM) site description: | Deletes the RM site. operationId: deleteRMSite produces: - application/json responses: '204': description: Successful response '400': description: | Invalid parameter: DELETE request is only supported for the RM site '401': description: Authentication failed '403': description: Current user does not have permission to delete the site that is visible to them. '404': description: | RM site does not exist default: description: Unexpected error schema: $ref: '#/definitions/Error' put: tags: - gs-sites summary: Update the Records Management (RM) site description: | Update the details for the RM site. Site Manager or other (site) admin can update title or description. **Note**: the id, site visibility, or compliance of the RM site cannot be updated once the site has been created. operationId: updateRMSite produces: - application/json parameters: - $ref: '#/parameters/fieldsParam' - in: body name: siteBodyUpdate description: The RM site information to update. required: true schema: $ref: '#/definitions/RMSiteBodyUpdate' responses: '200': description: Successful response schema: $ref: '#/definitions/RMSiteEntry' '400': description: | Invalid parameter: PUT request is supported only for the RM site, or **siteBodyUpdate** invalid '401': description: Authentication failed '403': description: Current user does not have permission to update the RM site that is visible to them. '404': description: | RM site does not exist default: description: Unexpected error schema: $ref: '#/definitions/Error' ## File plans '/file-plans/{filePlanId}': get: tags: - file-plans summary: Get a file plan description: | Gets information for file plan **filePlanId** Mandatory fields and the file plan's aspects and properties are returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: getFilePlan parameters: - $ref: '#/parameters/filePlanIdWithAliasParam' - $ref: '#/parameters/filePlanEntryIncludeParam' - $ref: '#/parameters/fieldsParam' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/FilePlanEntry' '400': description: | Invalid parameter: **filePlanId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to read **filePlanId** '404': description: "**filePlanId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' put: tags: - file-plans summary : Update a file plan description: | Updates file plan **filePlanId**. You can only set or update description and title properties: ```JSON { "properties": { "cm:description": "New Description", "cm:title":"New Title" } } ``` **Note:** Currently there is no optimistic locking for updates, so they are applied in "last one wins" order. operationId: updateFilePlan parameters: - $ref: '#/parameters/filePlanIdWithAliasParam' - $ref: '#/parameters/filePlanEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: filePlanBodyUpdate description: The file plan information to update. required: true schema: $ref: '#/definitions/FilePlanBodyUpdate' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/FilePlanEntry' '400': description: | Invalid parameter: The update request is invalid or **filePlanId** is not a valid format or **filePlanBodyUpdate** is invalid '401': description: Authentication failed '403': description: If current user does not have permission to update **filePlanId** '404': description: "**filePlanId** does not exist" '409': description: Updated name clashes with an existing fileplan '422': description: Model integrity exception, including file name with invalid characters default: description: Unexpected error schema: $ref: '#/definitions/Error' '/file-plans/{filePlanId}/categories': get: tags: - file-plans summary: List file plans's children description: | Returns a list of record categories. Minimal information for each child is returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: getFilePlanCategories produces: - application/json parameters: - $ref: '#/parameters/filePlanIdWithAliasParam' - $ref: '#/parameters/skipCountParam' - $ref: '#/parameters/maxItemsParam' - $ref: '#/parameters/filePlanCategoriesEntryIncludeParam' - $ref: '#/parameters/filePlanIncludeSourceParam' - $ref: '#/parameters/fieldsParam' responses: '200': description: Successful response schema: $ref: '#/definitions/RecordCategoryPaging' '401': description: Authentication failed '403': description: Current user does not have permission to read **filePlanId** '404': description: "**filePlanId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' post: tags: - file-plans summary: Create record categories for a file plan description: | Creates a record category as a primary child of **filePlanId**. You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then the API method tries to create a unique name using an integer suffix. This API method also supports record category creation using application/json. You must specify at least a **name**. You can create a category like this: ```JSON { "name":"My Record Category" } ``` You can set properties when creating a record category: ```JSON { "name":"My Record Category", "properties": { "rma:vitalRecordIndicator":"true", "rma:reviewPeriod":"month|1" } } ``` Any missing aspects are applied automatically. You can set aspects explicitly, if needed, using an **aspectNames** field. If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { ... } }, { "entry": { ... } } ] } } ``` operationId: createFilePlanCategories parameters: - $ref: '#/parameters/filePlanIdWithAliasParam' - $ref: '#/parameters/autoRenameParam' - $ref: '#/parameters/recordCategoryEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: nodeBodyCreate description: The node information to create. required: true schema: $ref: '#/definitions/RootCategoryBodyCreate' consumes: - application/json - multipart/form-data produces: - application/json responses: '201': description: Successful response schema: $ref: '#/definitions/RecordCategoryEntry' '400': description: | Invalid parameter: **filePlanId** is not a valid format or **filePlanId** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to add children to **filePlanId** '404': description: "**filePlanId** does not exist" '409': description: New name clashes with an existing node in the current parent container '422': description: Model integrity exception, including node name with invalid characters ## Unfiled records containers '/unfiled-containers/{unfiledContainerId}': get: tags: - unfiled-containers summary: Get the unfiled records container description: | Gets information for unfiled records container **unfiledContainerId** Mandatory fields and the unfiled records container's aspects and properties are returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: getUnfiledContainer parameters: - $ref: '#/parameters/unfiledContainerIdParam' - $ref: '#/parameters/unfiledContainerEntryIncludeParam' - $ref: '#/parameters/fieldsParam' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/UnfiledContainerEntry' '400': description: | Invalid parameter: **unfiledContainerId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to read **unfiledContainerId** '404': description: "**unfiledContainerId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' put: tags: - unfiled-containers summary : Update an unfiled record container description: | Updates unfiled record container **unfiledContainerId**. For example, you can rename an unfiled record container: ```JSON { "name":"My new name" } ``` You can also set or update description and title properties: ```JSON { "properties": { "cm:description": "New Description", "cm:title":"New Title" } } ``` **Note:** Currently there is no optimistic locking for updates, so they are applied in "last one wins" order. operationId: updateUnfiledContainer parameters: - $ref: '#/parameters/unfiledContainerIdParam' - $ref: '#/parameters/unfiledContainerEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: unfiledContainerBodyUpdate description: The unfiled record container information to update. required: true schema: $ref: '#/definitions/UnfiledRecordContainerBodyUpdate' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/UnfiledContainerEntry' '400': description: | Invalid parameter: The update request is invalid or **unfiledContainerId** is not a valid format or **unfiledContainerBodyUpdate** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to update **unfiledContainerId** '404': description: "**unfiledContainerId** does not exist" '409': description: Updated name clashes with an existing root category of special container in the current fileplan '422': description: Model integrity exception, including file name with invalid characters default: description: Unexpected error schema: $ref: '#/definitions/Error' '/unfiled-containers/{unfiledContainerId}/children': get: tags: - unfiled-containers summary: List unfiled record container's children description: | Returns a list of records or unfiled record folders. Minimal information for each child is returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: listUnfiledContainerChildren produces: - application/json parameters: - $ref: '#/parameters/unfiledContainerIdParam' - $ref: '#/parameters/skipCountParam' - $ref: '#/parameters/maxItemsParam' - $ref: '#/parameters/unfiledRecordFolderAndContainerWhereParam' - $ref: '#/parameters/unfiledContainerChildEntryIncludeParam' - $ref: '#/parameters/unfiledContainerIncludeSourceParam' - $ref: '#/parameters/fieldsParam' responses: '200': description: Successful response schema: $ref: '#/definitions/UnfiledContainerAssociationPaging' '401': description: Authentication failed '403': description: Current user does not have permission to read **unfiledContainerId** '404': description: "**unfiledContainerId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' post: tags: - unfiled-containers summary: Create a record or an unfiled record folder description: | Creates a record or an unfiled record folder as a primary child of **unfiledContainerId**. You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then the API method tries to create a unique name using an integer suffix. This endpoint supports both JSON and multipart/form-data (file upload). **Using multipart/form-data** Use the **filedata** field to represent the content to upload, for example, the following curl command will create a node with the contents of test.txt in the test user's home folder. ```curl -utest:test -X POST host:port/alfresco/api/-default-/public/gs/versions/1/unfiled-containers/{unfiledContainerId}/children -F filedata=@test.txt``` This API method also supports record and unfiled record folder creation using application/json. You must specify at least a **name** and **nodeType**. You can create a non-electronic record like this: ```JSON { "name":"My Non-electronic Record", "nodeType":"rma:nonElectronicDocument", "properties": { "cm:description":"My Non-electronic Record Description", "cm:title":"My Non-electronic Record Title", "rma:box":"My Non-electronic Record Box", "rma:file":"My Non-electronic Record File", "rma:numberOfCopies":1, "rma:physicalSize":30, "rma:shelf":"My Non-electronic Record Shelf", "rma:storageLocation":"My Non-electronic Record Location" } } ``` You can create an empty electronic record: ```JSON { "name":"My Electronic Record", "nodeType":"cm:content" } ``` You can create an unfiled record folder like this: ```JSON { "name": "My Unfiled Record Folder", "nodeType": "rma:unfiledRecordFolder", "properties": { "cm:title": "My Unfiled Record Folder Title" } } ``` Any missing aspects are applied automatically. You can set aspects explicitly, if needed, using an **aspectNames** field. **Note:** You can create more than one child by specifying a list of nodes in the JSON body. For example, the following JSON body creates a record and an unfiled record folder inside the specified **unfiledContainerId**: ```JSON [ { "name":"My Record", "nodeType":"cm:content" }, { "name":"My Unfiled Record Folder", "nodeType":"rma:unfiledRecordFolder" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { ... } }, { "entry": { ... } } ] } } ``` operationId: createUnfiledContainerChildren parameters: - $ref: '#/parameters/unfiledContainerIdParam' - $ref: '#/parameters/autoRenameParam' - $ref: '#/parameters/unfiledRecordFolderEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: nodeBodyCreate description: The node information to create. required: true schema: $ref: '#/definitions/RMNodeBodyCreate' consumes: - application/json - multipart/form-data produces: - application/json responses: '201': description: Successful response schema: $ref: '#/definitions/UnfiledContainerAssociationPaging' '400': description: | Invalid parameter: **unfiledContainerId** is not a valid format or **unfiledContainerId** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to add children to **unfiledContainerId** '404': description: "**unfiledContainerId** does not exist" '409': description: New name clashes with an existing node in the current parent container '422': description: Model integrity exception, including node name with invalid characters ## Unfiled record folders '/unfiled-record-folders/{unfiledRecordFolderId}': get: tags: - unfiled-record-folders summary: Get the unfiled record folder description: | Gets information for unfiled record folder id **unfiledRecordFolderId** Mandatory fields and the unfiled record folder's aspects and properties are returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: getUnfiledRecordFolder parameters: - $ref: '#/parameters/unfiledRecordFolderIdParam' - $ref: '#/parameters/unfiledRecordFolderEntryIncludeParam' - $ref: '#/parameters/unfiledRecordFolderRelativePathParam' - $ref: '#/parameters/fieldsParam' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/UnfiledRecordFolderEntry' '400': description: | Invalid parameter: **unfiledRecordFolderId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to read **unfiledRecordFolderId** '404': description: "**unfiledRecordFolderId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' put: tags: - unfiled-record-folders summary : Update an unfiled record folder description: | Updates unfiled record folder **unfiledRecordFolderId**. For example, you can rename a record folder: ```JSON { "name":"My new name" } ``` You can also set or update one or more properties: ```JSON { "properties": { "cm:title":"New title", "cm:description":"New description" } } ``` **Note:** if you want to add or remove aspects, then you must use **GET /unfiled-record-folders/{unfiledRecordFolderId}** first to get the complete set of *aspectNames*. **Note:** Currently there is no optimistic locking for updates, so they are applied in "last one wins" order. operationId: updateUnfiledRecordFolder parameters: - $ref: '#/parameters/unfiledRecordFolderIdParam' - $ref: '#/parameters/unfiledRecordFolderEntryIncludeParam' - $ref: '#/parameters/unfiledRecordFolderIncludeSourceParam' - $ref: '#/parameters/fieldsParam' - in: body name: unfiledRecordFolderBodyUpdate description: The record folder information to update. required: true schema: $ref: '#/definitions/UnfiledRecordFolderBodyUpdate' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/UnfiledRecordFolderEntry' '400': description: | Invalid parameter: The update request is invalid or **unfiledRecordFolderId** is not a valid format or **unfiledRecordFolderBodyUpdate** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to update **unfiledRecordFolderId** '404': description: "**unfiledRecordFolderId** does not exist" '409': description: Updated name clashes with an existing unfiled record folder in the current parent category '422': description: Model integrity exception, including file name with invalid characters default: description: Unexpected error schema: $ref: '#/definitions/Error' delete: tags: - unfiled-record-folders summary : Delete an unfiled record folder. Deleted file plan components cannot be recovered, they are deleted permanently. description: | Deletes the unfiled record folder **unfiledRecordFolderId**. operationId: deleteUnfiledRecordFolder parameters: - $ref: '#/parameters/unfiledRecordFolderIdParam' produces: - application/json responses: '204': description: Successful response '400': description: | Invalid parameter: **unfiledRecordFolderId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to delete **unfiledRecordFolderId** '404': description: "**unfiledRecordFolderId** does not exist" '409': description: "**unfiledRecordFolderId** is locked and cannot be deleted" default: description: Unexpected error schema: $ref: '#/definitions/Error' '/unfiled-record-folders/{unfiledRecordFolderId}/children': get: tags: - unfiled-record-folders summary: List unfiled record folder's children description: | Returns a list of records or unfiled record folders. Minimal information for each child is returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: listUnfiledRecordFolderChildren produces: - application/json parameters: - $ref: '#/parameters/unfiledRecordFolderIdParam' - $ref: '#/parameters/skipCountParam' - $ref: '#/parameters/maxItemsParam' - $ref: '#/parameters/unfiledRecordFolderAndContainerWhereParam' - $ref: '#/parameters/unfiledRecordFolderChildEntryIncludeParam' - $ref: '#/parameters/unfiledRecordFolderRelativePathParam' - $ref: '#/parameters/unfiledRecordFolderIncludeSourceParam' - $ref: '#/parameters/fieldsParam' responses: '200': description: Successful response schema: $ref: '#/definitions/UnfiledRecordFolderAssociationPaging' '401': description: Authentication failed '403': description: Current user does not have permission to read **unfiledRecordFolderId** '404': description: "**unfiledRecordFolderId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' post: tags: - unfiled-record-folders summary: Create a record or an unfiled record folder description: | Create a record or an unfiled record folder as a primary child of **unfiledRecordFolderId**. You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then the API method tries to create a unique name using an integer suffix. This endpoint supports both JSON and multipart/form-data (file upload). **Using multipart/form-data** Use the **filedata** field to represent the content to upload, for example, the following curl command will create a node with the contents of test.txt in the test user's home folder. ```curl -utest:test -X POST host:port/alfresco/api/-default-/public/gs/versions/1/unfiled-record-folders/{unfiledRecordFolderId}/children -F filedata=@test.txt``` This API method also supports record and unfiled record folder creation using application/json. You must specify at least a **name** and **nodeType**. You can create a non-electronic record like this: ```JSON { "name":"My Non-electronic Record", "nodeType":"rma:nonElectronicDocument", "properties": { "cm:description":"My Non-electronic Record Description", "cm:title":"My Non-electronic Record Title", "rma:box":"My Non-electronic Record Box", "rma:file":"My Non-electronic Record File", "rma:numberOfCopies":1, "rma:physicalSize":30, "rma:shelf":"My Non-electronic Record Shelf", "rma:storageLocation":"My Non-electronic Record Location" } } ``` You can create an empty electronic record like this: ```JSON { "name":"My Electronic Record", "nodeType":"cm:content" } ``` You can create an unfiled record folder like this: ```JSON { "name": "My Unfiled Record Folder", "nodeType": "rma:unfiledRecordFolder", "properties": { "cm:title": "My Unfiled Record Folder Title" } } ``` Any missing aspects are applied automatically. You can set aspects explicitly, if needed, using an **aspectNames** field. **Note:** You can create more than one child by specifying a list of nodes in the JSON body. For example, the following JSON body creates a record and an unfiled record folder inside the specified **unfiledRecordFolderId**: ```JSON [ { "name":"My Record", "nodeType":"cm:content" }, { "name":"My Unfiled Record Folder", "nodeType":"rma:unfiledRecordFolder" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { ... } }, { "entry": { ... } } ] } } ``` operationId: createUnfiledRecordFolderChildren parameters: - $ref: '#/parameters/unfiledRecordFolderIdParam' - $ref: '#/parameters/autoRenameParam' - $ref: '#/parameters/unfiledRecordFolderEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: nodeBodyCreate description: The node information to create. required: true schema: $ref: '#/definitions/RMNodeBodyCreateWithRelativePath' consumes: - application/json - multipart/form-data produces: - application/json responses: '201': description: Successful response schema: $ref: '#/definitions/UnfiledRecordFolderAssociationPaging' '400': description: | Invalid parameter: **unfiledRecordFolderId** is not a valid format or **unfiledRecordFolderId** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to add children to **unfiledRecordFolderId** '404': description: "**unfiledRecordFolderId** does not exist" '409': description: New name clashes with an existing node in the current parent container '422': description: Model integrity exception, including node name with invalid characters ## Record categories '/record-categories/{recordCategoryId}': get: tags: - record-categories summary: Get a record category description: | Gets information for record category **recordCategoryId** Mandatory fields and the record category's aspects and properties are returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: getRecordCategory parameters: - $ref: '#/parameters/recordCategoryIdParam' - $ref: '#/parameters/recordCategoryEntryIncludeParam' - $ref: '#/parameters/recordCategoryRelativePathParam' - $ref: '#/parameters/fieldsParam' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/RecordCategoryEntry' '400': description: | Invalid parameter: **recordCategoryId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to read **recordCategoryId** '404': description: "**recordCategoryId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' put: tags: - record-categories summary : Update a record category description: | Updates record category **recordCategoryId**. For example, you can rename a record category: ```JSON { "name":"My new name" } ``` You can also set or update one or more properties: ```JSON { "properties": { "rma:vitalRecordIndicator": true, "rma:reviewPeriod":"month|6" } } ``` **Note:** If you want to add or remove aspects, then you must use **GET /record-categories/{recordCategoryId}** first to get the complete set of *aspectNames*. **Note:** Currently there is no optimistic locking for updates, so they are applied in "last one wins" order. operationId: updateRecordCategory parameters: - $ref: '#/parameters/recordCategoryIdParam' - $ref: '#/parameters/recordCategoryEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: recordCategoryBodyUpdate description: The record category information to update. required: true schema: $ref: '#/definitions/FilePlanComponentBodyUpdate' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/RecordCategoryEntry' '400': description: | Invalid parameter: The update request is invalid or **recordCategoryId** is not a valid format or **recordCategoryBodyUpdate** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to update **recordCategoryId** '404': description: "**recordCategoryId** does not exist" '409': description: Updated name clashes with an existing record category in the current parent category '422': description: Model integrity exception, including file name with invalid characters default: description: Unexpected error schema: $ref: '#/definitions/Error' delete: tags: - record-categories summary : Delete a record category description: | Deletes record category **recordCategoryId**. operationId: deleteRecordCategory parameters: - $ref: '#/parameters/recordCategoryIdParam' produces: - application/json responses: '204': description: Successful response '400': description: | Invalid parameter: **recordCategoryId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to delete **recordCategoryId** '404': description: "**recordCategoryId** does not exist" '409': description: "**recordCategoryId** is locked and cannot be deleted" default: description: Unexpected error schema: $ref: '#/definitions/Error' '/record-categories/{recordCategoryId}/children': get: tags: - record-categories summary: List record category's children description: | Returns a list of record categories and/or record folders. Minimal information for each child is returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. The list of child nodes includes primary children and secondary children, if there are any. operationId: listRecordCategoryChildren produces: - application/json parameters: - $ref: '#/parameters/recordCategoryIdParam' - $ref: '#/parameters/skipCountParam' - $ref: '#/parameters/maxItemsParam' - $ref: '#/parameters/recordCategoryWhereParam' - $ref: '#/parameters/recordCategoryChildEntryIncludeParam' - $ref: '#/parameters/recordCategoryRelativePathParam' - $ref: '#/parameters/recordCategoryIncludeSourceParam' - $ref: '#/parameters/fieldsParam' responses: '200': description: Successful response schema: $ref: '#/definitions/RecordCategoryChildPaging' '401': description: Authentication failed '403': description: Current user does not have permission to read **recordCategoryId** '404': description: "**recordCategoryId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' post: tags: - record-categories summary: Create a record category or a record folder description: | Create a record category or a record folder as a primary child of **recordCategoryId**. You can set the **autoRename** boolean field to automatically resolve name clashes. If there is a name clash, then the API method tries to create a unique name using an integer suffix. This API method also supports record category or record folder creation using application/json. You must specify at least a **name** and **nodeType**. You can create a category like this: ```JSON { "name":"My Record Category", "nodeType":"rma:recordCategory" } ``` You can create a record folder like this: ```JSON { "name":"My Record Folder", "nodeType":"rma:recordFolder" } ``` You can create a record folder inside a container hierarchy (applies to record categories as well): ```JSON { "name":"My Fileplan Component", "nodeType":"rma:recordFolder", "relativePath":"X/Y/Z" } ``` The **relativePath** specifies the container structure to create relative to the node (record category or record folder). Containers in the **relativePath** that do not exist are created before the node is created. The container type is decided considering the type of the parent container and the type of the node to be created. You can set properties when creating a record category (applies to record folders as well): ```JSON { "name":"My Record Category", "nodeType":"rma:recordCategory", "properties": { "rma:vitalRecordIndicator":"true", "rma:reviewPeriod":"month|1" } } ``` Any missing aspects are applied automatically. You can set aspects explicitly, if needed, using an **aspectNames** field. **Note:** You can create more than one child by specifying a list of nodes in the JSON body. For example, the following JSON body creates a record category and a record folder inside the specified **categoryId**: ```JSON [ { "name":"My Record Category", "nodeType":"rma:recordCategory" }, { "name":"My Record Folder", "nodeType":"rma:recordFolder" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { ... } }, { "entry": { ... } } ] } } ``` operationId: createRecordCategoryChild parameters: - $ref: '#/parameters/recordCategoryIdParam' - $ref: '#/parameters/autoRenameParam' - $ref: '#/parameters/recordCategoryEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: nodeBodyCreate description: | The node information to create. required: true schema: $ref: '#/definitions/RMNodeBodyCreateWithRelativePath' consumes: - application/json - multipart/form-data produces: - application/json responses: '201': description: Successful response schema: $ref: '#/definitions/RecordCategoryChildEntry' '400': description: | Invalid parameter: **recordCategoryId** is not a valid format or **nodeBodyCreate** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to add children to **recordCategoryId** '404': description: "**recordCategoryId** does not exist" '409': description: Name clashes with an existing node in the current parent container '422': description: Model integrity exception, including node name with invalid characters ## Record folders '/record-folders/{recordFolderId}': get: tags: - record-folders summary: Get a record folder description: | Gets information for record folder **recordFolderId** Mandatory fields and the record folder's aspects and properties are returned by default. You can use the **include** parameter (include=allowableOperations) to return additional information. operationId: getRecordFolder parameters: - $ref: '#/parameters/recordFolderIdParam' - $ref: '#/parameters/recordFolderEntryIncludeParam' - $ref: '#/parameters/fieldsParam' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/RecordFolderEntry' '400': description: | Invalid parameter: **recordFolderId** is not a valid format '401': description: Authentication failed '403': description: Current user does not have permission to read **recordFolderId** '404': description: "**recordFolderId** does not exist" default: description: Unexpected error schema: $ref: '#/definitions/Error' put: tags: - record-folders summary : Update a record folder description: | Updates record folder **recordFolderId**. For example, you can rename a record folder: ```JSON { "name":"My new name" } ``` You can also set or update one or more properties: ```JSON { "properties": { "rma:vitalRecordIndicator": true, "rma:reviewPeriod":"month|6" } } ``` **Note:** if you want to add or remove aspects, then you must use **GET /record-folders/{recordFolderId}** first to get the complete set of *aspectNames*. **Note:** Currently there is no optimistic locking for updates, so they are applied in "last one wins" order. operationId: updateRecordFolder parameters: - $ref: '#/parameters/recordFolderIdParam' - $ref: '#/parameters/recordFolderEntryIncludeParam' - $ref: '#/parameters/fieldsParam' - in: body name: recordFolderBodyUpdate description: The record folder information to update. required: true schema: $ref: '#/definitions/FilePlanComponentBodyUpdate' produces: - application/json responses: '200': description: Successful response schema: $ref: '#/definitions/RecordFolderEntry' '400': description: | Invalid parameter: The update request is invalid or **recordFolderId** is not a valid format or **recordFolderBodyUpdate** is invalid '401': description: Authentication failed '403': description: Current user does not have permission to update **recordFolderId** '404': description: "**recordFolderId** does not exist" '409': description: Updated name clashes with an existing record folder in the current parent category '422': description: Model integrity exception, including file name with invalid characters default: description: Unexpected error schema: $ref: '#/definitions/Error' delete: tags: - record-folders summary : Delete a record folder description: | Deletes record folder **recordFolderId**. Deleted file plan components cannot be recovered, they are deleted permanently. operationId: deleteRecordFolder parameters: - $ref: '#/parameters/recordFolderIdParam' produces: - application/json responses: '204': description: Successful response '400': description: | Invalid parameter: **recordFolderId** is not a valid format '401': description: Authentication failed '403': description