Skip to content

Add GET endpoints for named places#301

Merged
regetz merged 1 commit intodevelopfrom
feature-299-get-named-places
Feb 8, 2026
Merged

Add GET endpoints for named places#301
regetz merged 1 commit intodevelopfrom
feature-299-get-named-places

Conversation

@regetz
Copy link
Contributor

@regetz regetz commented Feb 8, 2026

What

This PR adds GET endpoints for named places, allowing clients to get this data as:

  1. A single named place identified by its np_code
  2. The full paginated collection of named places

It also sneaks in a few minor code comment and OpenAPI doc fixes.

Why

So that clients can get the set of named places registered in VegBank, especially for associating with their own plot observations at upload time ... if we choose to support this.

Previously we only returned named place records associated with specific plot observations, as a nested array field in the plot observation responses.

How

  • Added a new NamedPlace operator
  • Add relevant new routes

Testing and documentation

  • Manually tested that the new endpoints work as expected
  • Add complete API documentation of these new endpoints to the OpenAPI Spec doc
  • Also locally uploaded vegbankr R package API integration and end-to-end tests for hitting the new endpoints, and confirmed that all tests pass

Demo

Get one named place record
$ http GET 'http://127.0.0.1:8080/named-places/np.61514'
{
    "count": 1,
    "data": [
        {
            "code": "ZION",
            "description": null,
            "name": "Zion NP",
            "np_code": "np.61514",
            "obs_count": 0,
            "owner": "US NPS",
            "rf_label": null,
            "system": "Geographic Name"
        }
    ]
}
Get the full paginated collection of named places (limit 2)
$ http GET 'http://127.0.0.1:8080/named-places?limit=2'
{
    "count": 64563,
    "data": [
        {
            "code": "f",
            "description": null,
            "name": "Africa",
            "np_code": "np.1",
            "obs_count": 0,
            "owner": null,
            "rf_label": "USLC place names",
            "system": "continent"
        },
        {
            "code": "fc",
            "description": null,
            "name": "Africa, Central",
            "np_code": "np.2",
            "obs_count": 0,
            "owner": null,
            "rf_label": "USLC place names",
            "system": "area|country|territory"
        }
    ]
}

@regetz regetz requested a review from RWShelton February 8, 2026 02:09
@regetz regetz self-assigned this Feb 8, 2026
@regetz regetz linked an issue Feb 8, 2026 that may be closed by this pull request
@regetz
Copy link
Contributor Author

regetz commented Feb 8, 2026

Successfully deployed to the k8s dev cluster in the vegbank namespace and tested there. Merging to dev...

@regetz regetz merged commit 2f372df into develop Feb 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add endpoints for getting named places

1 participant

Comments