Create a New Object
This function creates a single new object of the given type.
/api/v4/
backend-deployment-id
/objects/
model
.json
POST
Parameters
A hash needs to be supplied containing the following:
Fields
: Fields as defined in your app's Data Model.Relationships
: IDs of related objects that the object belongs-to specified by using the relationship name and appending it with_id
.
For the format of all the different field types, see the Field Representation section.
The key of this hash has to be the name of the object type (see example below). In the following example of parameters in JSON format, the object type name is car and it has three fields: make, model and license_plate and one relationship: it belongs to a warehouse.
Response
The response includes the single newly created object. The format of the object is the same as for Retrieving all Objects.
Example
Parameters as URL-encoded key-value pairs: (refer to Request Parameter Formats)
Response:
Sending parameters as JSON:
Last updated