Description
Currently, the GeoNode API supports the upload/import of a remote resource from an external WMS service (e.g., GeoServer). If the service is already registered, it retrieves the harvestable resources from it; otherwise, it creates a new remote resource from the external service.
The corresponding issue is available here
An request example is presented below:
curl --location 'http://localhost:8000/api/v2/uploads/upload' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"url": "https://<domain>/geoserver/wms",
"title": "Remote WMS Test",
"type": "wms",
"identifier": "xxxx",
"parse_remote_metadata": true,
"action": "upload"
}'
However, this functionality does not support importing resources from private WMS services that require authentication.
Proposed solution
To address this limitation, the functionality will be extended. In the case of a private WMS service, the following steps will be added to the current workflow:
- check if the private WMS service is registered in GeoNode as a service (harvester) triggered by the request
- If yes, retrieve the credentials internally and import the resource into the GeoNode catalog (equivalent to triggering “import resource” / harvest via the UI)
- If not, the request is refused.
Description
Currently, the GeoNode API supports the upload/import of a remote resource from an external WMS service (e.g., GeoServer). If the service is already registered, it retrieves the harvestable resources from it; otherwise, it creates a new remote resource from the external service.
The corresponding issue is available here
An request example is presented below:
However, this functionality does not support importing resources from private WMS services that require authentication.
Proposed solution
To address this limitation, the functionality will be extended. In the case of a private WMS service, the following steps will be added to the current workflow: