Create a New Object
This function creates a single new object of the given type.
Relative URL | HTTP Request Method |
---|---|
| POST |
Replace model
with the type of object that you wish to create (as defined in your app's Data Model), for example person
, job
or asset
.
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.
For creating more than one object in a request, see Batch Operations.
Response
The response includes the single newly created object. The format of the object is the same as for Retrieving all Objects.
Example
BASE-URL
The below examples contain a BASE-URL
placeholder. Please refer to the HTTP Endpoints section to get the base URL relevant to your deployment.
Parameters as URL-encoded key-value pairs: (refer to Request Parameter Formats)
Response:
Sending parameters as JSON:
Last updated