My current implementation sends updates to connected clients when events occur on the server:
{
"data": {
"type": "organization",
"id": "500",
"attributes": {
"permissions": {
"change": true,
"view": true,
"add": true,
"delete": true
},
"created_at": "2015-09-25T19:59:40.422528Z",
"modified_at": "2015-09-25T19:59:49.607210Z",
"name": "11111",
"nickname": null,
"reference": "111001",
"notes": null
},
"relationships": {
"children": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/children",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/children"
},
"data": [],
"meta": {
"count": 0
}
},
"parent": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/parent",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/parent"
},
"data": null
},
"resellers": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/resellers",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/resellers"
},
"data": [],
"meta": {
"count": 0
}
},
"customers": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/customers",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/customers"
},
"data": [],
"meta": {
"count": 0
}
},
"departments": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/departments",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/departments"
},
"data": [],
"meta": {
"count": 0
}
},
"people": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/people",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/people"
},
"data": [
{
"type": "person",
"id": "1162"
},
{
"type": "person",
"id": "1019"
},
{
"type": "person",
"id": "1390"
},
{
"type": "person",
"id": "771"
},
{
"type": "person",
"id": "1548"
}
],
"meta": {
"count": 5
}
},
"administrators": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/administrators",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/administrators"
},
"data": [],
"meta": {
"count": 0
}
},
"email_domains": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/email_domains",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/emaildomains"
},
"data": [],
"meta": {
"count": 0
}
},
"phone_numbers": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/phone_numbers",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/phonenumbers"
},
"data": [],
"meta": {
"count": 0
}
},
"email_addresses": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/email_addresses",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/emailaddresses"
},
"data": [],
"meta": {
"count": 0
}
},
"urls": {
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/relationships/urls",
"related": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500/urls"
},
"data": [],
"meta": {
"count": 0
}
}
},
"links": {
"self": "http://api-dev.zerofail.com:8080/api/contacts/organizations/500"
}
},
"meta": {
"update_type": "UPDATE",
}
}
The reason why the object is not send with the creation is that it gives a notification instead of the actual data - This permits a validation of the required permissions on the server side when client GETs the object(s).