A JSON create response body occurs in response to a POST operation for create that results in a 201 Created HTTP return code. This response body contains the id attribute for the new resource.
The following examples illustrate the components of a minimal instance resource. It shows a minimal instance resource returned in response to a successful POST request for creating a new local_user resource. The request body contains the arguments used to populate the new resource.
Request and response | Request and response example |
---|---|
Request |
POST https://1.2.3.4/api/rest/local_user |
Request body |
{ "name": "User1", "password": "myPassword", "role_id": "1" } |
Response |
{ "id": "4" } |