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

Commit 29e4fee

Browse files
committed
add callapi documentation
1 parent 2c74891 commit 29e4fee

File tree

2 files changed

+61
-30
lines changed

2 files changed

+61
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Alfresco JS API
66
<a name="2.3.0"></a>
7-
# [2.3.0](https://github.com/Alfresco/alfresco-js-api/releases/tag/2.3.0) (XX-XX-XXXX)
7+
# [2.3.0](https://github.com/Alfresco/alfresco-js-api/releases/tag/2.3.0) (17-04-2018)
88

99
## Features
1010

README.md

Lines changed: 60 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -58,91 +58,93 @@ This project provides a JavaScript client API into the Alfresco REST API and Act
5858
* [Get tickets](#get-tickets)
5959
* [Events login/logout](#events-loginlogout)
6060
+ [Example](#example-9)
61+
- [Custom Endpoint](#custom-endpoint)
62+
* [Example](#example-10)
6163
- [ECM](#ecm)
6264
* [Get Node content](#get-node--content)
63-
+ [Example](#example-10)
64-
* [Get File or Folder Info](#get-file-or-folder-info)
6565
+ [Example](#example-11)
66-
* [Get Folder Children Info](#get-folder-children-info)
66+
* [Get File or Folder Info](#get-file-or-folder-info)
6767
+ [Example](#example-12)
68-
* [Create Folder](#create-folder)
68+
* [Get Folder Children Info](#get-folder-children-info)
6969
+ [Example](#example-13)
70+
* [Create Folder](#create-folder)
7071
+ [Example](#example-14)
71-
* [Upload File](#upload-file)
7272
+ [Example](#example-15)
73-
* [Events Upload File](#events-upload-file)
73+
* [Upload File](#upload-file)
7474
+ [Example](#example-16)
75-
* [Delete File or Folder](#delete-file-or-folder)
75+
* [Events Upload File](#events-upload-file)
7676
+ [Example](#example-17)
77-
* [Delete File or Folder Permanent](#delete-file-or-folder-permanent)
77+
* [Delete File or Folder](#delete-file-or-folder)
7878
+ [Example](#example-18)
79-
* [Get thumbnail Url](#get-thumbnail-url)
79+
* [Delete File or Folder Permanent](#delete-file-or-folder-permanent)
8080
+ [Example](#example-19)
81-
* [Get preview Url](#get-preview-url)
81+
* [Get thumbnail Url](#get-thumbnail-url)
8282
+ [Example](#example-20)
83-
* [Get content Url](#get-content-url)
83+
* [Get preview Url](#get-preview-url)
8484
+ [Example](#example-21)
85+
* [Get content Url](#get-content-url)
86+
+ [Example](#example-22)
8587
* [Custom web scripts call](#custom-web-scripts-call)
8688
+ [Parameters](#parameters)
8789
- [BPM](#bpm)
8890
* [Task Api](#task-api)
8991
+ [List Task](#list-task)
9092
- [Parameters](#parameters-1)
91-
- [Example](#example-22)
93+
- [Example](#example-23)
9294
+ [Get Task](#get-task)
9395
- [Parameters](#parameters-2)
94-
- [Example](#example-23)
96+
- [Example](#example-24)
9597
+ [Filter Task](#filter-task)
9698
- [Parameters](#parameters-3)
97-
- [Example](#example-24)
99+
- [Example](#example-25)
98100
+ [Complete Task](#complete-task)
99101
- [Parameters](#parameters-4)
100-
- [Example](#example-25)
102+
- [Example](#example-26)
101103
+ [Get Task Form](#get-task-form)
102104
- [Parameters](#parameters-5)
103-
- [Example](#example-26)
105+
- [Example](#example-27)
104106
+ [Complete Task Form](#complete-task-form)
105107
- [Parameters](#parameters-6)
106-
- [Example](#example-27)
108+
- [Example](#example-28)
107109
* [Process Api](#process-api)
108110
+ [Get Process Instances](#get-process-instances)
109111
- [Parameters](#parameters-7)
110-
- [Example](#example-28)
112+
- [Example](#example-29)
111113
* [Models Api](#models-api)
112114
+ [Get Model](#get-model)
113115
- [Parameters](#parameters-8)
114-
- [Example](#example-29)
116+
- [Example](#example-30)
115117
* [Report Api](#report-api)
116118
+ [Create default Reports](#create-default-reports)
117119
- [Parameters](#parameters-9)
118-
- [Example](#example-30)
120+
- [Example](#example-31)
119121
+ [Get Reports](#get-reports)
120122
- [Parameters](#parameters-10)
121-
- [Example](#example-31)
123+
- [Example](#example-32)
122124
+ [Report Params](#report-params)
123125
- [Parameters](#parameters-11)
124-
- [Example](#example-32)
126+
- [Example](#example-33)
125127
* [Report Process Definitions](#report-process-definitions)
126128
- [Parameters](#parameters-12)
127-
- [Example](#example-33)
129+
- [Example](#example-34)
128130
* [Tasks of process definition](#tasks-of-process-definition)
129131
- [Parameters](#parameters-13)
130-
- [Example](#example-34)
132+
- [Example](#example-35)
131133
* [Generate reports](#generate-reports)
132134
- [Parameters](#parameters-14)
133-
- [Example](#example-35)
135+
- [Example](#example-36)
134136
* [Update report details](#update-report-details)
135137
- [Parameters](#parameters-15)
136-
- [Example](#example-36)
138+
- [Example](#example-37)
137139
* [Export to csv](#export-to-csv)
138140
- [Parameters](#parameters-16)
139-
- [Example](#example-37)
141+
- [Example](#example-38)
140142
* [Save Report](#save-report)
141143
- [Parameters](#parameters-17)
142-
- [Example](#example-38)
144+
- [Example](#example-39)
143145
* [Delete report](#delete-report)
144146
- [Parameters](#parameters-18)
145-
- [Example](#example-39)
147+
- [Example](#example-40)
146148
- [Development](#development)
147149
- [Release History](#release-history)
148150

@@ -429,6 +431,35 @@ this.alfrescoJsApi.logout().on('logout', function(){
429431
});
430432
```
431433

434+
# Custom Endpoint
435+
436+
Content service and process service has two different clients:
437+
438+
- this.alfrescoJsApi.bpmClient
439+
- this.alfrescoJsApi.ecmClient
440+
441+
Both client expose a method ***callApi**
442+
443+
444+
```javascript
445+
callApi(path: string, httpMethod: string, pathParams?: any, queryParams?: any, headerParams?: any, formParams?: any, bodyParam?: any, authNames?: string[], contentTypes?: string[], accepts?: string[], returnType?: any, contextRoot?: string, responseType?: string): Promise<any>;
446+
```
447+
448+
If you want call your custom rest point in one of those two service use the corrispondin client.
449+
450+
## Example
451+
452+
```javascript
453+
454+
this.alfrescoJsApi.bpmClient.callApi(
455+
'/api/enterprise/app-version', 'GET',
456+
{}, {}, {}, {}, {},
457+
[], ['application/json'], ['application/json'], {'String': 'String'}
458+
)
459+
460+
```
461+
462+
432463
# ECM
433464

434465
A complete list of all the ECM methods is available here : [Core API](/src/alfresco-core-rest-api).

0 commit comments

Comments
 (0)