Before you can use the metric definition created in the last lesson, you have to upload it. Measure provides REST API endpoints and a GraphQL API. In the tutorial, we use curl to access the REST
API endpoint metricDefinition. If you want to use GraphQL
instead, you can access schema information at the following URL:
https://my_velocity:port/release-events-api/graphiql.
To upload the metric definition, complete the following steps:
Using curl, create the header for a POST request, as shown in the following fragment.
If the curl command succeeded, you see the new chart listed on the dashboard. To confirm that the
command worked, open the dashboard
that you created earlier, and then expand the Quality chart list. You
can see the chart displayed at the bottom of the quality-type charts, as shown in the following
graphic:
Figure 1. Tutorial chart added to the chart list
If you add the chart to the dashboard display, it won't have any data because you haven’t sent
any data of the "Tutorial Definition" type to Measure.
In the next lesson, you create a metric data record of the "Tutorial Definition" type and
upload it to Measure.