Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Latest commit

 

History

History
404 lines (295 loc) · 12.8 KB

FilePlansApi.md

File metadata and controls

404 lines (295 loc) · 12.8 KB

FilePlansApi

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

Method HTTP request Description
createFilePlanCategories POST /file-plans/{filePlanId}/categories Create record categories for a file plan
getFilePlan GET /file-plans/{filePlanId} Get a file plan
getFilePlanCategories GET /file-plans/{filePlanId}/categories List file plans's children
updateFilePlan PUT /file-plans/{filePlanId} Update a file plan

createFilePlanCategories

RecordCategoryEntry createFilePlanCategories(filePlanIdnodeBodyCreateopts)

Create record categories for a file plan

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

Example

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

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

let fileplansApi = new FilePlansApi(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 record category. Any optional field from the response model can be requested. For example:
* allowableOperations
* hasRetentionSchedule
* 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.

};

fileplansApi.createFilePlanCategories(filePlanIdnodeBodyCreateopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
filePlanId string The identifier of a file plan. You can also use the -filePlan- alias.
nodeBodyCreate RootCategoryBodyCreate 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 record category. Any optional field from the response model can be requested. For example:
  • allowableOperations
  • hasRetentionSchedule
  • 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

RecordCategoryEntry

getFilePlan

FilePlanEntry getFilePlan(filePlanIdopts)

Get a file plan

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.

Example

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

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

let fileplansApi = new FilePlansApi(this.alfrescoApi);

let opts = { 
  'include':  //  | Returns additional information about the file plan. 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.

};

fileplansApi.getFilePlan(filePlanIdopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
filePlanId string The identifier of a file plan. You can also use the -filePlan- alias.
include string Returns additional information about the file plan. 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

FilePlanEntry

getFilePlanCategories

RecordCategoryPaging getFilePlanCategories(filePlanIdopts)

List file plans's children

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.

Example

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

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

let fileplansApi = new FilePlansApi(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.
  'include':  //  | Returns additional information about the record category. Any optional field from the response model can be requested. For example:
* allowableOperations
* aspectNames
* hasRetentionSchedule
* path
* properties

  'includeSource': true //  | Also include **source** (in addition to **entries**) with folder information on the parent node – the specified parent **filePlanId**
  '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.

};

fileplansApi.getFilePlanCategories(filePlanIdopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
filePlanId string The identifier of a file plan. You can also use the -filePlan- 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]
include string Returns additional information about the record category. Any optional field from the response model can be requested. For example:
  • allowableOperations
  • aspectNames
  • hasRetentionSchedule
  • path
  • properties | [optional] includeSource | boolean| Also include source (in addition to entries) with folder information on the parent node – the specified parent filePlanId | [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

RecordCategoryPaging

updateFilePlan

FilePlanEntry updateFilePlan(filePlanIdfilePlanBodyUpdateopts)

Update a file plan

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.

Example

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

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

let fileplansApi = new FilePlansApi(this.alfrescoApi);

let opts = { 
  'include':  //  | Returns additional information about the file plan. 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.

};

fileplansApi.updateFilePlan(filePlanIdfilePlanBodyUpdateopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
filePlanId string The identifier of a file plan. You can also use the -filePlan- alias.
filePlanBodyUpdate FilePlanBodyUpdate The file plan information to update.
include string Returns additional information about the file plan. 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

FilePlanEntry