Skip to content

Instantly share code, notes, and snippets.

@joshco
Created July 13, 2017 15:40
Show Gist options
  • Save joshco/19c653c36eab5385bde268b5fce34a8b to your computer and use it in GitHub Desktop.
Save joshco/19c653c36eab5385bde268b5fce34a8b to your computer and use it in GitHub Desktop.
Optimized List Item Retrieval
// GET .../lists/1/items.json
{
"_embedded": {
"osdi:items": [
{
"_embedded": {
"osdi:person": {
"_links": {
"self": {
"href": "/people/64978",
"title": "Dalton Jones"
}
},
"created_date": "2017-06-28 21:17:27",
"family_name": "Jones",
"given_name": "Dalton",
"identifiers": [
"tdb:64978"
],
"modified_date": "2017-06-28 21:17:27",
"origin_system": "thedatabank",
"phone_numbers": [
{
"number": "6125556477",
"number_type": "Mobile"
}
],
"postal_addresses": [
{
"address_lines": [
"Boundary Rd"
],
"locality": "Mahtowa",
"postal_code": "55077",
"primary": true,
"region": "MN"
}
]
}
},
"_links": {
"osdi:person": {
"href": "/people/64978",
"title": "Dalton Jones"
},
"self": {
"href": "/v1/items/64978"
}
},
"identifiers": [
"tdb:64978"
],
"item_type": "osdi:person",
"origin_system": "thedatabank"
},
{
"_embedded": {
"osdi:person": {
"_links": {
"self": {
"href": "/people/64972",
"title": "Stella Warren"
}
},
"created_date": "2017-05-20 16:04:13",
"email_addresses": [
{
"address": "[email protected]",
"primary": true,
"status": "subscribed"
}
],
"family_name": "Warren",
"given_name": "Stella",
"identifiers": [
"tdb:64972"
],
"modified_date": "2017-06-28 21:17:27",
"origin_system": "thedatabank",
"phone_numbers": [
{
"number": "5555554297",
"number_type": "Mobile"
}
],
"postal_addresses": [
{
"address_lines": [
"BIRCHWOOD RD"
],
"postal_code": "",
"primary": true
}
]
}
},
"_links": {
"osdi:person": {
"href": "/people/64972",
"title": "Stella Warren"
},
"self": {
"href": "/v1/items/64972"
}
},
"identifiers": [
"tdb:64972"
],
"item_type": "osdi:person",
"origin_system": "thedatabank"
},
{
"_embedded": {
"osdi:person": {
"_links": {
"self": {
"href": "/people/64987",
"title": "Ella Goldbloom"
}
},
"created_date": "2017-06-28 21:17:28",
"family_name": "Goldbloom",
"given_name": "Ella",
"identifiers": [
"tdb:64987"
],
"modified_date": "2017-06-28 21:17:28",
"origin_system": "thedatabank",
"phone_numbers": [
{
"number": "5555554039",
"number_type": "Mobile"
}
],
"postal_addresses": [
{
"address_lines": [
"W Winona"
],
"locality": "Duluth",
"postal_code": "55803",
"primary": true,
"region": "MN"
}
]
}
},
"_links": {
"osdi:person": {
"href": "/people/64987",
"title": "Ella Goldbloom"
},
"self": {
"href": "/v1/items/64987"
}
},
"identifiers": [
"tdb:64987"
],
"item_type": "osdi:person",
"origin_system": "thedatabank"
},
{
"_embedded": {
"osdi:person": {
"_links": {
"self": {
"href": "/people/64973",
"title": "Caitlin Hawley"
}
},
"created_date": "2017-05-20 16:04:13",
"family_name": "Hawley",
"given_name": "Caitlin",
"identifiers": [
"tdb:64973"
],
"modified_date": "2017-06-28 21:17:27",
"origin_system": "thedatabank",
"postal_addresses": [
{
"address_lines": [
"691 N 21st Ave W"
],
"locality": "Duluth",
"postal_code": "55806",
"primary": true,
"region": "MN"
}
]
}
},
"_links": {
"osdi:person": {
"href": "/people/64973",
"title": "Caitlin Hawley"
},
"self": {
"href": "/v1/items/64973"
}
},
"identifiers": [
"tdb:64973"
],
"item_type": "osdi:person",
"origin_system": "thedatabank"
},
{
"_embedded": {
"osdi:person": {
"_links": {
"self": {
"href": "/people/64985",
"title": "Anonymous_441dde6b Student"
}
},
"created_date": "2017-06-28 21:17:28",
"family_name": "Student",
"given_name": "Anonymous_441dde6b",
"identifiers": [
"tdb:64985"
],
"modified_date": "2017-06-28 21:17:28",
"origin_system": "thedatabank"
}
},
"_links": {
"osdi:person": {
"href": "/people/64985",
"title": "Anonymous_441dde6b Student"
},
"self": {
"href": "/v1/items/64985"
}
},
"identifiers": [
"tdb:64985"
],
"item_type": "osdi:person",
"origin_system": "thedatabank"
}
]
},
"_links": {
"osdi:items": [
{
"href": "/items/64978"
},
{
"href": "/items/64972"
},
{
"href": "/items/64987"
},
{
"href": "/items/64973"
},
{
"href": "/items/64985"
}
],
"self": {
"href": "/v1/lists/4_Bricklayer+Careers/subscribers",
"title": "Subscriber list: Bricklayer Careers"
}
},
"origin_system": "thedatabank",
"page": 1,
"per_page": 10,
"total_pages": 1,
"total_records": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment