| Method | POST | ||
| Path | /res/{resName} | ||
| Query Params | None | ||
| Request body | Attribute values for row to insert. See Null/Not Null Operators for more info on null values. | Content-Type: application/x-www-form-urlencoded | |
| Response body | Number of rows inserted and their values. Includes any auto-generated numeric ids from columns with auto-increment/sequence defined as default value. | Response.xsd | Content-Type: application/xml or application/json |
POST /restsql/res/Actor HTTP/1.1 Content-Type: application/x-www-form-urlencoded Accept: application/xml actor_id=201&first_name=JULIANNE&last_name=DENCH
HTTP/1.1 200 OK Content-Type: application/xml <writeResponse rowsAffected="1" /> <actor id="201" first_name="JULIANNE" last_name="DENCH" /> </writeResponse>
Following is the same request minus the pk value. The autogenerated value is returned in the response.
POST /restsql/res/Actor HTTP/1.1 Content-Type: application/x-www-form-urlencoded Accept: application/xml first_name=JULIANNE&last_name=DENCH
HTTP/1.1 200 OK Content-Type: application/xml <writeResponse rowsAffected="1" /> <actor id="202" first_name="JULIANNE" last_name="DENCH" /> </writeResponse>
POST /restsql/res/Actor HTTP/1.1 Content-Type: application/x-www-form-urlencoded Accept: application/json actor_id=201&first_name=JULIANNE&last_name=DENCH
HTTP/1.1 200 OK
Content-Type: application/json
{ "rowsAffected": 1,
"actors": [
{ "actor_id": 201, "first_name": "JULIANNE", "last_name": "DENCH" }
]
}
Following is the same request minus the pk value. The autogenerated value is returned in the response.
POST /restsql/res/Actor HTTP/1.1 Content-Type: application/x-www-form-urlencoded Accept: application/json first_name=JULIANNE&last_name=DENCH
HTTP/1.1 200 OK
Content-Type: application/json
{ "rowsAffected": 1,
"actors": [
{ "actor_id": 202, "first_name": "JULIANNE", "last_name": "DENCH" }
]
}