Most of these fields are
familiar to you from the first lesson.
curl -X POST "https://my_velocity:port/api/v1/metrics" \
-H "accept: application/json" \
-H "Authorization: UserAccessKey my_user_access_token" \
-H "Content-Type: application/json" \
-k \
-v \
-d '{
"tenantId": "my_tenant_id",
"dataSet": "Tutorial data set",
"record": {
"metricDefinitionName": "Tutorial Definition",
"recordName": "My tutorial record",
"pluginType": "plugin",
"dataFormat": "custom",
"executionDate": 1570028414997,
"value": {
"north": 199,
"south": 322,
"east": 485,
"west": 234
},
"description": "Tutorial data record"
},
"application": {
"name": "Metric Tutorial"
}
}'
The record object defines the record. You
can associate a record to its metric definition by using the
metricDefinitionId, or metricDefinitionName
property, as we do here. The pluginType property is set to the generic
value of "plugin". The executionDate value must be in
milliseconds.
The value object can have an arbitrary number of
name-value pairs. The values defined in this property are displayed on the chart. Create
enough values to make the chart interesting.
The application
property defines the application to which this record belongs. "Application" can refer
to an integrated application, such as an IBM® DevOps Deploy application, or a
set of metric records, among other things. In this tutorial, "Metric Tutorial" refers
simply to the record that you upload.