[Feature] Alternative response format for resources #346
Labels
api
Something related to the API operations
enhancement
Improvements in term of performance or behaviour
feature
New feature to be developed
Milestone
Route
GET /resources
returns a large nested dictionary of resources.It is useful for viewing the actual resource-children tree, but it is not practical for parsing because it has:
Different query parameters should be added to obtain alternate and improved response formats (captured by order of priority, going to next if false):
0.
nested=true|false
(default, current format with different details of service+resource)flatten=true|false
to obtain a flat list of all resources (similar to [Feature] Alternative listing of services #345, but for services)uniform=true|false
to obtain unified tree of resources with same fields as nested componentscombined=true|false
to obtain some kind of mixed representation of flattened-resources as list, but which tree-hierarchy still represented, where each sub-resource
container also being recursively a flattened-list, all using the same keywords and provided details.style=nested|flatten|uniform|combined
as other to capture values ?nested=true
defaultCurrent default
nested
format (backward compat):With
flatten=true
, the list gets flattened as follows.note:
parent_id
androot_service_id
are in the resource fields, so it is still possible to infer the whole graph, just easier to parseWith
uniform=true
, the format remains as a tree of resources, but removes all the extra details specific to services.Also,
children
are all replaced byresources
to effectively allow one to have a recursive function to parse the tree.Finally,
combined
format:The text was updated successfully, but these errors were encountered: