Remote API Access using Postman

We recommend using Loome’s Postman collection. You can easily generate scripts using the Postman collection in your preferred code language. The endpoints your API Key can use will depend on its role.

Currently, we have the following API endpoints in Loome’s Postman Collection, but these will continue to change in future.

Loome’s Postman Collection:

Please note that these endpoints are subject to change.

Other Endpoints:

Data Repository Endpoints:

Workstation Endpoints:

Loome’s Postman Collection

Prerequisites

You will need to set up prerequisites to use Loome programmatically.

You can first set up script prerequisites according to our guide here.

Get Projects

Choose Get Projects on the left panel under Assist.

Provide the URL and API Key.

Choose the code format for your preferred language and copy the script code using the button on the right.

Get Projects endpoint

Get Data Repositories

Choose Get Data Repositories on the left panel under Assist.

Provide the URL, Project Id, and API Key.

Choose the code format for your preferred language and copy the script code using the button on the right.

Get data repositories endpoint

Get Project by Id

Choose Get Project by Id on the left panel under Assist.

Provide the URL, Project Id, and API Key.

Choose the code format for your preferred language and copy the script code using the button on the right.

Get project by ID endpoint

Get Data Repositories by Project Id

Choose Get Data Repositories by Project Id on the left panel under Assist.

Provide the URL, Project Id, and API Key.

Choose the code format for your preferred language and copy the script code using the button on the right.

Get Data Repositories by Project Id endpoint

Get Mounting Details by Data Repository Id

Choose Get Mounting Details by Data Repository Id on the left panel under Assist.

Provide the URL, Project Id, Data Repo Id, and API Key.

Choose the code format for your preferred language and copy the script code using the button on the right.

Get Mounting Details by Data Repository Id endpoint

Other Assist Endpoints

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 you have a token, you 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.

How to Expose the Subnet Method for a Project

To expose the subnet method of a project, use the following endpoint and replace the content in brackets, ‘{}’, with your own Loome Assist details.

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

This will return: - whether it is in a private network, - 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’).

This endpoint is available to Project Owners and Project Contributors.

Data Repository Endpoints

Check Storage Account Name Availability

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

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’).