At the moment I'm trying to write a process (in Python) to update a metadata record in GeoNetwork 3.10.2, which we have running on our intranet recently. Unfortunately, I'm unable to figure out how to do automated updates to specific properties of the record, such as the last update time and a dataset version id. I found /srv/eng/admin.console#/settings/csw-test that shows a list of what I'm able to do through the API, but so far I have been successful mostly in blowing up a few test records - I get a ISO date error which leaves the record void of metadata.
From what I tried, I have been unable to extract a working cURL command from the csw-test page to translate to Python code. From the network console I can extract some information, but it's not enough to replicate - even the blow-up behaviour. Also, it includes use of a cookie that I would like to get rid of in production.
From the REST API side, I am clueless on how to operate either the /{portal}/api/0.1/records/{metadataUuid}/editor
or the /geonetwork/srv/eng/xml.metadata.update
endpoints - I cannot find sufficient documentation on how to operate these.
So, let's say I want to update some fields the summary - how do I go about this?
Any pointers in posix cURL format or Python would be very, very helpful. Thanks in advance.
EDIT: I've auto-generated the Python code for the /editor endpoint to try and figure out how this is supposed to work. Bootstrapping the code works using
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar -O swagger-codegen-cli.jar
java -jar swagger-codegen-cli.jar generate -i https://your_geonetwork/srv/v2/api-docs -l python -o ./python_geonetwork_client
but the code itself results in authentication errors, using basic authentication methods.
EDIT2:
Unable to make a working GET call to {portal}/api/0.1/records/{metadata_uuid}/editor
work in Postman, also due to access denied errors. Following https://geonetwork-opensource.org/manuals/trunk/en/api/the-geonetwork-api.html using basic authentication