Dashboard Commands
createDashboard
Creates a new dashboard for the specified project.
You must specify projectName
and dashboardName
.
Arguments | Descriptions | ||
---|---|---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String | ||
dashboardName | Unique name of the dashboard within the Argument Type: String | ||
columns | (Optional) List of the columns to display for the dashboard of type Argument Type: String | ||
description | (Optional) Comment text describing this object; not interpreted at all by CloudBees Flow. Argument Type: String | ||
layout | (Optional) Layout to use for adding the widgets to the dashboard. Use Argument Type: DashboardLayout | ||
phases | (Optional) List of the phases to display for the dashboard of type
Argument Type: String | ||
type | (Optional) Type of dashboard. Allowed types: Argument Type: DashboardType |
Response
Returns a dashboard object.
createDashboardColumn
Creates a dashboard column in a Command Center type of dashboard.
You must specify projectName
, dashboardName
, and column
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Unique name of the dashboard within the Argument Type: String |
column | Name of the dashboard column. Argument Type: String |
afterColumn | (Optional) Name of the column after which the column should be placed. If neither Argument Type: String |
beforeColumn | (Optional) Name of the column before which the column should be placed. If neither Argument Type: String |
ec-perl
syntax: $<object>->createDashboardColumn(<projectName>, <dashboardName>, <column>, {<optionals>});
deleteDashboard
Delete the specified dashboard.
You must specify projectName
and dashboardName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Unique name of the dashboard within the Argument Type: String |
deleteDashboardColumn
Deletes a dashboard column from a Command Center type of dashboard.
You must specify projectName
, dashboardName
, column
, and deleteWidgets
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Unique name of the dashboard within the Argument Type: String |
column | Name of the dashboard column. Argument Type: String |
deleteWidgets | < Boolean flag — 0|1|true|false >Whether to delete the widgets associated with the column that is being deleted. If you specify Argument Type: Boolean |
addToColumn | (Optional) Column to which the widgets associated with the column being deleted should be added. Required if Argument Type: String |
ec-perl
syntax: $<object>->deleteDashboardColumn(<projectName>, <dashboardName>, <columnName>, {deleteWidgets ⇒ <0|1|true|false>, addToColumn ⇒ <column>});
ectool
syntax: ectool deleteDashboardColumn <projectName> <dashboardName> <columnName> --deleteWidgets <0|1|true|false> [--addToColumn <column>]
getDashboard
Get the specified dashboard.
You must specify the projectName
and dashboardName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Unique name of the dashboard within the Argument Type: String |
includeDetails | (Optional) < Boolean flag — When this argument is set to Argument Type: Boolean |
Response
Returns a dashboard object.
ec-perl
syntax: $<object>->getDashboard(<projectName>, <dashboardName>, {includeDetails ⇒ <0|1|true|false>]});
getDashboards
Get all dashboards or (optionally) dashboards for the specified project.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
Response
Returns one or more dashboard objects.
modifyDashboard
Modifies an existing dashboard for the specified project.
You must specify the projectName
and dashboardName
.
Arguments | Descriptions | ||
---|---|---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String | ||
dashboardName | Unique name of the dashboard within the Argument Type: String | ||
clearColumns | (Optional) < Boolean flag — When this argument is set to Argument Type: Boolean | ||
clearPhases | (Optional) < Boolean flag —
When this argument is set to Argument Type: Boolean | ||
columns | (Optional) List of the columns to display for the dashboard. Applies only to a Argument Type: Collection | ||
customize | (Optional) < Boolean flag — Set to Argument Type: Boolean | ||
description | (Optional) Comment text describing this object; not interpreted at all by CloudBees Flow. Argument Type: String | ||
layout | (Optional) Layout to use for adding the widgets to the dashboard. Use Argument Type: DashboardLayout | ||
newName | (Optional) New dashboard name. Argument Type: String | ||
phases | (Optional) List of the phases to display for a dashboard of type
Argument Type: String | ||
type | (Optional) Type of dashboard. Allowed types: Argument Type: DashboardType |
If customize is true , dashboardName is Release Command Center , and projectName is CloudBees , then a copy is created with a predefined name of Release Command Center in the CloudBees project. The associated reports are not cloned at the same time. If you need to modify the report definitions, you must create a copy of the report before changing it (as with other out-of-the-box reports).
|
Response
Returns an updated dashboard object.
modifyDashboardColumn
Modifies a dashboard column in a Command Center type of dashboard.
You must specify projectName
, dashboardName
, and column
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Unique name of the dashboard within the Argument Type: String |
column | Name of the dashboard column. Argument Type: String |
afterColumn | (Optional) Name of the column after which the column should be placed. If neither Argument Type: String |
beforeColumn | (Optional) Name of the column before which the column should be placed. If neither Argument Type: String |
ec-perl
syntax: $<object>->modifyDashboardColumn(<projectName>, <dashboardName>, <column>, {<optionals>});
createDevOpsInsightDataSource
Creates a new data source for the specified project.
You must specify projectName
, releaseName
, and devOpsInsightDataSourceName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
releaseName | Name of the release. Argument Type: String |
devOpsInsightDataSourceName | Name of this data source. Argument Type: String |
description | (Optional) User-provided text describing this instance. Argument Type: String |
pluginKey | (Optional) Plugin key. For example, Argument Type: String |
pluginParameters | (Optional) Plugin parameters to be passed to the plugin for creating the required schedule and polling procedure. Argument Type: Map |
reportObjectTypeName | (Optional) Name of the report object type. Argument Type: String |
ec-perl
syntax: $<object>->createDevOpsInsightDataSource(<projectName>, <releaseName>, <devOpsInsightDataSourceName>, {<optionals>});
deleteDevOpsInsightDataSource
Delete the specified data source.
You must specify projectName
, releaseName
, and devOpsInsightDataSourceName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
releaseName | Name of the release. Argument Type: String |
devOpsInsightDataSourceName | Name of this data source. Argument Type: String |
ec-perl
syntax: $<object>->deleteDevOpsInsightDataSource(<projectName>, <releaseName>, <devOpsInsightDataSourceName>);
getDevOpsInsightDataSource
Get the specified data source.
You must specify projectName
, releaseName
, and devOpsInsightDataSourceName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
releaseName | Name of the release. Argument Type: String |
devOpsInsightDataSourceName | Name of this data source. Argument Type: String |
ec-perl
syntax: $<object>->getDevOpsInsightDataSource(<projectName>, <releaseName>, <devOpsInsightDataSourceName>, {includeDetails ⇒ <0|1|true|false>]});
getDevOpsInsightDataSources
Get all data sources or, optionally, data sources for the specified project.
You must specify projectName
and releaseName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
releaseName | Name of the release. Argument Type: String |
reportObjectTypeName | (Optional) Name of the report object type for which to retrieve the DevOps Insight data sources defined for the release. If not specified, then all the DevOps Insight data sources defined for the release are retrieved. Argument Type: String |
modifyDevOpsInsightDataSource
Modifies an existing data source for the specified project.
You must specify projectName
, releaseName
, and devOpsInsightDataSourceName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
releaseName | Name of the release. Argument Type: String |
devOpsInsightDataSourceName | Name of this data source. Argument Type: String |
description | (Optional) User-provided text describing this instance. Argument Type: String |
newName | (Optional) New name for the data source that is being renamed. Argument Type: String |
pluginParameters | (Optional) Plugin parameters to be passed to the plugin for creating the required schedule and polling procedure. Argument Type: Map |
ec-perl
syntax: $<object>->modifyDevOpsInsightDataSource(<projectName>, <releaseName>, <devOpsInsightDataSourceNameName>, {<optionals>});
createReport
Creates a new report for the specified project.
You must specify projectName
and reportName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
reportName | Unique name of the report within the Argument Type: String |
definition | (Optional) The Elasticsearch query definition to use for retrieving the report data from the DevOps Insight server. Argument Type: String |
description | (Optional) Report description. If not specified, Argument Type: String |
parameters | (Optional) Input parameters in JSON format accepted by the report definition. See Sample DSL below for expected format. Argument Type: String |
reportQuery | (Optional) The report query definition, in JSON format, to use for retrieving the report data from the DevOps Insight server. This definition can be built through the Report Editor. Argument Type: String |
title | (Optional) The title of the report. If not specified, Argument Type: String |
One of the following is required. | |
reportObjectTypeName | Report object type name. Argument Type: String |
uri | An advanced mode option for identifying the Elasticsearch URI to use for retrieving the report result from the reporting system. For ElasticSearch, this attribute would point to one or more indices. Argument Type: String |
Response
Returns a report object.
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"}'
},
{
}]
...
}
deleteReport
Delete the specified report.
You must specify the projectName
and reportName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
reportName | Unique name of the report within the Argument Type: String |
getReport
Get the specified report.
You must specify projectName
and reportName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
reportName | Unique name of the report within the Argument Type: String |
Response
Returns a report object.
getReports
Get all reports from the specified project.
You must specify the projectName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
Response
Returns all report objects for the specified project.
modifyReport
Creates a new report for the specified project.
You must specify the projectName
and reportName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
reportName | Unique name of the report within the Argument Type: String |
definition | (Optional) The Elasticsearch query or search definition to use for retrieving the required data for the reporting system. Argument Type: String |
description | (Optional) Report description. If not specified, Argument Type: String |
newName | (Optional) New name for an existing object that is being renamed. Argument Type: String |
parameters | (Optional) Input parameters in JSON format accepted by the report definition. Argument Type: String |
reportObjectTypeName | (Optional) Name of the report object type. Argument Type: String |
reportQuery | (Optional) The report query in JSON format. It will be translated to the Elasticsearch query definition when retrieving report data. Argument Type: String |
title | (Optional) The title of the report. If not specified, Argument Type: String |
uri | (Optional) An advanced mode option for identifying the Elasticsearch URI to use for retrieving the report result from the reporting system. For ElasticSearch, this attribute would point to one or more indices. If not specified, Argument Type: String |
Response
Returns a report object.
runReport
Run the specified report.
You must specify the projectName
and reportName
.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
reportName | Unique name of the report within the Argument Type: String |
actualParameter | (Optional) Parameters passed as arguments to the report. Argument Type: String |
dashboardName | (Optional) The name of the dashboard that the widget using the report belongs to. Argument Type: String |
dashboardProjectName | (Optional) Specify if the dashboard is in a different project than the report. Argument Type: String |
definition | (Optional) The Elasticsearch query definition to use for retrieving report data. Argument Type: String |
filters | (Optional) Filters Argument Type: String |
previewMode | (Optional) <_Boolean flag_ — When this argument is set to Argument Type: Boolean |
reportObjectTypeName | (Optional) Report object type name Argument Type: String |
reportQuery | (Optional) The report query in JSON format. It will be translated to the Elasticsearch query definition when retrieving report data. Argument Type: String |
uri | (Optional) 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. Argument Type: String |
widgetName | (Optional) The name of the widget using the report. Argument Type: String |
Response
Returns a report object.
sendReportingData
Sends data to the DevOps Insight server.
You must specify reportObjectTypeName
and payload
.
Arguments | Descriptions |
---|---|
reportObjectTypeName | Name of the report object for which the data (payload) is being sent to the DevOps Insight server. Argument Type: String |
payload | Payload with the attribute values for the report object in JSON text format. Argument Type: String |
validate | (Optional) If set to Default is Argument Type: Boolean |
Response
None or a status OK message.
===Payload validation
By default, no validation is performed on payload
. Setting the validate
argument to true
causes payload
to be validated based on the attributes defined for the report object type.
ec-perl
syntax: $<object>->sendReportingData({reportObjectTypeName ⇒ <reportObjectTypeName>, payload ⇒ <payload>})
Examples
my $payload = qq{{
"field1": "value1",
"field2": "value2",
"field3Integer": 25,
"field4Date": "2018-02-28'T'20:25:50.555"
}}
$cmdr->sendReportingData({reportObjectTypeName => "sample", payload => $payload})
Each record in the DevOps Insight server is automatically assigned an identifier that uniquely identifies the record. For most types of records, you do not need to explicitly assign a user-defined identifier. Each record sent through the sendReportingData
command is automatically assigned a unique identifier by the DevOps Insight server.
However if the records stored in the DevOps Insight server need to be uniquely identified using user-defined identifiers, then the documentId
field can be sent as part of the payload in the sendReportingData
API. For example:
my $payload = qq{{
"documentId": "2319024098340985"
"field1": "value1",
"field2": "value2",
"field3Integer": 25,
"field4Date": "2018-02-28'T'20:25:50.555"
}}
$cmdr->sendReportingData({reportObjectTypeName => "sample", payload => $payload})
If a record already exists with the same documentId
, then it will be updated. Otherwise, a new record will be created for the given documentId
in the DevOps Insight server.
createReportingFilter
Creates a new reportingFilter
object.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Name of the dashboard to which this filter belongs. Argument Type: String |
reportingFilterName | Report object type for which this association is defined. The association is owned by the specified report object type. Argument Type: String |
description | (Optional) A user-defined description of this object. Argument Type: String |
operator | (Optional) Operator type to use when applying the filter to the report. Possible values are:
Attribute Type: String |
orderIndex | (Optional) Order in which the reporting filter should be displayed. Argument Type: Integer |
parameterName | (Optional) Parameter name on which to filter. Required when Argument Type: String |
reportObjectTypeName | (Optional) The name of the report object type. Argument Type: String |
required | (Optional) < Boolean flag — Whether the filter is required and should be enforced on the client side UI. When this argument is set to Default is Argument Type: Boolean |
type | (Optional) The attribute type. Possible values:
Attribute Type: String |
widgetName | (Optional) Name of the widget within the dashboard, if the reporting filter belongs to a widget. Argument Type: String |
Response
Returns a reportingFilter object.
ec-perl
syntax: $cmdr->createReportingFilter(<projectName>, <dashboardName>, <reportingFilterName>, {<optionals>});
deleteReportingFilter
Deletes the specified reportReportingFilter
object.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Name of the dashboard to which this filter belongs. Argument Type: String |
reportingFilterName | Report object type for which this association is defined. The association is owned by the specified report object type. Argument Type: String |
widgetName | (Optional) Name of the widget within the dashboard, if the reporting filter belongs to a widget. Argument Type: String |
ec-perl
syntax: $cmdr->deleteReportingFilter(<projectName>, <dashboardName> , <reportingFilterName>);
getReportingFilter
Retrieves the specified reportingFilter
object.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Name of the dashboard to which this filter belongs. Argument Type: String |
reportingFilterName | Report object type for which this association is defined. The association is owned by the specified report object type. Argument Type: String |
widgetName | (Optional) Name of the widget within the dashboard, if the reporting filter belongs to a widget. Argument Type: String |
Response
Returns the specified reportingFilter object.
getReportingFilters
Retrieves the specified reportingFilter
objects.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Name of the dashboard to which this filter belongs. Argument Type: String |
widgetName | (Optional) Name of the widget within the dashboard, if the reporting filter belongs to a widget. Argument Type: String |
Response
Returns zero or more reportReportingFilter objects.
modifyReportingFilter
Modifies the specified reportReportingFilter
object.
Arguments | Descriptions |
---|---|
projectName | Name of the project. This name must be unique among all projects. Argument Type: String |
dashboardName | Name of the dashboard to which this filter belongs. Argument Type: String |
reportingFilterName | Report object type for which this association is defined. The association is owned by the specified report object type. Argument Type: String |
description | (Optional) A user-defined description of this object. Argument Type: String |
newName | (Optional) Used to rename this attribute. Argument Type: String |
operator | (Optional) Operator type to use when applying the filter to the report. Possible values are:
Attribute Type: String |
orderIndex | (Optional) Order in which the reporting filter should be displayed. Argument Type: Integer |
parameterName | (Optional) Parameter name on which to filter. Required when Argument Type: String |
reportObjectTypeName | (Optional) The name of the report object type. Argument Type: String |
type | (Optional) The attribute type. Possible values:
Attribute Type: String |
required | (Optional) < Boolean flag — Whether the filter is required and should be enforced on the client side UI. When this argument is set to Default is Argument Type: Boolean |
widgetName | (Optional) Name of the widget within the dashboard, if the reporting filter belongs to a widget. Argument Type: String |
Response
Returns a reportingFilter object.
ec-perl
syntax: $cmdr->modifyReportingFilter(<projectName>, <dashboardName>, <reportingFilterName>, {<optionals>});
createReportObjectType
Creates a new reportObjectType
object.
You must specify reportObjectTypeName
.
Arguments | Descriptions |
---|---|
reportObjectTypeName | Name of the report object type. No special characters or uppercase characters are allowed. Valid characters include [a-z][0-9][-]. Argument Type: String |
colorCode | (Optional) Color associated with the report object type in hex code format Argument Type: String |
description | (Optional) Comment text describing this object; not interpreted at all by CloudBees Flow. Argument Type: String |
displayName | (Optional) Display name of report object type. Argument Type: String |
sourceType | (Optional) Category of the third-party tool from which data for the given report object type is obtained. Argument Type: String |
sourceTypeDescription | (Optional) Description of the category of the third-party tool that may be displayed on the UI. Argument Type: String |
storagePattern | (Optional) Time-based storage pattern used for storing the report object type data. This field, if set, is used by ElasticSearch as the index name pattern. The valid values are Argument type: ReportObjectTypeStoragePattern |
Response
Returns a reportObjectType object.
===DSL Example of a report object type definition
reportObjectType 'cust_market_stats', {
description = 'Application features delivered as part of a release'
reportObjectAttribute 'featureName', {
type = 'STRING'
required = true
}
reportObjectAttribute 'issues', {
type = 'NUMBER'
required = true
}
reportObjectAssociation 'release', {
sourceFields = 'releaseName, releaseProjectName'
targetFields = 'releaseName, releaseProjectName'
required = true
}
reportObjectAssociation 'application', {
sourceFields = 'applicationName, projectName'
targetFields = 'applicationName, applicationProjectName'
}
}
deleteReportObjectType
Deletes the specified reportObjectType object.
Arguments | Descriptions |
---|---|
reportObjectTypeName | The name of the reportObjectTypeName object to delete. Argument Type: String |
getReportObjectType
Retrieves the specified reportObjectType
object.
Arguments | Descriptions |
---|---|
reportObjectTypeName | The name of the Argument Type: String |
includeDetails | (Optional) < Boolean flag —
Argument Type: Boolean |
Response
Returns the specified reportObjectType object.
getReportObjectTypes
Retrieves all reportObjectType
objects.
Arguments | Descriptions |
---|---|
includeDetails | (Optional) < Boolean flag —
Argument Type: Boolean |
Response
Returns zero or more reportObjectType objects.
modifyReportObjectType
Modifies the specified reportObjectType
object.
You must specify reportObjectTypeName
.
Arguments | Descriptions |
---|---|
reportObjectTypeName | Name of the report object type. No special characters or uppercase characters are allowed. Valid characters include [a-z][0-9][-]. Argument Type: String |
colorCode | (Optional) Color associated with the report object type in hex code format Argument Type: String |
description | (Optional) Comment text describing this object; not interpreted at all by CloudBees Flow. Argument Type: String |
displayName | (Optional) Display name of report object type. Argument Type: String |
newName | (Optional) New name for the object. Argument Type: String |
sourceType | (Optional) Category of the third-party tool from which data for the given report object type is obtained. Argument Type: String |
sourceTypeDescription | (Optional) Description of the category of the third-party tool that may be displayed on the UI. Argument Type: String |
storagePattern | (Optional) Time-based storage pattern used for storing the report object type data. This field, if set, is used by ElasticSearch as the index name pattern. The valid values are Argument type: ReportObjectTypeStoragePattern |