Jeremy Mitchell created TC-28:
---------------------------------
Summary: API response structure should be hierarchical instead of
flat
Key: TC-28
URL: https://issues.apache.org/jira/browse/TC-28
Project: Traffic Control
Issue Type: Improvement
Components: Traffic Ops API
Affects Versions: 1.8.0
Reporter: Jeremy Mitchell
Priority: Minor
Fix For: 1.8.0
I created a handful of api endpoints in 1.8 with a flat response structure like:
{
"response": [
{
"asn": "23",
"cachegroupId": "69",
"cachegroupName": "Foo_Cachegroup",
"id": "60",
"lastUpdated": "2016-10-13 12:31:43"
}
]
}
Although this is fine, it makes it more difficult to test when using structures
derived from the database. This structure is more friendly.
{
"response": [
{
"asn": "23",
"cachegroup": {
"id": "69",
"name": "Aberdeen_17802B_Ciscos"
},
"id": "60",
"lastUpdated": "2016-10-13 12:31:43"
}
]
}
This nested structure needs to be applied to api endpoints related to asn,
cachegroup, deliveryservice, phys_location, region, server and user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)