OpenWIS / openwis

http://openwis.github.io/openwis
GNU General Public License v3.0
11 stars 15 forks source link

Question: how to update metadata records programmatically? #374

Closed mtfelian closed 3 years ago

mtfelian commented 3 years ago

Hey! We have a GN 3.12.0 installation and we need to implement update metadata functionality via GeoNetwork's API or XML service. We considered both ways, but both failed.

It succeeded to get metadata record through xml.metadata.get service. But attempt to call xml.metadata.update leads to Service not allowed error.

Also xml.user.login don't works.

Also seems there is no REST API to update metadata record. We also tried to use PUT /{portal}/api/0.1/records method, but it's data format is unclear and seems nowhere documented. My idea was to rewrite metadata by using same ID like an update.

The way it works with GET|POST /{portal}/api/0.1/records/{metadataUuid}/editor seems usable only for "native" web application, because form there should be sent via some strangely named fields (_digits), we concluded, AngularJS are taking care of.

But we just need a way to update metadata through API!

Please anyone suggest how to do it? From the authorization (should we use basic auth, or j_spring_security_check, or xml.user.login and how to do all this via curl command line examples) to the process of updating metadata record.

mtfelian commented 3 years ago

Recreated in geonetwork/core-geonetwork repo