sendReportingData

Back to index

Summary

Sends data to the DevOps Insight server.
reportObjectTypeName
Stringrequired
The name of the report object for which the data(payload) is being sent to the DevOps Insight server.
payload
Stringrequired
The payload with the attribute values for the report object in JSON text format.
validate
Booleanoptionaldeprecated
The argument is no longer used.
Whether to validate the fields in the payload based on the attributes defined for the report object type.

Usage

Perl

$cmdr->sendReportingData( "test-reportObjectTypeName", # reportObjectTypeName "test-payload" # payload # optionals );

ectool

ectool sendReportingData \ "test-reportObjectTypeName" `# reportObjectTypeName` \ "test-payload" `# payload` \ # optionals

Examples

Perl

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 CloudBees Analytics 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 CloudBees Analytics server.

However, if the records stored in the CloudBees Analytics 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 is updated. Otherwise, a new record is created for the given documentId in the CloudBees Analytics server.

ectool

ectool sendReportingData --reportObjectType sample --payload ’{"documentId": "2319024098340985", "field1": "value1", "field2": "value2"}’