-
Notifications
You must be signed in to change notification settings - Fork 93
rest layer data
URL template: /{collectionName}
Method: GET Headers
Accept: application-json
Query String Parameters
-
$expand
(optional): optionally, the response payload will include also this entity's associations (if any). use comma as delimiter to specify more than one association to expand or do not supply value to include them all. -
$select
(optional): optionally list only the specified entity properties. Accepts multiple values delimited with comma (,). Invalid property names will yield error. Consult with the DAO ORM definition for the valid property names. -
$limit
(optional): optionally limits the returned list to the number of entities specified by this parameter. -
$offset
(optional): optionally offsets the returned list with the number of entities specified by this parameter (strips the first $offset number of items in the list). Default is 0 (no offset). -
$sort
(optional): optionally sorts (server-side) the returned entities list using the property names provided with this parameter. Use comma for delimiter if more than one. Invalid property names will yield error. Consult with the DAO ORM definition for the valid property names. -
$order
(optional): specifies the sort order. Note that this setting is valid only with$sort
supplied as query string parameter too! Valid values areasc
(for ascending sort order) ordesc
(for descending sort order). Defaults toasc
. -
$filter
(optional): specifies properties that will be used in simple string-based filter expressions. Multiple properties can be used delimited with comma. Those that are of type string will be evaluated withLIKE propertyValue%
.
Note that other means of filtering are achieved by using the query string parameters directly. To filter a numeric type of property supply its name as a query string parameter and the numeric filter expression as value. For example, to filter numeric properties of property
sampleNumber
larger than 1 supplysampleNumber=>1
. For those that are less than 1 usesampleNumber=<1
. For same as, usesampleNumber=1
. For NULL comparison use only the property name...&sampleNumber&..
, which will roughly translate tosampleNumber IS NULL
(or similiar depending on database dialect and enbtity's ORM mapping)
Body: DAO ORM specification (json formatted)
Response codes
200 OK
Headers
-
X-dservice-list-count
: supplies the number of entities returned by this query. This convenience value can be used get the entities payload and total count in a single call. Note that this is the total count of entities without any filters applied.
Response Body A JSON encoded array of entities.
Method: POST Headers
Content-type: application-json
Accept: application-json
Query String Parameters
- $cascaded (optional): if associated objects are provided inline as part of the request payload, they will be created too.
Body: DAO ORM specification (json formatted)
Response codes
-
204 No Content
(if a single resource creation has been requested)
Headers
-
Location
: (optional) absolute URL of the created resource in this collection IF the create request was for a SINGLE resource. The header is not set otherwise and instead the ids of the created resource are returned as array in the response body.
Response Body If a single resource creation was request the response has no body (and HTTP code is 204 NO CONTENT). If multiple resource creation has been requested, the response body is JSON encoded Array of the created resources identifiers.
Method: GET Headers
Accept: application-json
Response codes
200 OK
Response Body: JSON object with a single property count
and an integer value for the total number of entities in this collection
/{collectionName}/{resourceId}
Method: PUT Headers
Accept: application-json
Query String Parameters
- $cascaded (optional): if associated objects are provided inline as part of the request payload, they will be created too.
Body: DAO ORM specification (json formatted) with ID of updated resource included (must match the resourceId) in the URL path
Response codes
204 No Content
Method: DELETE
Response codes
-
204 No Content
(if a single resource creation has been requested)
Method: GET Headers
Accept: application-json
Query String Parameters
- $expand (optional): if provided, the response payload will include also this entity's associations if any.
- $select (optional): if provided, will list only the specified entity properties. Accepts multiple values delimited with comma (,)
Body: DAO ORM specification (json formatted)
Response codes
-
204 No Content
(if a single resource creation has been requested)
Headers
-
Location
: (optional) absolute URL of the created resource in this collection IF the create request was for a SINGLE resource. The header is not set otherwise and instead the ids of the created resource are returned as array in the response body.
Response Body If a single resource creation was request the response has no body (and HTTP code is 204 NO CONTENT). If multiple resource creation has been requested, the response body is JSON encoded Array of the created resources identifiers.
URL template: /{collectionName}/{resourceId}/{associationName}
Method: GET Headers
Accept: application-json
Response codes
200 OK
Response Body JSON formatted array of associated entities or an object depending on the association multiplicity definition
TODO
URL template: /{collectionName}/metadata
Method: GET Headers
Accept: application-json
Response codes
200 OK
Response Body DAO ROM definition for the entities of this collection type