You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
geonode/services/ has no REST API today -- only classic form views and the harvesting API. This gives it one.
What
Full CRUD for services.Service at /api/v3/services/.
Registration isn't a plain row insert: Service is a ResourceBase subclass, and creating one probes the remote endpoint and builds a
harvester. Registration must go through that same path, not a bare serializer create().
The service's identity (URL, type) isn't editable after registration; only descriptive metadata is.
Service is a ResourceBase subclass, not a plain model -- list/retrieve visibility should go through GeoNode's normal per-object guardian check (get_visible_resources()), not a blanket "authenticated users see everything."
Registration must delegate to the existing form-based path, not reimplement it.CreateServiceForm is the only place the safe-URL check, the duplicate-base_url check, and the remote probe live -- reimplementing any of them independently risks a security-relevant divergence (e.g. missing the safe-URL check and allowing registration of an internal/unsafe URL). A bare ModelSerializer.create() would produce a Service row with no harvester, no keywords, and no verification the remote endpoint even exists, while looking completely normal over the API.
Service.delete() currently always raises -- no ResourceManager is registered for Service, so ResourceBase.delete()'s manager lookup fails with ValueError (see ResourceManagerRegistry.get_for_instance()). The classic UI view avoids this by deleting service.harvester and letting the DB cascade remove the service, which never calls the Python method. The new endpoint needs to do the same (delete the harvester if present; if there is none, use a queryset-level delete, not instance.delete()), or DELETE will crash on any service without a harvester.
base_url and type should stay read-only after registration -- they describe what was actually probed and verified; letting them change afterward would let a record silently drift from what was verified.
Tests should mock the service handler / remote probe -- the suite shouldn't need a live remote endpoint to pass.
Activity
[-][v3 API] Services endpoint[/-][+][API v3] Services endpoint[/+]etj commentedon Aug 20, 2026
Implementation notes:
Serviceis aResourceBasesubclass, not a plain model -- list/retrieve visibility should go through GeoNode's normal per-object guardian check (get_visible_resources()), not a blanket "authenticated users see everything."CreateServiceFormis the only place the safe-URL check, the duplicate-base_urlcheck, and the remote probe live -- reimplementing any of them independently risks a security-relevant divergence (e.g. missing the safe-URL check and allowing registration of an internal/unsafe URL). A bareModelSerializer.create()would produce aServicerow with no harvester, no keywords, and no verification the remote endpoint even exists, while looking completely normal over the API.Service.delete()currently always raises -- noResourceManageris registered forService, soResourceBase.delete()'s manager lookup fails withValueError(seeResourceManagerRegistry.get_for_instance()). The classic UI view avoids this by deletingservice.harvesterand letting the DB cascade remove the service, which never calls the Python method. The new endpoint needs to do the same (delete the harvester if present; if there is none, use a queryset-level delete, notinstance.delete()), orDELETEwill crash on any service without a harvester.base_urlandtypeshould stay read-only after registration -- they describe what was actually probed and verified; letting them change afterward would let a record silently drift from what was verified.