Usage has many functions in Loome Publish, from being able to track usage of assets and determine their popularity, all the way down to tracking individual user actions within the system, which can be extracted via our API.
The Usage Log is a low level log of various actions within Loome Publish. This is handy for auditing purposes, or if you want to roll up information in a manner that is not handled by Asset Usage.
Asset Usage is a summerized month by month roll up of asset usage, including unique interactions, interactions, and recency of actions.
In order to connect to the Usage APIs of Loome Publish you will first need to obtain an API key from the system. This task must be performed by an Administrator of the system. You can find details to create an API Key under the API Keys section. Make sure to create a key with a scope of ‘Usage’.
These two API endpoints below are OData compliant JSON endpoints, which allows you to specify paging, filtering and other commands via a common query interface.
We recommend that you make use of the skip and top commands to implement paging in to your requests so as not to place undue stress on your system. Optionally you can also filter on other data fields returned by the endpoint.
If you are not familiar with OData, you can find a basic tutorial on the odata.org website here - Odata Basic Tutorial.
Use this endpoint to query low level usage records, replacing the parameters as described below.
https://{{LoomePublishUrl}}/api/external/UsageLog?$skip={{SkipSize}}&$top={{TopSize}}
Parameter | Required | Value |
---|---|---|
LoomePublishUrl | Yes | This is the domain name of your Loome Publish instance |
TopSize | Yes | This is the page size that you want to request from the API. We recommend a value of 250. |
SkipSize | Yes | This is used to control which page of data you are requesting. For example, if you want to request records 501 through 750, the SkipSize will be 500. |
Filter | No | This can be used to filter the API using OData compliant filter queries, for example you could filter on YearMonthId to set up an incremental load process in to your warehouse, an example of this would be to use the Max Logged value from your warehouse &$filter=Logged gt 2021-01-01T00:00:00.0000000Z |
Use this endpoint to query month level summarized usage per asset, replacing the parameters as described below.
https://{{LoomePublishUrl}}/api/External/AssetUsage?$skip={{SkipSize}}&$top={{TopSize}}
Parameter | Required | Value |
---|---|---|
LoomePublishUrl | Yes | This is the domain name of your Loome Publish instance |
TopSize | Yes | This is the page size that you want to request from the API. We recommend a value of 250. |
SkipSize | Yes | This is used to control which page of data you are requesting. For example, if you want to request records 501 through 750, the SkipSize will be 500. |
Filter | No | This can be used to filter the API using OData compliant filter queries, for example you could filter on YearMonthId to set up an incremental load process in to your warehouse, an example of this would be to use the Max YearMonthId value from your warehouse &$filter=YearMonthId gt 202101 |
We have a postman collection available to help you get started. In this collection we provide examples of querying both APIs, and how you can perform incremental queries. You can click the Run in Postman button below to get started. If you do not have a postman account then you will need to sign up first.
Once you have the postman collection installed, you will need to modify the ApiKey and LoomePublishUrl variables within the collection variables section. If you do not have an ApiKey, please follow the instructions here to obtain one - API Keys section.