All URIs are relative to /activiti-app/api
Method | HTTP request | Description |
---|---|---|
createModel | POST /enterprise/models | Create a new model |
deleteModel | DELETE /enterprise/models/{modelId} | Delete a model |
duplicateModel | POST /enterprise/models/{modelId}/clone | Duplicate an existing model |
getModelJSON | GET /enterprise/models/{modelId}/editor/json | Get model content |
getModelThumbnail | GET /enterprise/models/{modelId}/thumbnail | Get a model's thumbnail image |
getModel | GET /enterprise/models/{modelId} | Get a model |
getModelsToIncludeInAppDefinition | GET /enterprise/models-for-app-definition | List process definition models shared with the current user |
getModels | GET /enterprise/models | List models (process, form, decision rule or app) |
importNewVersion | POST /enterprise/models/{modelId}/newversion | Create a new version of a model |
importProcessModel | POST /enterprise/process-models/import | Import a BPMN 2.0 XML file |
saveModel | POST /enterprise/models/{modelId}/editor/json | Update model content |
updateModel | PUT /enterprise/models/{modelId} | Update a model |
validateModel | POST /enterprise/models/{modelId}/editor/validate | Validate model content |
ModelRepresentation createModel(modelRepresentation)
Create a new model
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.createModel(modelRepresentation).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelRepresentation | ModelRepresentation | modelRepresentation |
deleteModel(modelIdopts)
Delete a model
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
let opts = {
'cascade': true // | cascade
'deleteRuntimeApp': true // | deleteRuntimeApp
};
modelsApi.deleteModel(modelIdopts).then(() => {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
cascade | boolean | cascade | [optional] |
deleteRuntimeApp | boolean | deleteRuntimeApp | [optional] |
null (empty response body)
ModelRepresentation duplicateModel(modelIdmodelRepresentation)
Duplicate an existing model
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.duplicateModel(modelIdmodelRepresentation).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
modelRepresentation | ModelRepresentation | modelRepresentation |
ObjectNode getModelJSON(modelId)
Get model content
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.getModelJSON(modelId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId |
string getModelThumbnail(modelId)
Get a model's thumbnail image
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.getModelThumbnail(modelId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId |
string
ModelRepresentation getModel(modelIdopts)
Get a model
Models act as containers for process, form, decision table and app definitions
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
let opts = {
'includePermissions': true // | includePermissions
};
modelsApi.getModel(modelIdopts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
includePermissions | boolean | includePermissions | [optional] |
ResultListDataRepresentationModelRepresentation getModelsToIncludeInAppDefinition()
List process definition models shared with the current user
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.getModelsToIncludeInAppDefinition().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
This endpoint does not need any parameter.
ResultListDataRepresentationModelRepresentation
ResultListDataRepresentationModelRepresentation getModels(opts)
List models (process, form, decision rule or app)
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
let opts = {
'filter': filter_example // | filter
'sort': sort_example // | sort
'modelType': 56 // | modelType
'referenceId': 789 // | referenceId
};
modelsApi.getModels(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
filter | string | filter | [optional] |
sort | string | sort | [optional] |
modelType | number | modelType | [optional] |
referenceId | number | referenceId | [optional] |
ResultListDataRepresentationModelRepresentation
ModelRepresentation importNewVersion(modelIdfile)
Create a new version of a model
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.importNewVersion(modelIdfile).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
file | Blob | file |
ModelRepresentation importProcessModel(file)
Import a BPMN 2.0 XML file
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.importProcessModel(file).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
file | Blob | file |
ModelRepresentation saveModel(modelIdvalues)
Update model content
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.saveModel(modelIdvalues).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
values | any | values |
ModelRepresentation updateModel(modelIdupdatedModel)
Update a model
This method allows you to update the metadata of a model. In order to update the content of the model you will need to call the specific endpoint for that model type.
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
modelsApi.updateModel(modelIdupdatedModel).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
updatedModel | ModelRepresentation | updatedModel |
ValidationErrorRepresentation validateModel(modelIdopts)
Validate model content
import ModelsApi from 'ModelsApi';
import { AlfrescoApi } from '@alfresco/js-api';
this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
hostEcm: 'http://127.0.0.1:8080'
});
let modelsApi = new ModelsApi(this.alfrescoApi);
let opts = {
'values': // | values
};
modelsApi.validateModel(modelIdopts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
modelId | number | modelId | |
values | any | values | [optional] |