3.1.4.2.1 Sending an InsertEntity Request

The InsertEntity Request (section 2.2.7.1.1) MUST adhere to the syntax specified in InsertEntity Request (section 2.2.7.1.1).

The client SHOULD specify the Content-Type (section 2.2.5.2) header in the request, and the media type specified in the header value MUST be application/atom+xml (section 2.2.5.1.1), application/json (section 2.2.5.1.2), or application/json;odata=verbose (section 2.2.5.1.3).

If the higher layer requests to bind the new entity specified in the request body to one or more existing entities, the client MUST indicate this by specifying values for the NavigationProperties, which represent the association between the new and existing entity, as specified in InsertEntity Request (section 2.2.7.1.1).

If the higher layer requests to insert the entity specified in the request body as well as additional related entities, the client MUST indicate this by also specifying the related entities in the request payload, as specified in InsertEntity Request (section 2.2.7.1.1).

If the new entity is to be inserted in an EntitySet whose base EntityType does not define any subtypes, the representation of the new entity MAY specify its EntityType in the request payload. However, if the new entity is to be inserted in an EntitySet with a base EntityType that does have subtypes, the representation of the new entity (in the request) MUST specify its EntityType if it is not the base EntityType. InsertEntity Request (section 2.2.7.1.1) describes the syntax rules for specifying an entity's type information in a request.

Rules for processing the response to an InsertEntity are specified in Responses from Insert Requests (section 3.1.5.2).