Create and updated multiple bookmarks
You can store and update multiple bookmarks and view
BEMS
response to identify
those bookmarks that failed to store or encountered conflicts and those bookmarks that
successfully stored and updated. When a record, for this example bookmark, is updated, the
request includes the bookmark id and timestamp that was changed. If the bookmark is a new
bookmark, the request includes a timestamp of 0 (zero). The following is an example of storing and updating multiple bookmarks.
POST jsonstore/bookmarks/createupdate Content-Type: application/json X-Good-GD-AuthToken: "<AuthToken>" X-Good-GEMS-Scope:USER X-Good-GEMS-RegistrationId: <RegistrationId> [ { "id": "204996f57b552ff58e43cebe03f6f58de", "payload": { "title": "example 1", "body": "http://example1.com" }, "lastModifiedTime": 1484251451970 }, { "id": "3fba55721a8ff31c367baac5df03cbc38", "payload": { "title": "Example 2", "body": "http://example2.com" }, "lastModifiedTime": 1484251451970 }, { "id": "39bc1dd4dd90aad1f4910d3682f349b07", "payload": { "title": "Example 3", "body": "http://example3.com" }, "lastModifiedTime": 0 }, { "id": "3fbe1884dd9099d1f4810d47f3c495c18", "payload": { "title": "Example 4", "body": "http://example4.com", "newfield": "testing" }, "lastModifiedTime": 0 } ]
BEMS
returns response codes indicating whether bookmarks are newly created and updated
successfully:[ { "id": "204996f57b552ff58e43cebe03f6f58de", "error": "ALREADY_EXISTS" }, { "id": "3fba55721a8ff31c367baac5df03cbc38", "error": "NOT_FOUND" }, { "id": "39bc1dd4dd90aad1f4910d3682f349b07", "lastModifiedTime": 1484673690049 }, { "id": "3fbe1884dd9099d1f4810d47f3c495c18", "lastModifiedTime": 1484673690049 } ]