Dartmouth API Developer Portal

1.10.6. Assets

Returns asset metadata and binary assets (e.g. images/photos)

1.10.6.1. Assets API

Returns metadata about digital assets as well as the binary assets. Currently, the only type of asset available is identification photo images of people.

1.10.6.1.1. Required Scopes
Scope Description
"urn:dartmouth:assets:people_photo:read" This scope is required in order to view photo images and photo metadata for people. Granting of this scope is via the ???
1.10.6.1.2. Requests
GET /api/assets/{id}        (asset metadata)
GET /api/assets/{id}/asset  (binary asset)
1.10.6.1.3. Required Headers
Authorization: Bearer {jwt}
1.10.6.1.4. Parameters
Parameter Name Type Description Valid values Required

(none)

1.10.6.1.5. Notes on usage

The scope associated with this resource allows the calling individual/application access assets assoicated with "confidential" people when requested. The calling individual/application must adhere to Dartmouth's policies on data privacy when using this data. Also, applications that display photos of "confidential" students must: * label the photo with a standard icon and HTML markup provided by the aggreements API * require that application users view and acknowledge policies and guidelines for "confidential" students; the policy text and acknowledgement status are available via the agreements API

1.10.6.1.6. Returns
Status Code Description
200 The URI parameter {id} passed in is a valid asset
404 The URI parameter {id} passed in is NOT a valid asset
1.10.6.1.7. Sample Requests
GET https://api.dartmouth.edu/api/assets/d40395t        (asset metadata)
GET https://api.dartmouth.edu/api/assets/d40395t/asset  (binary asset)
1.10.6.1.8. Sample Return
Asset Metadata:
{
    "id": "d40395t",
    "content_type": "image/jpeg",
    "size": null,
    "timestamp": null,
    "creator": "<photos svc acct>",
    "type": "people_photo",
    "metadata": {
        "type": "identification",
        "netid": "d40395t"
    },
    "link": "https://api.dartmouth.edu/api/assets/d40395t/asset",
    "is_public": false
}

Binary Asset:
    <image/jpeg>