Managing report subscriptions with APIs
This article details the API methods that can be used to automate the configuration of report file subscription processes. However, before using the described API methods, the report must be previously created and the subscription must be correctly prepared.
Managing Report Subscriptions via APIs
This section details the APIs to be used to manage report subscriptions directly using beqom APIs.
Known Limitations
The following parameters are preset and cannot be changed since they are currently not requested from the API endpoints:
- idType (1 for "link" and 2 for "file generation"): always 2
- extensionType (1 for "email" and 2 for "file share"): always 2
- useTranslation (boolean): always false
List of Available Parameters
This section details all the supported parameters to use to correctly execute the APIs methods.
| Parameter | Data Type | Info |
|---|---|---|
| id | Integer | Parameter form the nc_report table, included in GET requests but not taken into consideration for POST or PUT requests. |
| idFolder | Integer | Optional. This parameter is from the nc_report table. If not provided, -5 (root folder) is used |
| title | String | Mandatory. This is the report title. |
| description | String | Optional. |
| idReport | Integer | Mandatory. This parameter is from the k_reports table. |
| beginDate | DateTime | Optional. |
| endDate | DateTime | Optional. |
| receiver | Integer | Mandatory. Identifier of the population. |
| idParameterTable | Integer | Mandatory. This parameter is from the k_referential_tables_views table (find the registered parameter table previously created). |
| filteTemplateName | String | Mandatory (e.g. @PayeeCode@LastName) |
| format | String | Mandatory. The available formats are: "pdf", "excel" or "word". |
| period | String | Mandatory. The available periods are: "onetime", "week", "hour", "day" and "month". |
| day | Integer | Mandatory if the period is "week", "day" or "month" |
| hour | Integer | Mandatory if the period is "onetime". |
| zipEnabled | Boolean | Optional (false as default). |
| zipPdfGenerationEnabled | Boolean | Optional (false as default). |
| zipReceiver | Integer | Optional. Identifier of the population. |
| hideAsDefault | Boolean |
Optional; false by default. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to generate documents, but not display them in Web App. Fore more information about the use of the document visibility feature, refer to Generating documents for use with the document visibility feature. |
| teamReviewAllowed | Boolean |
Optional. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to allow the visibility of generated documents to be managed using the document visibility feature in (Undefined variable: CompoVariables_WA_Alternate."Inbox"). Fore more information about the use of the document visibility feature, refer to Generating documents for use with the document visibility feature. |
| useProfileAccess | Boolean |
Optional; false by default. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to limit the visibility of documents to certain profiles only. This parameter is checked by the application when the logged in user opens the "Team Documents" tab and when they attempt to grant access (individually or in bulk) or revoke access (individually or in bulk) to the documents using the Web App interface. |
| profileAccess | String |
Optional; array. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to define the list of profiles that will have access to generated documents, when useProfileAccess is set to true. Values must be taken from the primary key in k_profiles. This parameter is checked by the application when the logged in user opens the "Team Documents" tab and when they attempt to grant access (individually or in bulk) or revoke access (individually or in bulk) to the documents using the Web App interface. |
Getting the List of Report Entries from the Workbench Section
The following method is used to get the list of all report entries from the workbench section.
In order to use this method, your profile must have been granted the "Read" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Parameters | Output Sample |
|---|---|---|---|---|
| Gateway | GET | /api/report-communication/?folderId={folderId} |
|
Copy |
Getting the Details of a Specific Report from Communication Workbench Section
The following method is used to get the details of a specific report form the communication workbench section.
In order to use this method, your profile must have been granted the "Read" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Parameters | Output Sample |
|---|---|---|---|---|
| Gateway | GET | /api/report-communication/{id} |
|
{Report Communication Item} |
Creating a New Report Communication Entry
The following method is used to create a new report communication entry.
In order to use this method, your profile must have been granted the "Create" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Output Sample |
|---|---|---|---|
| Gateway | POST | /api/report-communication/ | {Report Communication Item without id property} |
Updating an Existing Report Communication Entry
The following method is used to modify an existing report communication entry.
In order to use this method, your profile must have been granted the "Modify" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Output Sample |
|---|---|---|---|
| Gateway | PUT | /api/report-communication/{id} | {Report Communication Item without id property} |
Deleting an Existing Report Communication Entry
The following method is used to delete an existing report communication entry.
In order to use this method, your profile must have been granted the "Delete" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint |
|---|---|---|
| Gateway | DELETE | /api/report-communication/{id} |
Creating a New Report Subscription Based on an Existing Communication Entry
The following method can be used to create a new report subscription based on an existing communication entry.
In order to use this method, your profile must have been granted the "Create" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Response |
|---|---|---|---|
| Gateway | POST | /api/report-communication/{id}/subscription | The response of the method will be the id of the new nc_subscription entry. |