Skip to content

Instantly share code, notes, and snippets.

@jpotts
Last active March 2, 2018 20:53
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 jpotts/ecf8fcc66e0978c633015ad8fe996f07 to your computer and use it in GitHub Desktop.
Save jpotts/ecf8fcc66e0978c633015ad8fe996f07 to your computer and use it in GitHub Desktop.
Example Team Member and Headshot JSON
{
"data": {
"type": "file--file",
"id": "311f36ae-b233-4db9-84ba-803525307e42",
"attributes": {
"fid": 2,
"uuid": "311f36ae-b233-4db9-84ba-803525307e42",
"langcode": "en",
"filename": "gravatar.png",
"uri": "public://2018-03/gravatar.png",
"filemime": "image/png",
"filesize": 83947,
"status": true,
"created": 1520006861,
"changed": 1520006895,
"url": "/sites/default/files/2018-03/gravatar.png"
},
"relationships": {
"uid": {
"data": {
"type": "user--user",
"id": "56e75b23-89c2-42a2-8c20-30c23e44eda8"
},
"links": {
"self": "http://localhost:8888/jsonapi/file/file/311f36ae-b233-4db9-84ba-803525307e42/relationships/uid",
"related": "http://localhost:8888/jsonapi/file/file/311f36ae-b233-4db9-84ba-803525307e42/uid"
}
}
},
"links": {
"self": "http://localhost:8888/jsonapi/file/file/311f36ae-b233-4db9-84ba-803525307e42"
}
},
"links": {
"self": "http://localhost:8888/jsonapi/node/team_member/d56fd5ed-65f8-4f31-b4c0-29f33ea67bfb/field_headshot"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment