Use data sets to collect the information that you will use to build charts, tables, and dynamic inputs.
Before You Begin
-
To use remote CommServe computers as data sources for REST APIs, you must configure authentication using SAML. For more information, see External Authentication with SAML Integration (SSO) - Web Console.
-
To create an embedded data set, your CommCell user account requires a role with the following permissions and associations:
-
Add Report permission and an association with the CommCell entity
-
Query Datasource permission and an association with the Data Source entity that you will use
For more information on users, permissions, and associations, see User Administration and Security - Overview.
-
Procedure
-
On Web Console, click Reports.
The Reports page appears.
-
Create a new report, or open an existing report:
-
To create a new report, from the navigation pane, click Configuration > Reports and click New Report.
-
To open an existing report and add a new data set to it, from the navigation pane, click Configuration > Reports, and next to the Report Name under Actions, click Edit.
-
-
On the Report Builder page, in the Report Name box, type a name for the report, and in the Description box, type a short description of the report.
-
On the Data Sets tab, click Add.
The Add Data Set dialog box appears.
-
At the top of the dialog box, from the list, select HTTP, and in the Data Set Name box, type a name.
-
In the Data Sources list, select the name of a data source:
-
To use Commvault REST APIs, select CommCells.
-
To use third-party REST APIs, select Other HTTP.
-
-
To use secured HTTP, select Use HTTPS.
-
Next to HTTP Method, select the type of REST API you want to use to collect or send data:
-
If you select GET, you must complete the following steps:
-
In the REST API box, enter the path for the REST API that you want to use.
For example: /SearchSvc/CVWebService.svc/Job
Commvault REST API data sets can be used only on CommServe computers. For a list of REST APIs, see REST API - API Library.
Authorization tokens will be automatically entered in the headers for the local CommCell environment's Web Server.
-
For third-party REST APIs, in the REST URL box, enter the address for the REST API that you want to use.
For example: https://api.github.com/repos/jquery/jquery/issues
-
To add URL parameters, click Add.
-
In the Key box, type a name, and then in the Value box, type the value that you created on the Parameter tab.
-
-
If you select POST, you must complete the following steps:
-
In the REST API box, enter the path for the REST API that you want to use.
For example: /SearchSvc/CVWebService.svc/Job
Commvault REST API data sets can be used only on CommServe computers. For a list of REST APIs, see REST API - API Library.
Authorization tokens will be automatically entered in the headers for the local CommCell environment's Web Server.
-
For third-party REST APIs, in the REST URL box, enter the address for the REST API that you want to use.
For example: https://api.github.com/repos/jquery/jquery/issues
-
To add URL parameters, click Add.
-
In the Key box, type a name, and then in the Value box, type the value that you created on the Parameter tab.
-
In the HTTP Content box, enter the request content that you want to send to the server.
-
Next to Content type, to specify the language of the content, select XML or JSON.
-
-
-
Next to Accept Type, to specify the language you want to receive information in, select XML or JSON.
If you select XML, on the Fields tab, an XPath expression is displayed for each field, and if you select JSON, a JSONPath expression is displayed for each field.
-
If you are using third-party REST APIs and you want to use headers, next to Headers, click Add, and then specify the Header and Value in the boxes.
-
Click Preview to retrieve all possible row expressions from the response to the REST API or REST URL that you entered.
If you leave the Row Expression box blank, all available rows appear in the Row Expression box in either XPath or JSONPath.
-
Configure the row expression for Commvault REST APIs or third-party REST APIs:
-
For Commvault REST APIs, in the Row Expression box, edit the XPath or JSONPath row expression to retrieve the data that you want to use in your data set.
XPath example: /JobManager_JobListResponse/jobs/jobSummary/subclient
JSONPath example: $.jobs[*].jobSummary.subclient
-
For third-party APIs, in the Row Expression box, edit the XPath or JSONPath row expression to retrieve the data that you want to use in your data set.
-
-
Click Preview to retrieve the fields from the response.
This image is an example of Commvault REST API using XPath:
-
Optional: Change the display names of the fields that will appear in the Data Sets list. Click the Fields tab, then in each box under Field Name, type a display name for the corresponding Field Source.
-
Optional: Change the field type for each XPath expression. Under Field Type, click any box to select a different value.
Note: The Parameters tab is used only to associate report inputs with the data set. Leave the settings on this tab. For details, see Inputs for Reports.
-
Optional: Select the amount of time that the query will run before it times out. Click the Advanced tab, and in the Time Out box, type or select the number of minutes.
-
Click Done.
The data set you created appears in the Report Builder under Data Sets.
What to Do Next
-
If you are creating a report: Building and Deploying Reports.
-
If you are creating a dynamic input: Adding Inputs to Reports.