Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example to add xml element using geonetwork api #8246

Open
tp0b opened this issue Jul 8, 2024 · 1 comment
Open

example to add xml element using geonetwork api #8246

tp0b opened this issue Jul 8, 2024 · 1 comment

Comments

@tp0b
Copy link

tp0b commented Jul 8, 2024

Hi everyone,

I am looking for some example to add publication date element in geonetwork using api so that i can run a code to check if existing memetadata records having this element or not. If not, I would like this code to add this element because we want to integrate to get this information updated.

For example, in geonetwork UI I can manually open the record, and choose editing in xml mode and scrolling down to the section of this element and the content of xml element for publication date

the xpath for this information is
.//mdb:identificationInfo/mri:MD_DataIdentification/mri:citation/cit:CI_Citation/cit:date/cit:CI_Date

By looking at geonetwork API documentation, it seems to me that [/{portal}/api/0.1/records/{metadataUuid}/editor/elements] might help, but i don't know how to put ref parameter

Anyone has a working example for this api and would like to share with me, that will be helpful for me
image

Thank you very much.

Cheers, Thu

@fxprunayre
Copy link
Member

ref references requires to open the record in edit mode (which combines the XML and XSD). May be easier to use batch edit API to update the XML eg. https://docs.geonetwork-opensource.org/4.4/user-guide/workflow/batchediting/

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

No branches or pull requests

2 participants