POST api/entityinstances

Adds a new EntityInstance.



Request Information

URI Parameters

None.



Body Parameters

A model representing the EntityInstance to add.

CreateEntityInstanceViewModel
NameDescriptionTypeAdditional information
NewEntityAttributeValues

Collection of NewEntityAttributeValue

None.

EntityDefinitionID

integer

None.

IsLateAddition

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "NewEntityAttributeValues": [
    {
      "AttributeID": 1,
      "AttributeValue": "sample string 2",
      "RecurringDateSpecification": {
        "DayOfRecurrance_Id": 1,
        "NthDayOfRecurrance_Id": 1,
        "RecurringUnit_Id": 1,
        "UnitInterval": 2
      }
    },
    {
      "AttributeID": 1,
      "AttributeValue": "sample string 2",
      "RecurringDateSpecification": {
        "DayOfRecurrance_Id": 1,
        "NthDayOfRecurrance_Id": 1,
        "RecurringUnit_Id": 1,
        "UnitInterval": 2
      }
    }
  ],
  "EntityDefinitionID": 1,
  "IsLateAddition": true
}

application/xml, text/xml

Sample:
<CreateEntityInstanceViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VobeSoft.Models.ViewModels">
  <EntityDefinitionID>1</EntityDefinitionID>
  <IsLateAddition>true</IsLateAddition>
  <NewEntityAttributeValues>
    <CreateEntityInstanceViewModel.NewEntityAttributeValue>
      <AttributeID>1</AttributeID>
      <AttributeValue>sample string 2</AttributeValue>
      <RecurringDateSpecification>
        <DayOfRecurrance_Id>1</DayOfRecurrance_Id>
        <NthDayOfRecurrance_Id>1</NthDayOfRecurrance_Id>
        <RecurringUnit_Id>1</RecurringUnit_Id>
        <UnitInterval>2</UnitInterval>
      </RecurringDateSpecification>
    </CreateEntityInstanceViewModel.NewEntityAttributeValue>
    <CreateEntityInstanceViewModel.NewEntityAttributeValue>
      <AttributeID>1</AttributeID>
      <AttributeValue>sample string 2</AttributeValue>
      <RecurringDateSpecification>
        <DayOfRecurrance_Id>1</DayOfRecurrance_Id>
        <NthDayOfRecurrance_Id>1</NthDayOfRecurrance_Id>
        <RecurringUnit_Id>1</RecurringUnit_Id>
        <UnitInterval>2</UnitInterval>
      </RecurringDateSpecification>
    </CreateEntityInstanceViewModel.NewEntityAttributeValue>
  </NewEntityAttributeValues>
</CreateEntityInstanceViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.



Response Information

Resource Description

The id of the EntityInstance.

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<long xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</long>