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

Latest commit

 

History

History
36 lines (29 loc) · 830 Bytes

calling-custom-endpoints.md

File metadata and controls

36 lines (29 loc) · 830 Bytes

Calling Custom Endpoints

Content service and process service has two different clients:

  • AlfrescoJsApi.ProcessClient
  • AlfrescoJsApi.ContentClient

Both clients expose a method *callApi

function callApi(
    path: string,
    httpMethod: string,
    pathParams?: any,
    queryParams?: any,
    headerParams?: any,
    formParams?: any,
    bodyParam?: any,
    contentTypes?: string[],
    accepts?: string[],
    returnType?: any,
    contextRoot?: string,
    responseType?: string
): Promise<any> {};

If you want call your custom rest point in one of those two service use the corresponding client.

Example

alfrescoJsApi.bpmClient.callApi(
    '/api/enterprise/app-version', 'GET',
    {}, {}, {}, {}, {}, ['application/json'], ['application/json'], {'String': 'String'}
)