Opens existing entity for editing

POST
api/databases/{dbid}/entities/{entity}/{id}/edit
This request is used to open the given entity for editing, i.e. you can make changes to the copy of the entity which is being edited and then you need to save these changes.
You will not be able to open the given entity for editing, if it is already being edited by the current or another user.

Request:

Argument Type Description
dbid GUID  The ID of the database
entity String  The name of the entity
id GUID  The ID 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/08a11e00-188f-45d0-b767-d8620bedbad2/edit
  2. Accept: text/json
  3. Accept-Encoding: deflate
  4. Host: localhost:6496
  5. Cookie: sid=41f1cc3d-2701-4185-8d3c-8dcd60be24dc
Response:
  1. Transfer-Encoding: chunked
  2. Content-Encoding:
  3. Cache-Control: no-store
  4. Content-Type: text/json; charset=utf-8
  5. Date: Wed, 26 Dec 2012 13:32:28 GMT
  6. ETag: "634921327487057176"
  7. Last-Modified: Wed, 26 Dec 2012 13:32:28 GMT
  8. Server: Microsoft-HTTPAPI/2.0
  9.  
  10. {
  11. "Id": "08a11e00-188f-45d0-b767-d8620bedbad2",
  12. "Url": "api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/08a11e00-188f-45d0-b767-d8620bedbad2/edit"
  13. }

Request:
  1. PUT api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/08a11e00-188f-45d0-b767-d8620bedbad2/edit
  2. Accept: text/json
  3. Accept-Encoding: deflate
  4. Content-Type: text/json
  5. Host: localhost:6496
  6. Cookie: sid=bc6ef8bc-1de7-49ec-a929-7644fcf51911
  7. Content-Length: 59
  8. Expect: 100-continue
  9.  
  10. {
  11. "Properties":
  12. {
  13. "Name": "Changed task name"
  14. }
  15. }
Response:
  1. Cache-Control: no-store
  2. Date: Mon, 24 Dec 2012 16:32:11 GMT
  3. ETag: "634919706670587030"
  4. Server: Microsoft-HTTPAPI/2.0

Request:
  1. POST api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/08a11e00-188f-45d0-b767-d8620bedbad2/edit/ScheduleItems
  2. Accept: text/json
  3. Accept-Encoding: deflate
  4. Host: localhost:6496
  5. Cookie: sid=41f1cc3d-2701-4185-8d3c-8dcd60be24dc
Response:
  1. Transfer-Encoding: chunked
  2. Content-Encoding:
  3. Cache-Control: no-store
  4. Content-Type: text/json; charset=utf-8
  5. Date: Wed, 26 Dec 2012 13:32:49 GMT
  6. ETag: "634921327692807749"
  7. Last-Modified: Wed, 26 Dec 2012 13:32:49 GMT
  8. Location: http://localhost:6496/api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/94d5484d-d5c4-452a-aacf-ec341cce4526/edit/ScheduleItems/9398ac22-9e78-44d3-891d-d82aa3c40929
  9. Server: Microsoft-HTTPAPI/2.0
  10.  
  11. {
  12. "Id": "9398ac22-9e78-44d3-891d-d82aa3c40929",
  13. "Url": "api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/94d5484d-d5c4-452a-aacf-ec341cce4526/edit/ScheduleItems/9398ac22-9e78-44d3-891d-d82aa3c40929"
  14. }

Request:
  1. PUT api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/08a11e00-188f-45d0-b767-d8620bedbad2/edit/ScheduleItems/9398ac22-9e78-44d3-891d-d82aa3c40929
  2. Accept: text/json
  3. Accept-Encoding: deflate
  4. Content-Type: text/json
  5. Host: localhost:6496
  6. Cookie: sid=41f1cc3d-2701-4185-8d3c-8dcd60be24dc
  7. Content-Length: 403
  8. Expect: 100-continue
  9.  
  10. {
  11. "Properties":
  12. {
  13. "users":
  14. {
  15. "Values": ["ae18dea5-4f60-4f70-ae31-d8052984e31e"]
  16. },
  17. "start": "2013.01.01T08:00:00+02:00",
  18. "finish": "2013.01.01T12:00:00+02:00",
  19. "allday": true,
  20. "ReminderForStart":
  21. {
  22. "Offset": "@D1d",
  23. "Users": ["ae18dea5-4f60-4f70-ae31-d8052984e31e"],
  24. "OffsetKind": "before",
  25. "description": "'reminder before start' set via API"
  26. }
  27. }
  28. }
Response:
  1. Cache-Control: no-store
  2. Date: Wed, 26 Dec 2012 13:33:01 GMT
  3. ETag: "634921327818940361"
  4. Server: Microsoft-HTTPAPI/2.0

Request:
  1. GET api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/08a11e00-188f-45d0-b767-d8620bedbad2/edit/ScheduleItems/9398ac22-9e78-44d3-891d-d82aa3c40929
  2. Accept: text/json
  3. Accept-Encoding: deflate
  4. Host: localhost:6496
  5. Cookie: sid=41f1cc3d-2701-4185-8d3c-8dcd60be24dc
Response:
  1. Transfer-Encoding: chunked
  2. Content-Encoding:
  3. Cache-Control: no-store
  4. Content-Type: text/json; charset=utf-8
  5. Date: Wed, 26 Dec 2012 13:33:07 GMT
  6. ETag: "634921327818940361"
  7. Last-Modified: Wed, 26 Dec 2012 13:33:01 GMT
  8. Server: Microsoft-HTTPAPI/2.0
  9.  
  10. {
  11. "Id": "9398ac22-9e78-44d3-891d-d82aa3c40929",
  12. "InfoName": "TaskScheduleItems",
  13. "ETag": "634921327818940361",
  14. "ModifiedStamp": "2012-12-26T15:33:01.8940361+02:00",
  15. "IsMarkedAsDeleted": false,
  16. "Properties": {
  17. "Id": "9398ac22-9e78-44d3-891d-d82aa3c40929",
  18. "Users": {
  19. "Values": [
  20. {
  21. "Id": "ae18dea5-4f60-4f70-ae31-d8052984e31e",
  22. "DisplayText": "admin"
  23. }
  24. ],
  25. "DisplayText": "admin"
  26. },
  27. "ReminderForStart": {
  28. "Offset": {
  29. "Value": 1.0,
  30. "Kind": 2,
  31. "PureWorkTime": 1.0,
  32. "Title": "1 Days"
  33. },
  34. "Users": [
  35. {
  36. "Id": "ae18dea5-4f60-4f70-ae31-d8052984e31e",
  37. "DisplayText": "admin"
  38. }
  39. ],
  40. "HideUsers": false,
  41. "OffsetKind": -1,
  42. "Description": "'reminder before start' set via API"
  43. },
  44. "ReminderForFinish": null,
  45. "Start": "2013-01-01T08:00:00+02:00",
  46. "Finish": "2013-01-01T12:00:00+02:00",
  47. "AllDay": true,
  48. "RecurrenceInfo": null,
  49. "RecurrencePatternId": null,
  50. "DeletedRecurrences": null,
  51. "RecurrenceExceptions": null
  52. }
  53. }

Request:
POST api/databases/ec5a34c2-7062-4be7-ade9-c15acefcdbb8/entities/Task/08a11e00-188f-45d0-b767-d8620bedbad2/edit/save
Accept: text/json
Accept-Encoding: deflate
Host: localhost:6496
Cookie: sid=41f1cc3d-2701-4185-8d3c-8dcd60be24dc
Response:
Cache-Control: no-store
Date: Wed, 26 Dec 2012 13:33:15 GMT
Server: Microsoft-HTTPAPI/2.0