Last active
April 2, 2017 17:51
-
-
Save mlinderman/01872b3609dde78ba975feecf7fe529d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POSTed bookmark: | |
{ | |
"type":"bookmarks", | |
"id":"261", | |
"links":{ | |
"self":"https://ci-user-platform.conde.io/bookmarks/261" | |
}, | |
"attributes":{ | |
"amgUUID":"b62c708c-6572-4f5d-8587-06ac11549829", | |
"siteCode":"EPI", | |
"documentUrl":"http://ci.epicurious.com/recipes/food/views/test-bookmark-recipe-1491150888735", | |
"bookmarkName":"This is a test bookmarkName for a test content item", | |
"bookmarkTitle":"this is a test bookmark", | |
"bookmarkMeta":{ | |
"key":"value", | |
"key2":"value2" | |
}, | |
"createdTimestamp":"2017-04-02T16:34:32.000Z", | |
"modifiedTimestamp":"2017-04-02T16:34:32.000Z" | |
}, | |
"relationships":{ | |
"bookmark-categories":{ | |
"data":[ | |
null, | |
null | |
], | |
"links":{ | |
"self":"https://ci-user-platform.conde.io/bookmarks/261/bookmark-categories" | |
} | |
} | |
} | |
} | |
GET for the same produces this (truncated bookmarkName and different relationships object) | |
{ | |
"type":"bookmarks", | |
"id":"261", | |
"links":{ | |
"self":"https://ci-user-platform.conde.io/bookmarks/261" | |
}, | |
"attributes":{ | |
"amgUUID":"b62c708c-6572-4f5d-8587-06ac11549829", | |
"siteCode":"EPI", | |
"documentUrl":"http://ci.epicurious.com/recipes/food/views/test-bookmark-recipe-1491150888735", | |
"bookmarkName":"This is a test bookmarkName for a test content ite", | |
"bookmarkTitle":"this is a test bookmark", | |
"bookmarkMeta":"{\"key\": \"value\", \"key2\": \"value2\"}", | |
"createdTimestamp":"2017-04-02T16:34:32.000Z", | |
"modifiedTimestamp":"2017-04-02T16:34:32.000Z" | |
}, | |
"relationships":{ | |
"bookmark-categories":{ | |
"data":[ | |
], | |
"links":{ | |
"self":"https://ci-user-platform.conde.io/bookmarks/261/bookmark-categories" | |
} | |
} | |
} | |
} | |
PUT /bookmarks with this payload: | |
{ | |
"data":{ | |
"type":"bookmarks", | |
"id":"297", | |
"links":{ | |
"self":"https://ci-user-platform.conde.io/bookmarks/297" | |
}, | |
"attributes":{ | |
"amgUUID":"b62c708c-6572-4f5d-8587-06ac11549829", | |
"siteCode":"EPI", | |
"documentUrl":"http://ci.epicurious.com/recipes/food/views/test-bookmark-recipe-1491154824369", | |
"bookmarkName":"This is a test bookmarkName for a test content item", | |
"bookmarkTitle":"this is a test bookmark UPDATED", | |
"bookmarkMeta":{ | |
"key":"value", | |
"key2":"value2" | |
}, | |
"createdTimestamp":"2017-04-02T17:40:06.000Z", | |
"modifiedTimestamp":"2017-04-02T17:40:06.000Z" | |
}, | |
"relationships":{ | |
"bookmark-categories":{ | |
"data":[ | |
null, | |
null | |
], | |
"links":{ | |
"self":"https://ci-user-platform.conde.io/bookmarks/297/bookmark-categories" | |
} | |
} | |
} | |
} | |
} | |
Yields this error: | |
{"data":{"errors":[{"title":"Bad Request","status":400,"detail":"\"value\" must be an object"}],"meta":null}} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment