createAndRetrieve
Url
/V2.0/services/data/createAndRetrieve
HTTP Method
POST
Description
Creates and immediatly retrieves an entity 
Parameters
Name Type Description
fields string[] list of fields to retrieve
entity entity
Result
Name Type Description
entity entity
In case of failure an error object will be returned
* indicates required fields
Samples
The following example creates a task by giving it a start date and duration and retrieving back the calculated due date of the task.

POST /V2.0/services/data/createAndRetrieve

{
    "entity": {
        "Id": "/Task",
        "Name": "New Task",
        "StartDate": "2014-11-01",
        "Duration": {
            "Unit": "Weeks",
            "Value": 3
        }
    },
    "fields": [
        "DueDate"
    ]
}            
Response:
 {
  "entity": {
    "id": "/Task/e22ca960-73bb-4cf6-b6e8-b638ed0ab1fd",
    "DueDate": "2014-11-21T16:00:00.0000000Z"
  }
}