Editing in Service API

Via the Service API also editing functionality (point, line, polygon) is provided. Most of the editing parameters equal the URL call interface for editing parameters:

editaction

editlayerid

editkeyfield

editkeyvalue

editfields

editvalues

editreturnkey

edittableid

 

There is a specific parameter for the editing interface of the Service API:

geometry: Passes 1 to n vertices where x and y coordinates are concatenated with %20 or   and the vertices are separated by ; - i.e.

ogeometry=xcoordinate1%20ycoordinate1;xcoordinate2%20ycoordinate2 or

ogeometry=xcoordinate1 ycoordinate1;xcoordinate2 ycoordinate2

 

icon_comment

For using the editing functionality a valid edit layer with External-ID and at least one editing field, not NULL, with unique values has to be defined.

 

The following edit actions (editaction) are supported using following parameters (values mandatory):

- create: editlayerid, editkeyfield, editkeyvalue (value must not exist yet) and geometry (for point feature class: single coordinates x y e.g. 130223.1175059952 406423.082733813, for line and polygon feature class: multiple coordinates separated by ;, e.g. 130223.1175059952 406423.082733813;130144.76738609111 406399.82254196645;130160.68225419664 406448.7913669065;130276.98321342925 406394.9256594724)

- edit: editlayerid, editkeyfield, editkeyvalue (value has to exist) and (new) geometry (for point feature class: single coordinates x y e.g. 130223.1175059952 406423.082733813, for line and polygon feature class: multiple coordinates separated by ;, e.g. 130223.1175059952 406423.082733813;130144.76738609111 406399.82254196645;130160.68225419664 406448.7913669065;130276.98321342925 406394.9256594724)

- delete: editlayerid, editkeyfield and editkeyvalue (value has to exist)

 

The parameters editfields and editvalues may be used additionally to the edit actions create and edit. By adding these parameters more attributes can be created and edited. editfields comprises a list of editing fields, whereas editvalues includes the corresponding values (separated by ;).

For editing empty values, please use the value nullvallue or syndbvoid. Both values are case-insensitive.

 

Example calls:

 

- Create a feature with attributes:

http://<HOST>/<WebOffice-application>/synservice?project=WebOffice_Project&editlayerid=railroads&editaction=create&editkeyfield=Name&editkeyvalue=Southwest&editfields=Type;Tracks&editvalues=Passenger;2&geometry=1%201

If a field is passed in editfields which is also defined as editkeyfield the corresponding value will be ignored in editvalues.

 

- Change attributes with empty values:

http://<HOST>/<WebOffice-Applikation>/synservice?project=World&editaction=edit&editlayerid=edit_points_red&editkeyfield=ID&editkeyvalue=099&editfields=Name;Description&editvalues=1;syndbvoid

 

http://<HOST>/<WebOffice-Applikation>/synservice?project=World&editaction=edit&editlayerid=edit_points_red&editkeyfield=ID&editkeyvalue=099&editfields=Name;Description&editvalues=1;nullvallue

 

The parameter editreturnkey can also be used for the edit actions create and edit. This parameter specifies the field of the field assignment returned in the response, which was configured within the list of the object assignment layers (topological). It is also possible to define a list with several keys, where the values must be separated by semicolons ( ; ). This enables topological object assignment via the Service API (synservice).

 

Example call:

 

http://<HOST>/<WebOffice-Applikation>/synservice?project=World&editreturnkey=Punkt_Beschreibung&editlayerid=points&editaction=create&editkeyfield=Punkt_Name&editkeyvalue=TP01&editfields=Punkt_Beschreibung;Punkt_Notiz&editvalues=Testpunkt01;Hinweis

 

You can test your editing calls using the file preview.jsp. Call it with http://<WebOffice web application>/client_preview/preview.jsp

 

Sample request for an editing action (create a polygon feature) would be:

../synservice?project=PROJECT&editlayerid=EXTERNALID&editaction=create&geometry=129551.87819025521 406645.0614849188;129503.31554524362 406623.74129930394;129516.3445475638 406581.1009280743;129570.8294663573 406610.71229698375&editkeyfield=FIELDNAME&editkeyvalue=NEWID

 

Editing of published ArcGIS tables is also possible

 

icon_comment

Example calls:

 

- Adding data to a table:

https://<HOST>/<WebOffice-Applikation>/synservice?project=<WO_PROJECT>&edittableid=<EDIT_TABLE>&editaction=create&editfields=<FIELD>&editvalues=<VALUE>

 

- Editing a value in a table:

https://<HOST>/<WebOffice-Applikation>/synservice?project=<WO_PROJECT>&edittableid=<EDIT_TABLE>&editkeyfield=<KEYFIELD>&editaction=edit&editkeyvalue=<KEYVALUE>&editfields=<FIELD>&editvalues=<VALUE>

 

- Editing multiple values in a table:

https://<HOST>/<WebOffice-Applikation>/synservice?project=<WO_PROJECT>&edittableid=<EDIT_TABLE>&editkeyfield=<KEYFIELD>&editaction=edit&editkeyvalue=<KEYVALUE>&editfields=<FIELD_1>;<FIELD_2>&editvalues=<VALUE_1>;<VALUE_2>

 

- Deleting a record in a table:

https://<HOST>/<WebOffice-Applikation>/synservice?project=<WO_PROJECT>&edittableid=<EDIT_TABLE>&editkeyfield=<KEYFIELD>&editaction=delete&editkeyvalue=<KEYVALUE>