Create an Object Instance

With this method, you can create an object instance for the object type.

Request

URI: /ObjectType/v2/<FullyQualifiedObjectTypeIDWithUnderscores>

Operation Type: CRUD

HTTP Method: POST

Permissions: <cdinstance>.c

Request Headers

Header Required Values
Content-Type Yes The content type of the payload

Header example: Content-Type: application/json

Request Example

/ObjectType/v2/iotae_devtest1_aejob_automobilestes:Material

Payload

Format: JSON

{
	"ObjectID":"MAT-01",
	"Density":"{\"en\":\"200\",\"fr\":\"200\"}",
	"State":"Solid"
	
}

Response

Format: ATOM or JSON

Response Status and Error Codes

Code Description
201 Object instance created successfully

Response Payload Example

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://localhost:9080/customdata-services/ObjectType/v2/">
    <id>http://localhost:9080/customdata-services/ObjectType/v2/iotae_devtest1_aejob_automobilestes%3AMaterial('MAT-01')</id>
    <title type="text">iotae_devtest1_aejob_automobilestes:Material</title>
    <updated>2019-01-07T12:16:04.417+05:30</updated>
    <category term="com.sap.appiot.iotae_devtest1_aejob_automobilestes:Material" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"></category>
    <link href="iotae_devtest1_aejob_automobilestes%3AMaterial('MAT-01')" rel="edit" title="iotae_devtest1_aejob_automobilestes:Material"></link>
    <content type="application/xml">
        <m:properties>
            <d:ObjectID>MAT-01</d:ObjectID>
            <d:State>Solid</d:State>
            <d:Density>{"en":"200","fr":"200"}</d:Density>
        </m:properties>
    </content>
</entry>