createReport

Back to index

Summary

Creates a new report.
projectName
Stringrequired
The name for the project that must be unique among all projects.
reportName
Stringrequired
The name of the report.
definition
Stringoptional
The Elasticsearch query definition to use for retrieving report data.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
parameters
Stringoptional
Input parameters in JSON format accepted by the report definition.
reportObjectTypeForSourceType
Stringoptional
The 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.
reportObjectTypeName
Stringoptional
Report object type name.
reportQuery
Stringoptional
The report query in JSON format. It will be translated to the Elasticsearch query definition when retrieving report data.
title
Stringoptional
The title of report.
uri
Stringoptional
An 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 ElasticSearch. 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"}' }, { }] ... }

Perl

$cmdr->createReport("Default", "All Pipeline Runs", {description => "Activity at a glance"});

ectool

ectool createReport Default "All Pipeline Runs" --description "Activity at a glance"