How to get all projects details from TDM and user access given for the project in TDM
search cancel

How to get all projects details from TDM and user access given for the project in TDM

book

Article ID: 369909

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are using TDM portal in our environment and multiple users are creating the projects and user acces is segrigated to specific project.

Our team want to prepare a dashboard to list all the projects and user access given to those projects. How to get all the project details and users assigned to those projects using API call?

Environment

All versions of TDM

Resolution

You can use below API call to retrieve all projects in TDM (You need to pass user authorization details as a header information to execute the API call).

https://<Host_Name>:8443/TDMProjectService/api/ca/v1/projects?includeVersions=true

To assign a project to the user, you can use below API call. In this API call, you need to add project group-id details in request payload.

https://<Host_Name>:8443/TestDataManager/api/ca/v1/users/<User_id>/actions/addToGroups (POST Method)

To find the group-id details, you can use this API call

https://<Host_Name>:8443/TestDataManager/api/ca/v1/users/<User_id>/actions/getGroups?page=0&size=25&sortDir=ASC&sortField=sgName&userNotInGroups=true