Skip to content

Feature/6586 add feature for wfs subsetting#140

Merged
utas-raymondng merged 9 commits into
mainfrom
feature/6586-add-feature-for-wfs-subsetting
Jul 31, 2025
Merged

Feature/6586 add feature for wfs subsetting#140
utas-raymondng merged 9 commits into
mainfrom
feature/6586-add-feature-for-wfs-subsetting

Conversation

@NekoLyn
Copy link
Copy Markdown
Contributor

@NekoLyn NekoLyn commented Jul 28, 2025

if run locally: baseUrl = http://localhost:8080/api/v1/ogc
if run in edge: baseUrl = https://ogcapi-edge.aodn.org.au/

example SUCCESS request
GET {{baseUrl}}/collections/collectionId/items/downloadableFields?serverUrl=https://geoserver-123.aodn.org.au/geoserver/wfs&layerName=imos:aatams_sattag_dm_profile_map

Response

[
    {
        "label": "timestamp",
        "type": "dateTime",
        "name": "timestamp"
    },
    {
        "label": "geom",
        "type": "geometrypropertytype",
        "name": "geom"
    }
]

example exception 403:

{
    "timestamp": "2025-07-29T03:14:27.464209412",
    "message": "Access to WFS server 'https://geoserver.imas.utas.edu/geoserver/wfs?' is not authorized. Only approved servers are allowed.",
    "details": "uri=/api/v1/ogc/collections/collectionId/items/downloadableFields"
}

example exception 404:
GET {{baseUrl}}/collections/collectionId/items/downloadableFields?serverUrl=https://geoserver.imas.utas.edu.au/geoserver/wfs?&layerName=imas:IMAS_BRUV_clips_video

{
    "timestamp": "2025-07-28T05:19:31.108343671",
    "message": "No downloadable fields found for typeName 'imas:IMAS_BRUV_clips_video' from WFS server 'https://geoserver.imas.utas.edu.au/geoserver/wfs?'",
    "details": "uri=/api/v1/ogc/collections/collectionId/items/downloadableFields"
}

example exception 403:
GET {{baseUrl}}/collections/collectionId/items/downloadableFields?serverUrl=https://geoserver.imas.utas.edu/geoserver/wfs?&layerName=imas:IMAS_BRUV_clips_video

{
    "timestamp": "2025-07-29T03:14:27.464209412",
    "message": "Access to WFS server 'https://geoserver.imas.utas.edu/geoserver/wfs?' is not authorized. Only approved servers are allowed.",
    "details": "uri=/api/v1/ogc/collections/collectionId/items/downloadableFields"
}

example exception 400:
GET {{baseUrl}}/collections/collectionId/items/downloadableFields?layerName=imas:IMAS_BRUV_clips_video

@NekoLyn NekoLyn force-pushed the feature/6586-add-feature-for-wfs-subsetting branch from 5893067 to a7cf903 Compare July 28, 2025 07:01
@NekoLyn NekoLyn force-pushed the feature/6586-add-feature-for-wfs-subsetting branch 2 times, most recently from 01f87ca to 70961ff Compare July 29, 2025 00:23
@NekoLyn NekoLyn force-pushed the feature/6586-add-feature-for-wfs-subsetting branch from 70961ff to aab12a6 Compare July 29, 2025 00:24
@NekoLyn NekoLyn force-pushed the feature/6586-add-feature-for-wfs-subsetting branch from 29ad8c4 to cba90d7 Compare July 29, 2025 03:12
@NekoLyn NekoLyn force-pushed the feature/6586-add-feature-for-wfs-subsetting branch from c788a46 to e593571 Compare July 29, 2025 03:48
Copy link
Copy Markdown
Collaborator

@utas-raymondng utas-raymondng left a comment

Choose a reason for hiding this comment

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

Minor change request

Comment thread server/src/main/java/au/org/aodn/ogcapi/server/features/RestApi.java Outdated
Comment thread server/src/main/java/au/org/aodn/ogcapi/server/features/RestApi.java Outdated
Copy link
Copy Markdown
Collaborator

@utas-raymondng utas-raymondng left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread server/src/main/java/au/org/aodn/ogcapi/server/features/RestApi.java Outdated
Comment thread server/src/main/java/au/org/aodn/ogcapi/server/features/RestApi.java Outdated
@utas-raymondng utas-raymondng merged commit 36030dc into main Jul 31, 2025
4 checks passed
@utas-raymondng utas-raymondng deleted the feature/6586-add-feature-for-wfs-subsetting branch July 31, 2025 01:02
@utas-raymondng
Copy link
Copy Markdown
Collaborator

It would be good if you can remove the serverURL in the next PR and look it up using the UUID. Then user cannot change the URL in the query which is more secure

@NekoLyn
Copy link
Copy Markdown
Contributor Author

NekoLyn commented Jul 31, 2025

It would be good if you can remove the serverURL in the next PR and look it up using the UUID. Then user cannot change the URL in the query which is more secure

Thanks! I created a ticket for this issue
https://github.com/aodn/backlog/issues/7198

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.

3 participants