Optional
options: { Optional
config?: DeepPartial<CamundaPlatform8Configuration>Optional
oconst optimize = new OptimizeApiClient()
Private
oPrivate
restPrivate
userThe ID of the report you wish to delete
The report deletion API allows you to delete reports by ID from Optimize.
If the request fails
const client = new OptimizeApiClient()
client.deleteReport("e6c5aaa1-6a18-44e7-8480-d562d511ba62")
This API allows users to disable the sharing functionality for all reports and dashboards in Optimize.
Note that this setting will be permanently persisted in memory and will take precedence over any other previous configurations (e.g. configuration files).
When sharing is disabled, previously shared URLs will no longer be accessible. Upon re-enabling sharing, the previously shared URLs will work once again under the same address as before. Calling this endpoint when sharing is already disabled will have no effect.
If the request fails
const client = new OptimizeApiClient()
client.disableSharing()
This API allows users to enable the sharing functionality for all reports and dashboards in Optimize.
Note that this setting will be permanently persisted in memory and will take precedence over any other previous configurations (e.g. configuration files).
If sharing had been previously enabled and then disabled, re-enabling sharing will allow users to access previously shared URLs under the same address as before. Calling this endpoint when sharing is already enabled will have no effect.
If the request fails
const client = new OptimizeApiClient()
client.enableSharing()
Array of dashboard ids
This API allows users to export dashboard definitions which can later be imported into another Optimize system.
Note that exporting a dashboard also exports all reports contained within the dashboard. The dashboards to be exported may be within a Collection or private entities, the API has access to both.
The obtained list of entity exports can be imported into other Optimize systems either using the dedicated import API or via UI.
If the request fails
const client = new OptimizeApiClient()
const dashboardDefs = await client.exportDashboardDefinitions(["123", "456"])
array of report IDs
This API allows users to export report definitions which can later be imported into another Optimize system. The reports to be exported may be within a collection or private entities, the API has access to both.
The obtained list of entity exports can be imported into other Optimize systems either using the dedicated import API or via UI.
If the request fails
const client = new OptimizeApiClient()
const reportDefs = await client.exportReportDefinitions(["123", "456"])
The data export API allows users to export large amounts of data in a machine-readable format (JSON) from Optimize.
If the request fails
const client = new OptimizeApiClient()
const exporter = client.exportReportResultData("e6c5aaa1-6a18-44e7-8480-d562d511ba62")
const page1 = await exporter.next()
The ID of the collection for which to retrieve the dashboard IDs.
This API allows users to retrieve all dashboard IDs from a given collection.
The response contains a list of IDs of the dashboards existing in the collection with the given collection ID.
If the request fails
const client = new OptimizeApiClient()
const dashboardIds = await client.getDashboardIds(1234)
Private
getThe purpose of Health-Readiness REST API is to return information indicating whether Optimize is ready to be used.
If the request fails
const client = new OptimizeApiClient()
try {
await client.getReadiness()
console.log('Ready!')
} catch (e: any) {
console.log('Error calling readiness point: ' + e.code)
}
the id of the collection
This API allows users to retrieve all report IDs from a given collection. The response contains a list of IDs of the reports existing in the collection with the given collection ID.
If the request fails
const client = new OptimizeApiClient()
const reports = await client.getReportIds(1234)
This API allows users to import entity definitions such as reports and dashboards into existing collections. These entity definitions may be obtained either using the report or dashboard export API or via the UI.
If the request fails
const entities = [
{
"id": "61ae2232-51e1-4c35-b72c-c7152ba264f9",
"exportEntityType": "single_process_report",
"name": "Number: Process instance duration",
"sourceIndexVersion": 8,
"collectionId": null,
"data": {...}
},
{
"id": "b0eb845-e8ed-4824-bd85-8cd69038f2f5",
"exportEntityType": "dashboard",
"name": "Dashboard 1",
"sourceIndexVersion": 5,
"reports": [
{
"id": "61ae2232-51e1-4c35-b72c-c7152ba264f9",
...
}
],
"availableFilters": [...],
"collectionId": null
}
]
const client = new OptimizeApiClient()
await client.importEntities(123, entities)
With the external variable ingestion API, variable data held in external systems can be ingested into Optimize directly, without the need for these variables to be present in your Camunda platform data. This can be useful when external business data, which is relevant for process analysis in Optimize, is to be associated with specific process instances.
Especially if this data changes over time, it is advisable to use this REST API to persist external variable updates to Optimize, as otherwise Optimize may not be aware of data changes in the external system.
If the request fails
const variables = [
{
"id": "7689fced-2639-4408-9de1-cf8f72769f43",
"name": "address",
"type": "string",
"value": "Main Street 1",
"processInstanceId": "c6393461-02bb-4f62-a4b7-f2f8d9bbbac1",
"processDefinitionKey": "shippingProcess"
},
{
"id": "993f4e73-7f6a-46a6-bd45-f4f8e3470ba1",
"name": "amount",
"type": "integer",
"value": "500",
"processInstanceId": "8282ed49-2243-44df-be5e-1bf893755d8f",
"processDefinitionKey": "orderProcess"
}
]
const client = new OptimizeApiClient()
client.ingestExternalVariable(variables)
With the variable labeling endpoint, variable labels can be added, updated, and deleted from Optimize.
If the request fails
const variableLabels = {
"definitionKey": "bookrequest-1-tenant",
"labels" : [
{
"variableName": "bookAvailable",
"variableType": "Boolean",
"variableLabel": "book availability"
},
{
"variableName": "person.name",
"variableType": "String",
"variableLabel": "first and last name"
},
{
"variableName": "person.hobbies._listSize",
"variableType": "Long",
"variableLabel": "amount of hobbies"
}
]
}
const client = new OptimizeApiClient()
await client.labelVariables(variableLabels)
Generated using TypeDoc
Description
The high-level API client for Optimize.
Throws
If the request fails
Example