Obtain projects details and user access per project in TDM
search cancel

Obtain projects details and user access per project in TDM

book

Article ID: 369909

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

You are using TDM portal in your environment and multiple users are creating projects. User access is segregated to a specific project.

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

Environment

All versions of TDM

Resolution

  • You can use the 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=###&sortField=sgName&userNotInGroups=true