User and Project lists 

This document provides some basic details of the API operations which help with the use of the data import API. 


These APIs are used for listing users and projects. The import API requires a project ID for most operations. To retrieve the project id, a user is required.  


So, the standard flow is to use the data import API to retrieve the bearer token, then use the user management API to get the user id and then with that find the list of projects available to choose the correct project to use for the data import API. 


The user management API is an integrated part of the Dapresy application, so the base URL will match the web application, e.g. https://dashboards.dapresy.com  rather than the separate base URL used by the data import API  e.g. https://dashboards-dataapi.dapresy.com/

 

User Info 

 

GET: /api/usermanagement/userinfo 

Used to retrieve the basic details about the account associated with the authentication token. Use the ID retrieved here to call the userprojects method as described below. 


Request Headers 

Name 

Value 

Content-Type 

application/son 

Authorization 

Bearer {bearer token}  

 

Fields in response 

Name 

Description 

userId 

Id of the user 

userTypeId 

A numeric value indicating the user type: 

1 - super admin 

2 – admin 

3 – project manager 

5 – report user 

customerId 

The ID of the customer which the account is associated with 

 

Example 
{ 

    "userId": 111, 

    "userTypeId": 2, 

    "customerId": 3 

} 



User Projects 

GET: /api/v1/globalreportusermanagement/{UserID}/userprojects 

This method returns an array of the projects for the user. 


Request Headers 

Name 

Value 

Content-Type 

application/son 

Authorization 

Bearer {bearer token}  

 

Fields in response 

Name 

Description 

Id 

The project id 

code 

The code of the project 

projectName 

The name of the project 

lastLogin 

The last login to the project by the account 

numberOfLogins 

Number of logins to the project by the account 

isDistributed 

Whether the project is distributed 

 

Example 

[{ 

    "id": 111, 

    "code": "test04", 

    "projectName": "test project 4", 

    "lastLogin": "2020-06-04", 

    "numberOfLogins": 1, 

    "isDistributed": "No" 

  }, etc