Back to index
Summary
Creates a new report.projectNameStringrequiredThe name for the project that must be unique among all projects. reportNameStringrequiredThe name of the report. definitionStringoptionalThe Elasticsearch query definition to use for retrieving report data. descriptionStringoptionalComment text describing this object that is not interpreted at all by CloudBees CD/RO. parametersStringoptionalInput parameters in JSON format accepted by the report definition. reportObjectTypeForSourceTypeStringoptionalThe report object type name to use to determine the source type for the report. Set this if the sourceType of the report's reportObjectType is different from the actual source of the report data. reportObjectTypeNameStringoptionalReport object type name. reportQueryStringoptionalThe report query in JSON format. It will be translated to the Elasticsearch query definition when retrieving report data. titleStringoptionalThe title of report. uriStringoptionalAn advanced mode option for identifying the Elasticsearch URI to use for retrieving report data. By default, the reportObjectTypeName argument will be used to construct the URI based on the Elasticsearch index for the report object, e.g., ef-deployment-*/_search?pretty . |
Usage
Perl
$cmdr->createReport( "test-projectName", # projectName "test-reportName" # reportName # optionals );
ectool
ectool createReport \ "test-projectName" `# projectName` \ "test-reportName" `# reportName` \ # optionals
Examples
Sample DSL
report reportName: ‘AppsByDeploymentStatus’, projectName: ‘CloudBees’, { description: 'report desc' uri: 'ef-deployment-*/\_search?pretty' // report query definition to use when searching in CloudBees Analytics. definition: ''' { "query" : { ... } ... parameters: ... [{ name: 'appIdParam', label: 'Select application' // optional default value to use if none specified for runReport defaultValue: '', // the report should be able to handle he case where the parameter is not required and no optional value is specified. required: false, // parameter type. Supported types: 'text', 'dateRange', 'select', 'application', 'release', 'environment', 'pipeline' // parameter value will be based on the parameter type. // UI would need to support the different parameter types. For deploy types such as 'application', 'release', 'environment', 'pipeline', // the user should be presented with a chooser to select the application, release, etc and the selected object's id should be returned // as the parameter value. type: 'application', filterExpression: 'match: {"applicationId": "appIdParam"}' }, { }] ... }