Transaction Request

Feedback


Request parameters

 

Transaction operation realizes three functions of inserting metadata, updating metadata and deleting metadata through POST request, and the request body adopts in XML format, the main node elements are described as follows:

Table 1 Transaction Operation Request Body Node Element

Request parameters Whether it is required Description
<Transaction> Yes

A transaction element includes 0 or more <Insert>, <Update>, or <Delete> elements used for inserting, updating, or deleting metadata.

Allowing the <Transaction> element to be empty, meaning it does not contain any other elements, rendering the transaction operation meaningless.

<Insert> No Required for inserting metadata.
The catalog metadata to be inserted needs to be described in accordance with the encoding rules defined by ISO19139 standard or the national mapping metadata standard (SMMD2007).
Only one metadata can be inserted into an <Insert> element.
<Update> No Required for metadata update. The typeName parameter specifies the type of information model object that needs to be updated.
An <Update> element can contain one or more <RecordProperty> elements that specify the attributes (< Name > elements) and attribute values (< Value > elements) of the metadata to be updated. In the absence of a < Value > element, the attribute is assigned a null value.
The < Update > element also contains the < Constraint > element, which is used to limit the scope of the metadata to be updated. There can be one or more. See the Request Example for details.
<Delete> No Required when performing metadata deletion operation. Among them, the typeName parameter is used to specify the type of information model object that needs to be deleted, such as the Record model of csw ogc
The metadata to be deleted is specified through the < Constraint > element, which can be one or more.

 

 

Request example

In this example, three Transaction operations are performed on the CSW service. First, a new piece of metadata is inserted, then the metadata is updated, and finally the metadata is deleted. That is, yes Http://localhost:8090/iserver/services.csw?SERVICE=CSW&request=Transaction&version=2.0.2, execution POST requests, which respectively transmit the following request bodies:

  1. Insert metadata

Execute the POST request with the following request body:

  1. Update metadata

Execute the POST request with the following request body:

  1. Delete the metadata

Execute the POST request with the following request body: