diff --git a/CHANGELOG.md b/CHANGELOG.md index f096230999..7b1be5bf1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - /types/trimmed - /deliveryservice_user/:dsId/:userId - /user/current/jobs + - /cdns/usage/overview ## [4.0.0] - 2019-12-16 ### Added diff --git a/docs/source/api/cdns_usage_overview.rst b/docs/source/api/cdns_usage_overview.rst index 475b7d81af..6c131c0d45 100644 --- a/docs/source/api/cdns_usage_overview.rst +++ b/docs/source/api/cdns_usage_overview.rst @@ -21,6 +21,9 @@ .. versionadded:: 1.2 +.. deprecated:: ATCv4 + This endpoint and its functionality is deprecated, and will be removed in the future. + ``GET`` ======= Retrieves the high-level CDN usage metrics from Traffic Stats @@ -46,10 +49,18 @@ Response Structure .. code-block:: json :caption: Response Example - { "response": { - "currentGbps": 975.920621333333, - "source": "TrafficStats", - "tps": 0, - "version": "1.2", - "maxGbps": 12085 - }} + { + "alerts": [ + { + "level": "warning", + "text": "This endpoint and its functionality is deprecated, and will be removed in the future" + } + ], + "response": { + "currentGbps": 975.920621333333, + "source": "TrafficStats", + "tps": 0, + "version": "1.2", + "maxGbps": 12085 + } + } diff --git a/traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm b/traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm index 023e673957..15bcb50157 100644 --- a/traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm +++ b/traffic_ops/app/lib/Extensions/TrafficStats/API/CdnStats.pm @@ -52,10 +52,10 @@ sub get_usage_overview { my ( $rc, $result ) = $cstats->get_usage_overview(); if ( $rc == SUCCESS ) { - return $self->success($result); + return $self->deprecation_with_no_alternative(200, $result); } else { - return $self->alert($result); + return $self->deprecation_with_no_alternative(400, $result); } }