Remote API Access

You can send programmatic requests to the API for Loome Assist.

First you will need to create an API key, please follow the steps below.

Currently, API Keys created in Loome Assist will have the same permissions as an administrator. In future, API Keys will have specific roles attached to them.

How to Create an API Key

You can find the Remote Access page from the dropdown menu, here you can manage Remote API Keys for Loome Assist.

Remote access page

To create an API Key, click on the Create Key button in the top-right corner.

Create an API key

Your key will display once you have created it, as well as below in the list of API keys.

Find your API key

You can either copy the key from the modal or copy this key using the Copy button on the left of the key in the list.

Copy your API key

If you would like to delete an API key, please click on Delete on the right of the key.

Delete an API key

You will be asked to confirm that you would like to delete it.

Confirm that you want to delete an API key

Working with the Loome Assist API

Like Loome Integrate, Loome Assist exposes a REST API that can be used to interact with Loome Assist programmatically.

Currently, Loome Assist does not expose API documentation. API documentation may be exposed in the future.

How to get a Token

Once you have generated an API key in the UI, copy this key.

For this example, we will use Postman.

In your navigation choose, Get Token.

In Body, paste in your key to the _clientid and _clientsecret fields.

Add your client ID and client secret

The Scope will be ‘webApi’.

Add the scope

Add in your URL to the URL field beside ‘POST’.

Add your URL

Click Send and you can then copy your resulting token.

Token

How to Learn which Projects a User can Access

An administrator can programmatically learn which projects a user has access to. Once we have a token, we can get the projects that a user is a part of.

Under Authorization, for ‘Type’ select Bearer Token.

Then paste in your token.

Add your API key

In Params, add in your email and your API key.

Add your API key

Click Send and the response will list the projects that your selected user is a member of, as well as the details of those projects.

You will then need to check that a data repository name is available before you can create a new data repository.

Data Repository Endpoints

Check Storage Account Name Availability

In Params, in Value for the ‘name’ field, type in what you would like to name your storage account.

Type in a name

Click Send and it will return whether the name is available or not.

If available, it will return that the name is available and you can proceed on to creating a storage account with that name.

Available storage account name

If unavailable, it will inform you that it is unavailable and will display the existing storage account.

Unavailable storage account name

Create New Data Repository

First, using the method above where you learn the list of projects you have access to, you will need to get the project ID that will be in the field “id”:_Project_ID, and you will then need to learn whether a storage name is available.

Once you know whether a data repository name is available, you can add the project ID to the URL in the ‘Create New Data Repo’ section.

And then make a POST for the new data repo by providing the project details in the Body section.

Project name

Once completed, click SEND and it will return the results of your new data repository.

New data repo details

This new data repository will also now be available in your selected project.

How to Programmatically Add Data to a Data Repository

After you have created a data repository, you can retrieve a SAS token for this data repository. An administrator can then programmatically add data to this data repository.

Get Data Repo SAS

You can use the following endpoint to request a time limited SAS token for a particular data repository within Loome Assist.

You will first need to get the authentication token.

In the URL section beside ‘Get’, you will need to provide the ID of the data repository and the Project ID.

You will need to add your Loome Assist URL, your project ID and data repository ID. For example, https://YOUR-LOOME-ASSIST-INSTANCE.azurewebsites.net/api/v1/Projects/{projectId}/DataRepositories/{datarepositoryId}/SharedAccessSignature

Add your URL

Under Authorization, specify that the authentication type is ‘Bearer Token’ and then paste in your token.

Add your token

In ‘Params’, provide the params expirydatetime and isreadonly.

Expirydatetime is your chosen expiry date of this token and time in UTC and is in the format YYYY/MM/DD.

You can choose to make it read-only by selecting ‘true’ or ‘false’ for isreadonly. This token will then have read-only permissions or full access permissions depending on this choice.

Token expiry and read only

Click Send and it will return a link where you can access the SAS token.

You can use this SAS token to add data to the data repository you chose above.

How to Get the Data Repositories of a Project

The endpoint to get the existing data repositories of a project is the following.

Please replace the content in brackets, ‘{}’, with your own Loome Assist details.

GET https://{URL}/api/v1/Projects/{ProjectID}/DataRepositories

How to Get the Data Repository Network Configuration

The endpoint to get the network configuration of a data repository is the following.

Please replace the content in brackets, ‘{}’, with your own Loome Assist details.

GET https://{URL}/api/v1/Projects/{ProjectID}/DataRepositories/{DataRepositoryID}/NetworkConfiguration

Please note that you will need to update your agent to version 2022.5.10.1 to use this endpoint.

This will return: - whether it is in a private network, - the DNS name, - the IP Address, - the Address Space (if in a private network, otherwise it will return ‘null’), - and the subnet (if in a private network, otherwise it will return ‘null’).

Workstation Endpoints

How to Get the Workstations of a Project

The endpoint to get the existing workstations of a project is the following.

Please replace the content in brackets, ‘{}’, with your own Loome Assist details.

GET https://{URL}/api/v1/Projects/{ProjectID}/Workstations

How to Get the Workstation Network Configuration

The endpoint to get the network configuration of a workstation is the following.

Please replace the content in brackets, ‘{}’, with your own Loome Assist details.

GET https://{URL}/api/v1/Projects/{ProjectID}/Workstations/{WorkstationID}/NetworkConfiguration

This will return: - whether it is in a private network, - the DNS name, - the IP Address, - the Address Space (if in a private network, otherwise it will return ‘null’), - and the subnet (if in a private network, otherwise it will return ‘null’).