Objective
The following process provides a means of obtaining an Application Score trend via the Contrast UI API using a CURL script.
Process
Request the Contrast UI to create the application score trend.
Request:
curl -X GET \
'https://<URL>/Contrast/api/ng/<ORG_ID>/applications/<APP_ID>/history' \
-H 'Authorization: <AUTHORIZATION>' \
-H 'API-Key: <API KEY>' \
-H 'Accept: application/json'
For eg, the Response
{
"success" : true,
"messages" : [ "Application Score Trend loaded successfully" ],
"total" : [ {
"timestamp" : 1694390400000,
"score" : 90
}, {
"timestamp" : 1694995200000,
"score" : 90
}, {
"timestamp" : 1695600000000,
"score" : 90
}, {
"timestamp" : 1696204800000,
"score" : 90
}