Skip to main content

Emissions API Site Assets Update

Introducing four new endpoints to the Emissions API that allow a breakdown of assets emissions values by site summed up on a monthly basis.

These endpoints provide emissions values for the period they have been on the site. These endpoints are different from the existing monthly endpoints that provide emissions values for the period they have been in use.

Only admin users will have access to assets emissions values by site if the asset has been deleted or removed from the account.

To retrieve a list of site ids use the Sites API.

New Endpoints

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

Get Assets by Site Monthly

➕ POST: /v2/sites/{siteId}/emissions/monthly

Filter Assets by Site Monthly

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

Get Assets by Site Monthly Summary

➕ POST: /v2/sites/{siteId}/emissions/monthly/summary

Filter Assets by Site Monthly Summary

Emissions API v1 Removed

The Emissions API v1 has been removed. All endpoints have been deprecated and will no longer be available. Please use the Emissions API v2 for all emissions data.

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