Method DELETE
Path /res/{resName}?{name}={value}
Query Params Zero or more name-value pairs. Use column labels, not names, as defined in the SQL Resource query.

Value encoding:
  • Use equals or not equals value. See Equals/Not Equals Operators for more detail.
  • Include '%' anywhere in the value for the wildcard, which is URL encoded as %25. This will use the a SQL LIKE instead of equals operator. See Like Operator for more detail.
  • Use null or not null. See Null/Not Null Operators for more detail.
  • Surround a commad-separated list in parenthesis. See In Operator for more detail.
  • Prefix one of four url encoded comparison operators at the beginning of the value. See Comparison Operators for more detail.
Request body None
Response body Number of rows deleted Response.xsd Content-Type: application/xml or application/json

Description

Deletes one of the following, matching the query parameters:

XML Examples

A flat SQL Resource:
DELETE /restsql/res/Film?title=DARK%25&rating=R HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml

<writeResponse rowsAffected="3" />
A delete to parents of a one-to-many hierarchical SQL Resource (child rows are also deleted):
DELETE /restsql/res/LanguageFilm/3 HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml

<writeResponse rowsAffected="18" />
A delete to parents of a many-to-many hierarchical SQL Resource (parent rows are deleted, and child rows are disassociated):
DELETE /restsql/res/ActorFilm?last_name=DENCH HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml

<writeResponse rowsAffected="9" />

JSON Examples

A flat SQL Resource:
DELETE /restsql/res/Film?title=DARK%25&rating=R HTTP/1.1
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json

{ "rowsAffected": 3 }
A delete to parents of a one-to-many hierarchical SQL Resource (child rows are also deleted):
DELETE /restsql/res/LanguageFilm/3 HTTP/1.1
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json

{ "rowsAffected": 18 }
A delete to parents of a many-to-many hierarchical SQL Resource (parent rows are deleted, and child rows are disassociated):
DELETE /restsql/res/ActorFilm?last_name=DENCH HTTP/1.1
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json

{ "rowsAffected": 9 }