Concepts :: Items and Resources are Different Things

Background

Talis Aspire provides a way for people to bookmark many “things” from many places and use these “things” on many different lists, and multiple times on any list. There are many-to-many relationships at all these points and we discuss these in more detail in this article.

Terminology

Relationships

The Talis Aspire V3 APIs provide a mechanism for identifying which resource is related to which item.

It is often useful to get both the item and resource in a single API call by using getItem and the include=resource parameter to get the resource details.

https://rl.talis.com/3/{shortCode}/items/{itemGuid}?include=resource

The resource details will be in the included section of the response and will be referenced using a type of resource and an id that is found in the key data.relationships.resource.data.id property.

{
    "data": {
        "type": "items",
        "id": "379acae3-a516-4997-bba3-f5e621cc08a7",
        "attributes": {
            "student_note": "",
            "library_note": ""
        },
        "relationships": {
            "tenant": {
                "data": {
                    "type": "tenants",
                    "id": "technicalone"
                }
            },
            "content": {
                "data": null
            },
            "importance": {
                "data": null
            },
            "resource": {
                "data": {
                    "type": "resources",
                    "id": "09FB55AE-4630-0FB2-5EBE-785B4FED0ED5"
                }
            }
        },
        "links": {
            "self": "https://rl.talis.com/3/technicalone/items/379acae3-a516-4997-bba3-f5e621cc08a7"
        },
        "meta": {
            "default_online_resource": {
                "isbns": [
                    "9781539370895"
                ],
                "type": "google_books"
            }
        }
    },
    "included": [
        {
            "type": "resources",
            "id": "09FB55AE-4630-0FB2-5EBE-785B4FED0ED5",
            "attributes": {
                "authors": [
                    {
                        "first_name": "Cs",
                        "surname": "Creations",
                        "type": "person"
                    }
                ],
                "editors": [],
                "isbn10s": [],
                "isbn13s": [
                    "9781539370895"
                ],
                "dates": [
                    "2016-10-06"
                ],
                "doi": null,
                "edition": null,
                "eissns": [],
                "issns": [],
                "issue": null,
                "lcn": null,
                "format": null,
                "online_resource": null,
                "page_start": null,
                "page_end": null,
                "places_of_publication": [],
                "publisher_names": [
                    "Createspace Independent Publishing Platform"
                ],
                "resource_type": "Book",
                "title": "Enigma Rotor-Key Machine Journal",
                "volume": null,
                "web_addresses": null
            },
            "meta": {
                "default_online_resource": {
                    "isbns": [
                        "9781539370895"
                    ],
                    "type": "google_books"
                }
            }
        }
    ]
}