Skip to main content

trackunit/iris-app-api v0.0.172 - removed `default-src` from CSP header

[Breaking change] We are removing the default-src from the cspHeader property in the IrisX App manifest.

We are doing this since we have seen issues with more specific CSP rules and conflicts with default-src.

So in case you have to call an external API and defined:

{
"cspHeader": {
"default-src": ["https://api.mycompany.com"]
}
}

Then it should be changed to the more specific connect-src for API calls:

{
"cspHeader": {
"connect-src": ["https://api.mycompany.com"]
}
}

Emissions API v2 Update

Introduced new version 2 Emissions API endpoints that removed the field 'estimationConfidence' from the response, in favour of 'dataSourceScore' for individual assets.

Added two new fields to v2 KPI endpoints 'averageDataSourceScore' and 'dataSourceScoreCompilation'.

  • averageDataSourceScore: The average score of the data source for the fleet or filtered assets.
  • dataSourceScoreCompilation: Sums the total of each score into a bucket.

Data Source Score is a new field that provides a score for the data source of the emissions data per asset. The score is a value between 0 and 100, where 0 is the lowest score and 100 is the highest score. The Data Source Score documentation can be found here.

New Endpoints

➕ GET: /v2/emissions/period

Get period

➕ POST: /v2/emissions/period

Filter period

➕ GET: /v2/emissions/period/kpis

Get period KPIs

➕ POST: /v2/emissions/period/kpis

Filter period KPIs

➕ POST: /v2/emissions/monthly

Filter monthly

➕ GET: /v2/emissions/monthly/summary

Get monthly summary

➕ POST: /v2/emissions/monthly/summary

Filter monthly summary

➕ POST: /v2/emissions/lifetime

Filter lifetime

➕ GET: /v2/emissions/lifetime/kpis

Get Lifetime KPIs

➕ POST: /v2/emissions/lifetime/kpis

Filter Lifetime KPIs

➕ POST: /v2/emissions/daily

Filter daily

➕ GET: /v2/emissions/daily/summary

Get daily summary

➕ POST: /v2/emissions/daily/summary

Filter daily summary

➕ GET: /v2/emissions/daily/kpis

Get daily KPIs

➕ POST: /v2/emissions/daily/kpis

Filter daily KPIs

➕ GET: /v2/sites/{siteId}/emissions

Get site

trackunit/iris-app v0.0.571 - Node upgraded to v20.12.2

In this version of the App SDK, we have upgraded Node to the current LTS version 20.12.2. Make sure to upgrade your workspace to at least Node v20.12.2.

If using volta, you can install the latest LTS version of Node by running:

volta install node@lts

Otherwise, you can download the latest LTS version of Node from the Node.js website.

Customer API v1

Released stable version v1 of Customer API as REST and GraphQL endpoint.
For more information, see the documentation and introduction of the endpoints.

➕ Trackunit Iris GraphQL API

Example:

query GetCustomers(
$before: Cursor
$after: Cursor
$last: Int
$first: Int = 20
) {
customers(before: $before, after: $after, first: $first, last: $last) {
edges {
node {
id
name
type
}
}
pageInfo {
hasPreviousPage
hasNextPage
startCursor
endCursor
count
}
}
}

See all relevant GQL documentation

REST

Below a list of all available REST endpoints:

Customer:

➕ GET: /customer/v1/customers/{customerId}

Get customer

➕ GET: /customer/v1/customers

Get customers

➕ POST: /customer/v1/customers

Create customer

➕ PATCH: /customer/v1/customers/{customerId}

Update customer

➕ DELETE: /customer/v1/customers/{customerId}

Delete customer

Customer Contact:

➕ GET: customer/v1/customers/{customerId}/contacts/{contactId}

Get contact

➕ GET: customer/v1/customers/{customerid}/contacts

Get contacts

➕ POST: customer/v1/customers/{customerid}/contacts

Create contact

➕ PATCH: customer/v1/customers/{customerid}/contacts/{contactId}

Update contact

➕ DELETE: customer/v1/customers/{customerid}/contacts/{contactId}

Delete contact

Customer Asset assignments:

➕ GET: customer/v1/customers/{customerid}/assets

Get assets

➕ POST: customer/v1/customers/{customerid}/assets

Update assets

Custom Fields API

Released stable version v1 of Custom Fields API.

The Custom Fields API provides a way to define new fields in the Trackunit data model. Allowing to extend and customize Trackunit Manager. In this version 1 we support extending the data model of assets, accounts, groups and sites with new fields.

Below all available endpoints:

To define a custom field, you first need to add a definition using the API.

➕ GET: /custom-fields/v1/definitions

Get definitions

➕ POST: /custom-fields/v1/definitions

Create definition

➕ PATCH: /custom-fields/v1/definitions/{definitionId}

Update definition

➕ DELETE: /custom-fields/v1/definitions/{definitionId}

Delete definition

Use the Custom Fields Values API to set values on your defined custom fields

➕ GET: /custom-fields/v1/values

Get values

➕ POST: /custom-fields/v1/values

Create value

➕ PATCH: /custom-fields/v1/values/{valueId}

Update value

➕ DELETE: /custom-fields/v1/values/{valueId}

Delete value

Webhooks

Released stable support of webhooks.

With the addition of webhooks, we are extending our Iris capabilities to make it easier to set up meaningful workflows by e.g. triggering actions and notifications in external systems that help you run your business. The Trackunit Iris platform collects and stores data about every event that happened to an asset. Via our webhooks technology you can subscribe to relevant event types and get event data served in real-time.

All available event types in this release:

  • alerts.asset.on
  • alerts.asset.off
  • faults.asset.on
  • faults.asset.off
  • service-management.service-status.updated
  • sites.asset.enter
  • sites.asset.leave
  • sites.asset.archive

For more information see our Webhooks guide section.

Alerts API

Released stable version v1 of Alerts API.

Discover the power of our Alerts API, that allows you to manage your alert setup through API integrations. Here alert configurations can be created, read, updated and deleted. For more information see the documentation of the endpoint.

Below all available endpoints:

➕ GET: /alerts/v1/configurations

Get all alert configurations

➕ GET: /alerts/v1/configurations/{alertConfigurationId}

Get specific alert configuration

➕ POST: /alerts/v1/configurations

Create alert configuration

➕ PATCH: /alerts/v1/configurations/{alertConfigurationId}

Update alert configuration

➕ DELETE: /alerts/v1/configurations/{alertConfigurationId}

Delete alert configuration

Emissions API v1 Update

Added new Endpoints to the Emissions API to enable filtering by asset Ids, as well as getting emissions value for sites.

Below is a list of all the new endpoints:

➕ GET: /emissions/period

Get period

➕ POST: /emissions/period

Filter period

➕ GET: /emissions/period/kpis

Get period KPIs

➕ POST: /emissions/period/kpis

Filter period KPIs

➕ POST: /emissions/monthly

Filter monthly

➕ GET: /emissions/monthly/summary

Get monthly summary

➕ POST: /emissions/monthly/summary

Filter monthly summary

➕ POST: /emissions/lifetime

Filter lifetime

➕ GET: /emissions/lifetime/kpis

Get Lifetime KPIs

➕ POST: /emissions/lifetime/kpis

Filter Lifetime KPIs

➕ POST: /emissions/daily

Filter daily

➕ GET: /emissions/daily/summary

Get daily summary

➕ POST: /emissions/daily/summary

Filter daily summary

➕ GET: /emissions/daily/kpis

Get daily KPIs

➕ POST: /emissions/daily/kpis

Filter daily KPIs

➕ GET: /sites/{siteId}/emissions

Get site