Solved

REST API CALL FROM POSTMAN CLIENT

  • 24 February 2022
  • 6 replies
  • 387 views

Badge +1

I am sending a  get call from POSTMAN Client to get the backup job summery report for last 24 hrs. 

it retiring a error with Status: 400 bad request.

Followed the below procedure to get the REST API link

  1. Logged in into webconsole→ Report → backup summery report → removed some unwanted fields → click on REST API & copy the link.
  2. On Postman client generate the token, create a new HTTP request -pest the link, & pest the token → hit send 
  3. I am getting 400 bad request 
  4. I can able execute all Commvault REST API - Public -SP24 Commands.
icon

Best answer by Pradip Gaya 23 March 2022, 20:39

View original

If you have a question or comment, please create a topic

6 replies

Badge +1

Pradip,

Can you check the CustomReportsEngine.log for the exact error. I am thinking that something might have gone wrong when removing some unnecessary fields,

Alternatively you can try un select the columns from the gui and then copy the rest api url.  That way you should have a working url. 

Userlevel 7
Badge +23

@Pradip_Gaya , following up on this one.

Was the advice from @Jagadeesh Nuthakki able to provide what you needed, or were you still in need of more help?

Badge

Issue has been solved after adding below key in Header.

 

Key                        Value

Accept                   application/json

Content-Type       application/json

 

 

 

Badge +1

Error screen short

Userlevel 7
Badge +23

Awesome, thanks for sharing!

Badge +1

@Jagadeesh Nuthakki - Thanks for you reply! 

 

I unselect the columns from GUI & copied the api url & try to run that link from POSTMAN Client.

 

URL :

 

https://websever.domain.com/webconsole/api/cr/reportsplusengine/datasets/2638c3d3-adc7-4b61-bb24-2ba509229bf5:a30bd278-c7d9-470f-9ae9-8b4922743330/data/?offset=0&orderby=%5BClient%5D%20asc&parameter.Agents%5B%5D=AIX%2520File%2520System&parameter.timeframe=-PT24H%20P0D&parameter.useCSTimeZone=1&parameter.WindowStartTime=00%3A00%3A00&parameter.datasource%5B%5D=commserve%2Ccommserve-emea%2Cjpd91bk201&limit=20

 

Note - replaced the webserver name & replaced with webserver.domian.com

 

but un CustomReportsEngine.log it report below url

 

4940 129 02/25 02:00:31 : request url [/datasets/2638c3d3-adc7-4b61-bb24-2ba509229bf5:a30bd278-c7d9-470f-9ae9-8b4922743330/data/?offset=0&cacheId=a947b9ec-7a21-44e9-a59a-597120e5b2b5&fields=[Job Status] AS [JobStatus],Count([JobId]) AS [JobId],Sum([Size of Application]) AS [SizeofApplication],Sum([Media Size]) AS [MediaSize],Sum([Protected Objects]) AS [ProtectedObjects],Sum([Failed Objects]) AS [FailedObjects],Sum([Failed Folders]) AS [FailedFolders]&groupby=[Job Status]&orderby=[JobId] Desc&isExport=false&componentName=Summary&parameter.ClientGroup[]=XX-EVREUX-CLIENT-GROUP&parameter.timeframe=-PT24H P0D&parameter.useCSTimeZone=1&parameter.WindowStartTime=00:00:00&parameter.datasource[]=XXX,XXX&limit=2], user [tycoelectronics\XXX], method [get]