Navigation:  WebOffice APIs > Service API >

Editing in Service API

Previous pageReturn to chapter overviewNext page

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

 

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

 

Note: 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 seperated by ';', e.g. '130223.1175059952 406423.082733813;130144.76738609111 406399.82254196645;130160.68225419664 406448.7913669065;130276.98321342925 406394.9256594724')

- edit: editlayerid, editkeyfield, editkeykeyvalue (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 seperated by ';', e.g. '130223.1175059952 406423.082733813;130144.76738609111 406399.82254196645;130160.68225419664 406448.7913669065;130276.98321342925 406394.9256594724')

- delete: editlayerid, editkeyfield and editkeykeyvalue (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

 

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