.. _metadata_xml_services: Metadata services ================= Retrieve metadata services -------------------------- Search metadata (xml.search) ```````````````````````````` The **xml.search** service can be used to retrieve the metadata stored in GeoNetwork. Requires authentication: Optional Request ^^^^^^^ Search configuration parameters (all values are optional) - **remote**: Search in local catalog or in a remote catalog. Values: off (default), on - **extended**: Values: on, off (default) - **timeout**: Timeout for request in seconds (default: 20) - **hitsPerPage**: Results per page (default: 10) - **similarity**: Lucene accuracy for searches (default 0.8) - **sortBy**: Sorting criteria. Values: relevance (default), rating, popularity, changeDate, title Search parameters (all values are optional): - **eastBL, southBL, northBL, westBL**: Bounding box to restrict the search - **relation**: Bounding box criteria. Values: equal, overlaps (default), encloses, fullyOutsideOf, intersection, crosses, touches, within - **any**: Text to search in a free text search - **title**: Metadata title - **abstract**: Metadata abstract - **themeKey**: Metadata keywords. To search for several use a value like "Global" or "watersheds" - **template**: Indicates if search for templates or not. Values: n (default), y - **dynamic**: Map type. Values: off (default), on - **download**: Map type. Values: off (default), on - **digital**: Map type. Values: off (default), on - **paper**: Map type. Values: off (default), on - **group**: Filter metadata by group, if missing search in all groups - **attrset**: - **dateFrom**: Filter metadata created after specified date - **dateTo**: Filter metadata created before specified date - **category**: Metadata category. If not specified, search all categories Request to search for all metadata example:: Url: http://localhost:8080/geonetwork/srv/en/xml.search Mime-type: application/xml Post request: Request with free text search example:: Url: http://localhost:8080/geonetwork/srv/en/xml.search Mime-type: application/xml Post request:s africa Request with a geographic search example:: Url: http://localhost:8080/geonetwork/srv/en/xml.search Mime-type: application/xml Post request: africa 74.91574 29.40611 38.47198 60.50417 overlaps relevance geo Request to search using dates and keywords example:: Url: http://localhost:8080/geonetwork/srv/en/xml.search Mime-type: application/xml Post request: africa "Global" or "World" 2000-02-03T12:47:00 2010-02-03T12:49:00 Response ^^^^^^^^ The response is the metadata record with additional **geonet:info** section. The main fields for **geonet:info** are: - **response**: Response container. - **summary**: Attribute **count** indicates the number of metadata records retrieved - **keywords**: List of keywords that are part of the metadata resultset. Each keyword contains the value and the number of occurences in the retrieved metadata - **metadata**: Container for metadata records found. Each record contains an **geonet:info** element with the following information: - **title**: RSS channel title - **description**: RSS channel description - **item**: Metadata RSS item (one item for each metadata retrieved) - **id**: Metadata internal identifier - **uuid** : Metadata Universally Unique Identifier (UUID) - **schema**: Metadata schema - **createDate**: Metadata creation date - **changeDate**: Metadata last modification date - **source**: Source catalogue the metadata - **category**: Metadata category (Can be multiple elements) - **score**: Value indicating the accuracy of search Metadata search response example:: 12 bc179f91-11c1-4878-b9b4-2270abde98eb iso19139 2007-07-25T12:05:45 2007-11-06T12:10:47 881a1630-d4e7-4c9c-aa01-7a9bbbbc47b2 maps interactiveResources 1.0 11 5df54bf0-3a7d-44bf-9abf-84d772da8df1 iso19139 2007-07-19T14:45:07 2007-11-06T12:13:00 881a1630-d4e7-4c9c-aa01-7a9bbbbc47b2 maps datasets interactiveResources 0.9178859 Get metadata (xml.metadata.get) ``````````````````````````````` The **xml.metadata.get** service can be used to retrieve a metadata record stored in GeoNetwork. Requires authentication: Optional Request ^^^^^^^ Parameters (one of them mandatory): - **uuid** : Metadata Universally Unique Identifier (UUID) - **id**: Metadata internal identifier Get metadata request example:: Url: http://localhost:8080/geonetwork/srv/en/xml.metadata.get Mime-type: application/xml Post request: aa9bc613-8eef-4859-a9eb-4df35d8b21e4 Response ^^^^^^^^ The response is the metadata record with additional **geonet:info** section. The principal fields for **geonet:info** are: - **schema**: Metadata schema - **createDate**: Metadata creation date - **changeDate**: Metadata last modification date - **isTemplate**: Indicates if the metadata returned is a template - **title**: Metadata title - **source**: Source catalogue the metadata - **uuid** : Metadata Universally Unique Identifier (UUID) - **isHarvested**: Indicates if the metadata is harvested - **popularity**: Indicates how often the record is retrieved - **rating**: Average rating provided by users - State of operation on metadata for the user: view, notify, download, dynamic, featured, edit - **owner**: Indicates if the user that executed the service is the owner of metadata - **ownername**: Metadata owner name Get metadata response example:: aa9bc613-8eef-4859-a9eb-4df35d8b21e4 ... 10 iso19115 2005-08-23T17:58:18 2007-03-12T17:49:50 n <source>881a1630-d4e7-4c9c-aa01-7a9bbbbc47b2</source> <uuid>aa9bc613-8eef-4859-a9eb-4df35d8b21e4</uuid> <isHarvested>n</isHarvested> <popularity>0</popularity> <rating>0</rating> <view>true</view> <notify>true</notify> <download>true</download> <dynamic>true</dynamic> <featured>true</featured> <edit>true</edit> <owner>true</owner> <ownername>admin</ownername> <subtemplates /> </geonet:info> </Metadata> Errors ^^^^^^ - **Request must contain a UUID or an ID**, when no uuid or id parameter is provided - **Operation not allowed (error id: operation-not-allowed)**, when the user is not allowed to show the metadata record. Returned 403 HTTP code RSS Search: Search metadata and retrieve in RSS format (rss.search) ``````````````````````````````````````````````````````````````````` The **rss.search** service can be used to retrieve metadata records in RSS format, using regular search parameters. This service can be configured in **WEB-INF\\config.xml** file setting the next parameters: - **maxSummaryKeys**: Maximum number of RSS records to retrieve (default = 10) Requires authentication: Optional. If not provided only public metadata records are retrieved Request ^^^^^^^ Parameters: - **georss**: valid values are simple, simplepoint and default. See also http://georss.org - **simple**: Bounding box in georss simple format - **simplepoint**: Bounding box in georss simplepoint format - **default**: Bounding box in georss GML format - **eastBL, southBL, northBL, westBL**: Bounding box to restrict the search**** - **relation**: Bounding box criteria. Values: equal, overlaps (default), encloses, fullyOutsideOf, intersection, crosses, touches, within - **any**: Text to search in a free text search - **title**: Metadata title - **abstract**: Metadata abstract - themeKey: Metadata keywords. To search for several use a value like "Global" or "watersheds" - **dynamic**: Map type. Values: off (default), on - **download**: Map type. Values: off (default), on - **digital**: Map type. Values: off (default), on - **paper**: Map type. Values: off (default), on - **group**: Filter metadata by group, if missing search in all groups - **attrset**: - **dateFrom**: Filter metadata created after specified date - **dateTo**: Filter metadata created before specified date - **category**: Metadata category. If not specified, search all categories RSS search request example:: Url: http://localhost:8080/geonetwork/srv/en/rss.search Mime-type: application/xml Post request: <?xml version="1.0" encoding="UTF-8"?> <request> <georss>simplepoint</georss> <any>africa</any> <eastBL>74.91574</eastBL> <southBL>29.40611</southBL> <northBL>38.47198</northBL> <westBL>60.50417</westBL> <relation>overlaps</relation> <sortBy>relevance</sortBy> <attrset>geo</attrset> </request> Response ^^^^^^^^ Here follows the principal fields of the response: - **channel**: This is the container for the RSS response - **title**: RSS channel title - **description**: RSS channel description - **item**: Metadata RSS item (one item for each metadata retrieved) - **title**: Metadata title - **link**: Link to show metadata page. Additional link elements (with rel="alternate") to OGC WXS services, shapefile/images files, Google KML, etc. can be returned depending on metadata - **description**: Metadata description - **pubDate**: Metadata publication date - **media**: Metadata thumbnails - **georrs:point**: Bounding box in georss simplepoint format RSS latest response example:: Mimetype: application/rss+xml Response: <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" version="2.0"> <channel> <title>GeoNetwork opensource portal to spatial data and information http://localhost:8080/geonetwork GeoNetwork opensource provides Internet access to interactive maps, satellite imagery and related spatial databases ... en All rights reserved. Your generic copyright statement Geographic metadata catalog GeoNetwork opensource 30 Hydrological Basins in Africa (Sample record, please remove!) http://localhost:8080/geonetwork?uuid=5df54bf0-3a7d-44bf-9abf-84d772da8df1 Geographic metadata catalog 06 Nov 2007 12:13:00 EST http://localhost:8080/geonetwork?uuid=5df54bf0-3a7d-44bf-9abf-84d772da8df1 Major hydrological basins and their sub-basins ... 16.9 1.8 RSS latest: Get latest updated metadata (rss.latest) ```````````````````````````````````````````````````` The **rss.latest** service can be used to retrieve the latest added metadata records in RSS format. This service can be configured in **WEB-INF\\config.xml** file setting the next parameters: - **maxItems**: Maximum number of RSS records to retrieve (default = 20) - **timeBetweenUpdates**: Minutes to query database for new metadata (default = 60) Requires authentication: Optional. If not provided only public metadata records are retrieved Request ^^^^^^^ Parameters: - **georss**: valid values are simple, simplepoint and default. See also http://georss.org - **simple**: Bounding box in georss simple format - **simplepoint**: Bounding box in georss simplepoint format - **default**: Bounding box in georss GML format RSS latest request example:: Url: http://localhost:8080/geonetwork/srv/en/rss.latest Mime-type: application/xml Post request: default 1 Response ^^^^^^^^ Here follows the principal fields of the response: - **channel**: This is the container for the RSS response - **title**: RSS channel title - **description**: RSS channel description - **item**: Metadata RSS item (one item for each metadata retrieved) - **title**: Metadata title - **link**: Link to show metadata page. Additional link elements (with rel="alternate") to OGC WXS services, shapefile/images files, Google KML, etc. can be returned depending on metadata - **description**: Metadata description - **pubDate**: Metadata publication date - **media**: Metadata thumbnails - **georrs:where**: Bounding box with the metadata extent RSS latest response example:: Mimetype: application/rss+xml Response: GeoNetwork opensource portal to spatial data and information http://localhost:8080/geonetwork GeoNetwork opensource provides Internet access to interactive maps, satellite imagery and related spatial databases ... en All rights reserved. Your generic copyright statement Geographic metadata catalog GeoNetwork opensource 30 Hydrological Basins in Africa (Sample record, please remove!) http://localhost:8080/geonetwork?uuid=5df54bf0-3a7d-44bf-9abf-84d772da8df1 Geographic metadata catalog 06 Nov 2007 12:13:00 EST http://localhost:8080/geonetwork?uuid=5df54bf0-3a7d-44bf-9abf-84d772da8df1 Major hydrological basins and their sub-basins ... -34.6 -17.3 38.2 51.1 Metadata administration services -------------------------------- Update operations allowed for a metadata (metadata.admin) ````````````````````````````````````````````````````````` The **metadata.admin** service updates the operations allowed for a metadata with the list of operations allowed send in the parameters, **deleting all the operations allowed assigned previously**. Requires authentication: Yes Request to metadata.admin service ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Parameters: - **id**: Identifier of metadata to update - **_G_O**: (can be multiple elements) - **G**: Group identifier - **O**: Operation identifier Operation identifiers: - 0: view - 1: download - 2: editing - 3: notify - 4: dynamic - 5: featured Request metadata update operations allowed example: **POST**:: Url: http://localhost:8080/geonetwork/srv/en/metadata.admin Mime-type: application/xml Post request: 6 <_1_2 /> <_1_1 /> **GET**:: Url: http://localhost:8080/geonetwork/srv/en/metadata.admin?id=6&_1_2&_1_1 Response to metadata.admin service ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The response contains the identifier of the metadata updated. Response metadata update operations allowed example:: 6 Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code - **Metadata not found (error id: metadata-not-found)** if not exists a metadata record with the identifier provided - **ERROR: insert or update on table "operationallowed" violates foreign key 'operationallowed_operationid_fkey »**, if an operation identifier provided is not valid - **ERROR: insert or update on table "operationallowed" violates foreign key 'operationallowed_groupid_fkey »**, if a group identifier provided is not valid Massive update privilegies (metadata.massive.update.privileges) ``````````````````````````````````````````````````````````````` The **metadata.massive.update.privileges** service updates the operations allowed for a selected metadata with the list of operations allowed send in the parameters, **deleting all the operations allowed assigned previously**. This service requires a previous call to **metadata.select** service to select the metadata records to update. Requires authentication: Yes Request to metadata.select service ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Parameters: - **id**: Identifier of metadata to select - **selected**: Selection state. Values: add, add-all, remove, remove-all Select all metadata allowed example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.select Mime-type: application/xml Post request: add-all Select a metadata record example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.select Mime-type: application/xml Post request: 2 add Clear metadata selection example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.select Mime-type: application/xml Post request: remove-all Response to metadata.select service ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The response contains the number of metadata selected. Response select metadata example:: 10 Request to metadata.massive.update.privileges ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Parameters: - **_G_O**: (can be multiple elements) - **G**: Group identifier - **O**: Operation identifier Operation identifiers: - 0: view - 1: download - 2: editing - 3: notify - 4: dynamic - 5: featured Request metadata massive update privilegies example: **POST**:: Url: http://localhost:8080/geonetwork/srv/en/metadata.massive.update.privileges Mime-type: application/xml Post request: <_1_2 /> <_1_1 /> **GET**:: Url: http://localhost:8080/geonetwork/srv/en/metadata.massive.update.privileges?_1_2&_1_1 Response to metadata.massive.update.privileges ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If request is executed succesfully HTTP 200 status code is returned. If request fails an HTTP status code error is returned and the response contains the XML document with the exception. Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code - **Metadata not found (error id: metadata-not-found)** if not exists a metadata record with the identifier provided - **ERROR: insert or update on table "operationallowed" violates foreign key 'operationallowed_operationid_fkey »**, if an operation identifier provided is not valid - **ERROR: insert or update on table "operationallowed" violates foreign key 'operationallowed_groupid_fkey »**, if a group identifier provided is not valid Metadata ownership services --------------------------- This services allow to manage the metadata ownership (the user who created the metadata), for example to get information about the users who created metadata records or transfer the ownership of metadata records to another user. Only users with **Administrator** and **UserAdmin** profiles can execute these services. Massive new owner (metadata.massive.newowner) ````````````````````````````````````````````` The **metadata.massive.newowner** service allows to change the owner of a group of metadata. This service requires a previous call to **metadata.select** service to select the metadata records to update. Requires authentication: Yes Request to metadata.select service ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Parameters: - **id**: Identifier of metadata to select (can be multiple elements) - **selected**: Selection state. Values: add, add-all, remove, remove-all Select metadata request example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.select Mime-type: application/xml Post request: add-all Response to metadata.select service ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The response contains the number of metadata selected. Select metadata response example:: 10 Request to metadata.massive.newowner ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Once the metadata records have been selected can be **metadata.massive.newowner** invoked with the next parameters: - **user**: (mandatory) New owner user identifier - **group**: (mandatory) New owner group user identifier Transfer ownership request example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.massive.newowner Mime-type: application/xml Post request: 2 2 Response to metadata.massive.newowner ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If request is executed succesfully HTTP 200 status code is returned. If request fails an HTTP status code error is returned and the response contains the XML document with the exception. Transfer ownership (xml.ownership.transfer) ``````````````````````````````````````````` The **xml.ownership.transfer** service can be used to transfer ownership and privileges of metadata owned by a user (in a group) to another user (in a group). This service should be used with data retrieved from previous invocations to the services :ref:`xml.ownership.editors ` and :ref:`xml.ownership.groups `, described below. Requires authentication: Yes Request ^^^^^^^ Parameters: - **sourceUser**: (mandatory) Identifier of the user to transfer the ownership of her metadata**** - **sourceGroup**: (mandatory) Identifier of source group of the metadata to transfer ownership - **targetUser**: (mandatory) Identifier of the user to get the set the new metadata ownership - **targetGroup**: (mandatory) Identifier of target group of the transferred ownership metadata Example: In the next example we are going to transfer the ownership and privileges of metadata owned of user John (id=2) in group RWS (id=5) to user Samantha(id=7) in group NLR (id=6) Transfer ownership request example:: Url: http://localhost:8080/geonetwork/srv/en/xml.ownership.transfer Mime-type: application/xml Post request: 2 5 7 6 Response ^^^^^^^^ Here follows the structure of the response: - **response**: This is the container for the response - **privileges**: Transferred privileges - **metadata**: Transferred metadata records Transfer ownership response example:: 4 2 Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code - **Missing parameter (error id: missing-parameter)**, when mandatory parameters are not provided - **bad-parameter XXXX**, when a mandatory parameter is empty .. _xml.ownership.editors: Retrieve metadata owners (xml.ownership.editors) ```````````````````````````````````````````````` The **xml.ownership.editors** service can be used to retrieve the users that own metadata records. Requires authentication: Yes Request ^^^^^^^ Parameters: - **None** Retrieve metadata owners request example:: Url: http://localhost:8080/geonetwork/srv/en/xml.ownership.editors Mime-type: application/xml Post request: Response ^^^^^^^^ Here follows the structure of the response: - **root**: This is the container for the response - **editor**: Container for each editor user information - **id**: User identifier - **username**: User login - **name**: User name - **surname**: User surname - **profile**: User profile Retrieve metadata editors response example:: 1 admin admin admin Administrator 2 samantha Samantha Smith Editor Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code .. _xml.ownership.groups: Retrieve groups/users allowed to transfer metadata ownership from a user (xml.ownership.groups) ``````````````````````````````````````````````````````````````````````````````````````````````` The **xml.ownership.groups** service can be used to retrieve the groups/users to which can be transferred the metadata ownership/privilegies from the specified user. Request ^^^^^^^ Parameters: - **id**: (mandatory) User identifier of the user to check to which groups/users can be transferred the ownership/privilegies of her metadata Retrieve ownership groups request example:: Url: http://localhost:8080/geonetwork/srv/en/xml.ownership.groups Mime-type: application/xml Post request: 2 Response ^^^^^^^^ Here follows the structure of the response: - **response**: This is the container for the response - **targetGroup**: Allowed target group to transfer ownership of user metadata (can be multiple **targetGroup** elements) - **id, name, description, email, referrer, label**: Group information - **editor**: Users of the group that own metadata (can be multiple **editor** elements) - **id,surname, name**: Metadata user owner information Retrieve ownership groups response example:: 2 sample Demo group group@mail.net 12 13 Samantha 6 RWS 7 Samantha ... Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code Metadata editing ---------------- This services allow to maintaining the metadata in the catalog. Insert metadata (metadata.insert) ````````````````````````````````` The **metadata.insert** service allows to create a new metadata record in the catalog. Requires authentication: Yes Request ^^^^^^^ Parameters: - **data**: (mandatory) Contains the metadata record - **group** (mandatory): Owner group identifier for metadata - **isTemplate**: indicates if the metadata content is a new template or not. Default value: "n" - **title**: Metadata title. Only required if isTemplate = "y" - **category** (mandatory): Metadata category. Use "_none_" value to don't assign any category - **styleSheet** (mandatory): Stylesheet name to transform the metadata before inserting in the catalog. Use "_none_" value to don't apply any stylesheet - **validate**: Indicates if the metadata should be validated before inserting in the catalog. Values: on, off (default) Insert metadata request example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.insert Mime-type: application/xml Post request: 2 _none_ _none_ ]]> Response ^^^^^^^^ If request is executed succesfully HTTP 200 status code is returned. If request fails an HTTP status code error is returned and the response contains the XML document with the exception. If validate parameter is set to "on" and the provided metadata is not valid confirming the xsd schema an exception report is returned. Validation metadata report:: XSD Validation error(s) XSDValidationErrorEx ERROR(1) org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '' is not a valid value for 'dateTime'. (Element: gco:DateTime with parent element: gmd:date) gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:DateTime ERROR(2) org.xml.sax.SAXParseException: cvc-type.3.1.3: The value '' of element 'gco:DateTime' is not valid. (Element: gco:DateTime with parent element: gmd:date) gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date/gco:DateTime ERROR(3) org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'. (Element: gco:Integer with parent element: gmd:denominator) gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer ERROR(4) org.xml.sax.SAXParseException: cvc-type.3.1.3: The value '' of element 'gco:Integer' is not valid. (Element: gco:Integer with parent element: gmd:denominator) gmd:identificationInfo/gmd:MD_DataIdentification/gmd:spatialResolution/gmd:MD_Resolution/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer en metadata.insert Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code - **Missing parameter (error id: missing-parameter)**, when mandatory parameters are not provided. Returned 400 HTTP code - **bad-parameter XXXX**, when a mandatory parameter is empty. Returned 400 HTTP code - **ERROR: duplicate key violates unique constraint "metadata_uuid_key"**, if exists another metadata record in catalog with the same uuid of the metadata provided to insert Update metadata (metadata.update) ````````````````````````````````` The metadata.update service allows to update the content of a metadata record in the catalog. Requires authentication: Yes Request ^^^^^^^ Parameters: - **id**: (mandatory) Identifier of the metadata to update - **version**: (mandatory) This parameter is used to check if another user has updated the metadata after we retrieved it and before involking the update metadata service. **CHECK how to provide value to the user** - **isTemplate**: indicates if the metadata content is a new template or not. Default value: "n" - **showValidationErrors**: Indicates if the metadata should be validated before updating in the catalog. - **title**: Metadata title (for templates) - **data** (mandatory) Contains the metadata record Update metadata request example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.update Mime-type: application/xml Post request: 11 **1** ]]> Response ^^^^^^^^ If request is executed succesfully HTTP 200 status code is returned. If request fails an HTTP status code error is returned and the response contains the XML document with the exception. Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code - **Missing parameter (error id: missing-parameter)**, when mandatory parameters are not provided. Returned 400 HTTP code - **bad-parameter XXXX**, when a mandatory parameter is empty. Returned 400 HTTP code - **Concurrent update (error id: client)**, when the version number provided is different from actual version number for metatada. Returned 400 HTTP code Delete metadata (metadata.delete) ````````````````````````````````` The **metadata.delete** service allows to remove a metadata record from the catalog. The metadata content is backup in MEF format by default in data\\removed folder. This folder can be configured in geonetwork\\WEB-INF\\config.xml. Requires authentication: Yes Request ^^^^^^^ Parameters: - **id**: (mandatory) Identifier of the metadata to delete Delete metadata request example:: Url: http://localhost:8080/geonetwork/srv/en/metadata.delete Mime-type: application/xml Post request: 10 Response ^^^^^^^^ If request is executed succesfully HTTP 200 status code is returned. If request fails an HTTP status code error is returned and the response contains the XML document with the exception. Errors ^^^^^^ - **Service not allowed (error id: service-not-allowed)**, when the user is not authenticated or his profile has no rights to execute the service. Returned 401 HTTP code - **Metadata not found (error id: error)**, if the identifier provided don't correspond to an existing metadata. Returned 500 HTTP code - **Operation not allowed** **(error id: operation-not-allowed)**, when the user is not authorized to edit the metadata. To edit a metadata: - The user is the metadata owner - The user is an Administrator - The user has edit rights over the metadata - The user is a Reviewer and/or UserAdmin and the metadata groupOwner is one of his groups