Creates and saves new entity

POST
api/databases/{dbid}/entities/{entity}
This request is used when only one entity should be created. It opens the entity for editing, sets its properties and saves the entity.
For example, you need to create a new task and specify its 'Name' and 'DueDate', while there is no need to change such properties as Assignments, Scheduler Items, etc.

Request:

Argument Type Description
dbid GUID  The ID of the database
entity String  The name of the entity

Content

Name Type Options Description
Properties Array of name: value  List of properties of an object

Response:

Content

Name Type Options Description
Id GUID  ID of object
Url String  Url of object

Request:
  1. POST api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task
  2. Accept: text/json
  3. Accept-Encoding: deflate
  4. Content-Type: text/json
  5. Host: localhost:6496
  6. Cookie: sid=d8ee1782-edf8-4ca0-88df-514db7d23043
  7. Content-Length: 236
  8. Expect: 100-continue
  9.  
  10. {
  11. "Properties":
  12. {
  13. "Name": "Celebrate the end of the world",
  14. "DueDate": "2012.12.21T08:00:00+02:00",
  15. "IsHaveDueDate": true,
  16. "Estimate": "@d16h",
  17. "Remain": "@d16h",
  18. "Note": "Comments to the end of the world"
  19. }
  20. }
Response:
  1. Transfer-Encoding: chunked
  2. Content-Encoding:
  3. Cache-Control: no-store
  4. Content-Type: text/json; charset=utf-8
  5. Date: Fri, 21 Dec 2012 14:53:24 GMT
  6. ETag: "1"
  7. Last-Modified: Fri, 21 Dec 2012 14:53:24 GMT
  8. Location: http://localhost:6496/api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/bd4bec9c-84bf-4647-80d0-775150a0c881
  9. Server: Microsoft-HTTPAPI/2.0
  10.  
  11. {
  12. "Id": "bd4bec9c-84bf-4647-80d0-775150a0c881",
  13. "Url": "api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/bd4bec9c-84bf-4647-80d0-775150a0c881"
  14. }