Question

REST API for TapeStorage and Media details

  • 13 November 2023
  • 2 replies
  • 59 views

Badge +1

Hello,

 

I’m using Commvault v11.32.28.

In building some custom Python scripts that utilize the API I’ve found an endpoint that seems to be broken, or else I’m not using it properly.

The endpoint is: /V4/Storage/Tape/{libraryId}/Media

My understanding is that this is supposed to return media associated with a specific tape library.

 

The “/V4/Storage/Tape” endpoint works, returning details about my library.

But “/V4/Storage/Tape/{libraryId}/Media” gives me a status 200 (success), but no data.

Is anyone else out there successfully gathering media details from the API?


2 replies

Userlevel 2
Badge +5

Hey Greg,

Thanks for reaching out for assistance.

You can use the following documentation to get the Library ID required:
https://documentation.commvault.com/2023e/essential/48985_rest_api_get_library.html

Once you have the Library ID you can input this into your script and it should now return the correct information.

Please let me know if you need further assistance.

Kind regards,

Scott Henderson
Media Management - Technical Team Lead (APAC)

Badge +1

Hello Scott.

Thank you for your reply. Unfortunately, your suggestion is exactly what I’m doing.

My libraryId is “2” as shown below:

        {            "entityInfo": {                "name": "StorageTek SL150",                "id": 2            }        },

 

“/SearchSvc/CVWebService.svc/V4/Storage/Tape/2/Media” returns nothing.

 

Reply