Skip to content

Structure admin area endpoints #61

@olafveerman

Description

@olafveerman

Triggered by Derek's question in orma/openroads-analytics#52, I think there is some room for improvement on the endpoints that deal with administrative areas, especially on how we structure the routes.

Here's a proposal that aims for two things:

  • makes it easy to get data from either a particular admin area or its descendants
  • provides high degree of control over what data is returned

Single administrative areas

Get information from a single administrative area. Does not include a reference to its descendants.

endpoint returns
/admin/:id Basic meta-data (name, id, type)
/admin/:id/boundary Basic meta-data + Boundary
/admin/:id/road-network Basic meta-data + Road network

Subregions

Get data from the subregions of a given area.

endpoint returns
/admin/:id/subregions Basic meta-data of all sub-regions (name, id, type)
/admin/:id/subregions/boundary Basic metadata + boundary of subregions

@dereklieu @kamicut @anandthakker @danielfdsilva
Would be great to hear your thoughts. Whether you agree that there is a need to begin with, the proposed structure, etc. This could be tackled first thing in phase 2.
Let me know if you want me to illustrate it with examples from the response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions