Skip to content

Align API with new database schema and STAC-compliant extent terminology + correctly implemented GET/collections-queryables endpoint - #264

Merged
RobinGummels merged 37 commits into
dev-apifrom
dev-api-Vincent
Jan 30, 2026
Merged

Align API with new database schema and STAC-compliant extent terminology + correctly implemented GET/collections-queryables endpoint#264
RobinGummels merged 37 commits into
dev-apifrom
dev-api-Vincent

Conversation

@VincentKuehn

Copy link
Copy Markdown
Contributor

Updated the API to align with the new database schema and fixed previously inconsistent field naming. I also implemented the GET /collections-queryables endpoint.

The endpoint is based on the schema defined in config/queryablesShema.js and serves as the public contract for which properties can be used in CQL2 filters and query parameters.

Key changes:

  • Updated all database queries to use the new schema (spatial_extent, temporal_extent_start, temporal_extent_end)
  • Refactored API logic to consistently use STAC-compliant extent terminology
  • Updated CQL2 → SQL translation to target the new database columns
  • Switched queryables endpoint to use queryables shema
  • Implemented GET /collections-queryables
    • Returns the schema as application/schema+json
    • Uses dynamic $id based on request host
  • Fixed landing page link (rel: queryables) to point to /collections-queryables
  • Added Jest/Supertest coverage for the new endpoint
  • Fixed operator set from buildCollectionsQueryablesShema
  • Updated tests to reflect the new schema and naming conventions
  • Ensured fulltext search uses the persisted search_vector column for better performance

…ial_extent' and 'temporal_extend' to 'temporal_extent' in tests and documentation
…ial_extent' and 'temporal_extend' to 'temporal_extent' in tests
…ial_extent' and ensure correct usage of 'temporal_extent_start' and 'temporal_extent_end' in tests

@RobinGummels RobinGummels left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Maybe have a look into my remarks.

I'm not 100% sure, if the collections-queryables endpoint is how i expected, but i think thats fine.

Thx for doing all the migration-work for the new db.

Comment thread api/db/buildCollectionSearchQuery.js
Comment thread api/routes/collections.js Outdated
Comment thread api/utils/cql2ToSql.js Outdated
Comment thread api/config/queryablesSchema.js
Comment thread api/__tests__/DBconnection.test.js
@RobinGummels

Copy link
Copy Markdown
Contributor

I didn't had a look into the thematic of the failed catalog-tests... I will do this tomorrow.

@RobinGummels
RobinGummels merged commit dc53a6d into dev-api Jan 30, 2026
2 checks passed
@RobinGummels RobinGummels linked an issue Jan 31, 2026 that may be closed by this pull request
3 tasks
@VincentKuehn
VincentKuehn deleted the dev-api-Vincent branch January 31, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API enhancement New feature or request fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API: 6.2 Implement GET /collections-queryables API: 6.1 Define Queryables Schema API: 6 Queryables Endpoint

2 participants