Test Data Manager

 View Only

 APIs documentation

Jonathan Frigault's profile image
Jonathan Frigault posted Jan 12, 2024 11:22 AM

Hi,

I am currently looking at building an application using your APIs. While looking at your documentation I found it somewhat confusing to identify the important information for example:

I want to create a project using the following api : post /api/ca/v1/projects (projects_api_URL)

When looking at the structure, if say that the projectInfo is required (which makes sense) but looking at the projectInfo in the same page, it doesn't indicate which field are mandatory and which can be ignored. 

Now looking at the example provided by Broadcom (broadcom_example), I can see that only three informations seems required to create the project. 

How can i know which informations is mandatory in a request to your APIs? (Other than trial an error)

I also notice that the interface (UI) seems to be using different APIs then the one documented in the swagger. For example, the creation of a project in the UI is done using the following api call projects/actions/createProjectAndVersion rather then the one shown above. Is there another documentation for these APIs? 

Rafael Cintra's profile image
Broadcom Employee Rafael Cintra

Hello @Jonathan Frigault,

I would usually recommend people review our swagger URL to understand what is mandatory or not on calling our APIs. To your specific question on creating Projects the swagger API is https://localhost:8443/TDMProjectService/swagger-ui/index.html#/project-controller/createProjectUsingPOST.

Replace localhost with your own TDM hostname or ip address.

Each service has its own swagger which should help you understand what is mandatory and what is not.

The swagger mentions the only required information to create a new project is the following:

{
  "description": "NEW_PROJECTAPIDESC",
  "name": "NEW_PROJECTAPINAME2"
}
Keep in mind that altough this is valid and indeed creates a project, it would also required a follow up POST call on our Version controller to create a version for this project as well.
Thanks,