Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Latest commit

 

History

History
467 lines (342 loc) · 15.9 KB

File metadata and controls

467 lines (342 loc) · 15.9 KB

UnfiledContainersApi

All URIs are relative to https://localhost/alfresco/api/-default-/public/gs/versions/1

Method HTTP request Description
createUnfiledContainerChildren POST /unfiled-containers/{unfiledContainerId}/children Create a record or an unfiled record folder
getUnfiledContainer GET /unfiled-containers/{unfiledContainerId} Get the unfiled records container
listUnfiledContainerChildren GET /unfiled-containers/{unfiledContainerId}/children List unfiled record container's children
updateUnfiledContainer PUT /unfiled-containers/{unfiledContainerId} Update an unfiled record container

createUnfiledContainerChildren

UnfiledContainerAssociationPaging createUnfiledContainerChildren(unfiledContainerIdnodeBodyCreateopts)

Create a record or an unfiled record folder

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 [email protected]

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": { ... } } ] } }

Example

import UnfiledContainersApi from 'UnfiledContainersApi';
import { AlfrescoApi } from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let unfiledcontainersApi = new UnfiledContainersApi(this.alfrescoApi);

let opts = { 
  'autoRename': true //  | If true, then  a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.

  'include':  //  | Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
* allowableOperations
* path

  'fields':  //  | A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.

};

unfiledcontainersApi.createUnfiledContainerChildren(unfiledContainerIdnodeBodyCreateopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
unfiledContainerId string The identifier of an unfiled records container. You can use the -unfiled- alias.
nodeBodyCreate RMNodeBodyCreate The node information to create.
autoRename boolean If true, then a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.
[optional]
include string Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
  • allowableOperations
  • path | [optional] fields | string| A list of field names.

You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual entity or entries within a collection.

If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. | [optional]

Return type

UnfiledContainerAssociationPaging

getUnfiledContainer

UnfiledContainerEntry getUnfiledContainer(unfiledContainerIdopts)

Get the unfiled records container

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.

Example

import UnfiledContainersApi from 'UnfiledContainersApi';
import { AlfrescoApi } from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let unfiledcontainersApi = new UnfiledContainersApi(this.alfrescoApi);

let opts = { 
  'include':  //  | Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
* allowableOperations
* path

  'fields':  //  | A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.

};

unfiledcontainersApi.getUnfiledContainer(unfiledContainerIdopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
unfiledContainerId string The identifier of an unfiled records container. You can use the -unfiled- alias.
include string Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
  • allowableOperations
  • path | [optional] fields | string| A list of field names.

You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual entity or entries within a collection.

If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. | [optional]

Return type

UnfiledContainerEntry

listUnfiledContainerChildren

UnfiledContainerAssociationPaging listUnfiledContainerChildren(unfiledContainerIdopts)

List unfiled record container's children

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.

Example

import UnfiledContainersApi from 'UnfiledContainersApi';
import { AlfrescoApi } from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let unfiledcontainersApi = new UnfiledContainersApi(this.alfrescoApi);

let opts = { 
  'skipCount': 56 //  | The number of entities that exist in the collection before those included in this list.
  'maxItems': 56 //  | The maximum number of items to return in the list.
  'where': where_example //  | Optionally filter the list. Here are some examples:

*   where=(isRecord=true)

*   where=(isUnfiledRecordFolder=false)

*   where=(nodeType='cm:content INCLUDESUBTYPES')

  'include':  //  | Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
* allowableOperations
* aspectNames
* association
* path
* properties

  'includeSource': true //  | Also include **source** (in addition to **entries**) with folder information on the parent node – the specified parent **unfiledContainerId**
  'fields':  //  | A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.

};

unfiledcontainersApi.listUnfiledContainerChildren(unfiledContainerIdopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
unfiledContainerId string The identifier of an unfiled records container. You can use the -unfiled- alias.
skipCount number The number of entities that exist in the collection before those included in this list. [optional]
maxItems number The maximum number of items to return in the list. [optional]
where string Optionally filter the list. Here are some examples:
  • where=(isRecord=true)

  • where=(isUnfiledRecordFolder=false)

  • where=(nodeType='cm:content INCLUDESUBTYPES') | [optional] include | string| Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:

  • allowableOperations

  • aspectNames

  • association

  • path

  • properties | [optional] includeSource | boolean| Also include source (in addition to entries) with folder information on the parent node – the specified parent unfiledContainerId | [optional] fields | string| A list of field names.

You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual entity or entries within a collection.

If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. | [optional]

Return type

UnfiledContainerAssociationPaging

updateUnfiledContainer

UnfiledContainerEntry updateUnfiledContainer(unfiledContainerIdunfiledContainerBodyUpdateopts)

Update an unfiled record container

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.

Example

import UnfiledContainersApi from 'UnfiledContainersApi';
import { AlfrescoApi } from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let unfiledcontainersApi = new UnfiledContainersApi(this.alfrescoApi);

let opts = { 
  'include':  //  | Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
* allowableOperations
* path

  'fields':  //  | A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.

};

unfiledcontainersApi.updateUnfiledContainer(unfiledContainerIdunfiledContainerBodyUpdateopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
unfiledContainerId string The identifier of an unfiled records container. You can use the -unfiled- alias.
unfiledContainerBodyUpdate UnfiledRecordContainerBodyUpdate The unfiled record container information to update.
include string Returns additional information about the unfiled records container's children. Any optional field from the response model can be requested. For example:
  • allowableOperations
  • path | [optional] fields | string| A list of field names.

You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual entity or entries within a collection.

If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. | [optional]

Return type

UnfiledContainerEntry