[
https://issues.apache.org/jira/browse/TC-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15637504#comment-15637504
]
Eric Friedrich commented on TC-28:
----------------------------------
I like adding more structure to this response.
When making this change, can you please avoid making a breaking change to the
API?
Specifically the options are:
1) create a new route that returns data in this new format
2) keep the same route, but introduce a Traffic Ops config param
> 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)