api/db/<dbname>/classes/<struct_no>/byindex/<index_no>/eq/<key>/field/<field_no>/at/<elem_index> ResourceThe
api/db/<dbname>/classes/<struct_no>/byindex/<index_no>/eq/<key>/field/<field_no>/at/<elem_index>resource allows element access forarrays,vectors,sequences, andstructures. The field is identified by its number,field_no, which can be retrieved from the class schema. The index referred to byindex_nois required to be unique. Forstructures,elem_indexspecifies thefield_noof the field to access.It executes the following operations for HTTP
GET,DELETEandPATCH:
GET: Returns the value of the element or structure field.DELETE: Deletes an individual element iffield_norefers to a sequence. Iffield_norefers to a structure, writes null into the field if it is nullable, or erases the field if it is an optional structurePATCH: Overwrites thevalueof the element.For an overview see page eXtremeDB Web Service Resources
For classes with an
autoidThe
/api/db/<dbname>/classes/<struct_no>/byautoid/eq/<key>/field/<field_no>/at/<elem_index>is provided for classes with anautoiddefined.GET
The
GETrequest returns thevalueof the element or structure field. The returned JSON object contains a single key:value.For example:GET http://localhost:8083/api/db/xsqldb/classes/2/byindex/1/eq/1/field/1/at/0The
valueis formatted according to the rules defined for theendpoint and supports the same query arguments./api/db/<dbname>/classes/<struct_no>/byindex/<index_no>/listDELETE
The
DELETErequest writesnullinto nullable fields iffield_norefers to a structure, or erases the field if it is an optional structure. It deletes an individual element iffield_norefers to a sequence. Note that this method is not supported forarraysandvectors.PATCH
The
PATCHrequest overwrites the value of the element. It accepts a JSON object containing a single key,value:For example:
PATCH http://localhost:8083/api/db/xsqldb/classes/2/byindex/1/eq/1/field/1/at/0 { "value": 100 }The format of the
valueis the same as for the POST method of the/api/db/<dbname>/classes/<struct_no>endpoint and the same restrictions apply.