Skip to content

Instantly share code, notes, and snippets.

@ckung
Last active June 22, 2018 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckung/3d565fb748f0f71d0e72fb009d79024a to your computer and use it in GitHub Desktop.
Save ckung/3d565fb748f0f71d0e72fb009d79024a to your computer and use it in GitHub Desktop.
Update rels example
//PUT an array to completely overwrite the existing relationship
//You only need two things in the payload: id and meta of the related entity
curl -XPUT -H "Content-type: application/json" -d '[{ "id": "587fab8a89a4d1ba2d56ae62", "meta": { "collectionName": "brands", "modelName": "brand" } }]' 'https://vogue-api.aws.conde.io/fashionshows/5b20f22930f94b78490ae9e3/rels/brand'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment