Closed jamieu closed 8 months ago
API response for (A photographic print of Industry, Metal)
{
"totalItems": 1,
"items": [
{
"kind": "item",
"id": 555502,
"title": "A photographic print of Industry, Metal",
"reference": "555502",
"type":
{
"kind": "itemType",
"id": 1,
"name": "Digital Item"
},
"state":
{
"kind": "itemState",
"id": 2,
"state": "active",
"name": "Active",
"desc": "This item is active and ready to use"
},
"previousState":
{
"kind": "itemState",
"id": 1,
"state": "importing",
"name": "Importing",
"desc": "This item is being imported"
},
"priority": 0.5,
"changeFreq": "Monthly",
"owner": null,
"createUser": null,
"createDate": "2022-09-29 21:31:18",
"modifiedUser": null,
"modifiedDate": "2023-10-16 10:40:00",
"thumbnail":
{
"kind": "asset",
"assetType": "thumbnail",
"mimeType": "image\/jpeg",
"fileExt": "jpeg",
"digest": "sha256:",
"width": 198,
"height": 250,
"transparency": 0,
"src": ""
},
"assets":
{
"stream reference": [
{
"kind": "asset",
"assetType": "image",
"mimeType": "image\/jpeg",
"fileExt": "jpeg",
"fileSize": 382605,
"createDate": "2023-09-24 01:19:36",
"digest": "sha256:",
"width": 476,
"height": 600,
"depth": 32,
"transparency": 0,
"src": "",
"name": "image reference",
"desc": "JPEG (600px, sRGB)"
}],
"stream zoom": [
{
"kind": "asset",
"assetType": "image",
"mimeType": "image\/jpeg",
"fileExt": "jpeg",
"fileSize": 2369851,
"createDate": "2023-09-24 01:20:10",
"digest": "sha256:",
"width": 1189,
"height": 1500,
"depth": 32,
"transparency": 0,
"src": "",
"name": "image zoom",
"desc": "JPEG (1500px, sRGB)"
}],
"original": [
{
"kind": "asset",
"assetType": "image",
"mimeType": "image\/tiff",
"fileExt": "tiff",
"fileSize": 54169834,
"createDate": "2022-09-29 21:31:54",
"digest": "sha1:",
"width": 5221,
"height": 6589,
"depth": 24
}]
},
"text":
{
"kind": "text",
"data":
{
"data_id": 1087362,
"ibase_id": 555502,
"resource_identifier": null,
"caption": "A photographic print of Industry, Metal",
"title": "A photographic print of Industry, Metal, Miscellaneous - Scrap Metal",
"description": "A photographic print from the Daily Herald Archive folder: Industry \u00bb Metal \u00bb Miscellaneous - Scrap Metal.",
"notes": null,
"uploaded_date": "29\/09\/2022",
"location": null,
"creator": null,
"rights_holder": null,
"collection": null,
"keyword_tags": null,
"source_file_ext": "TIFF",
"asset_date": null,
"digital_image_no": "SMG00349148_(1002)",
"object_identifiers": "1983-5236\/56182",
"copyright": "\u00a9 Hulton Archive\/G... Images",
"credit": "Science Museum Group",
"rights_usage_terms": "Contact the picture library team (SMG Images) to clear permissions",
"traffic_light": null,
"keywords": "archive; daily; folder; herald; industry; metal; miscellaneous; photographic; print; scrap",
"keywords_legacy": null,
"asset_place": null,
"collection_location": "Science Museum (ScM), London",
"collection_type": "NSMM - Photographs",
"project": "\"Daily Herald Archive - Google Arts and Culture\"",
"author": null,
"date_created": null,
"master_format": null,
"location_of_original": null,
"publish_to_god": "Yes",
"capture_device": null,
"last_modified_date": "16\/10\/2023",
"last_modified_by": "LB@example.com",
"image_notes": "52 MB\r\nLZW\r\n300 DPI\r\n",
"date_original_made": null,
"place_original_made": null,
"original_analogue_format": null,
"mimsy_named_collection": "Daily Herald Archive",
"mimsy_object_name": "photographic print",
"record_type": "Collection Item",
"service_type": null,
"internal_image_standard": null,
"collection_item_aspect": null,
"licence": null
},
"Identifier Data": []
},
"canonicalUrl": "",
"navigateUrl": "",
"editUrl": "",
"permissions":
{
"view": true,
"add": false,
"edit": false,
"delete": false,
"select": false,
"share": true,
"download": false,
"purchase": false,
"print": false,
"upload other": false
},
"selected": false
}]
}
ToDo:
COLLECTIONS_ONLINE_ORDER
needs adding to iBase API [AP: iBase / AH]COLLECTIONS_ONLINE_ORDER
needs extracting to CIIM and pushed into public index (as position
) [AP: KI / JU]position
and sorts correctly [AP: JU]Test record http://medialibrary.sciencemuseum.ac.uk/api/v2/items/555502
In progress KI #5229, awaiting index update & testing + minor refactoring
position now in index, but test record only has one image position, need better example to test http://localhost:8000/api/objects/co8829091
Updated lib/helpers/jsonapi-response/sort-images.js
to set default value to 0
if no position field found.
We appear to be missing
sort
andposition
on multimedia elements in the new index.Like so:
"sort": "2022-09-29 21:31:21.0",
"position": "2",
sort = This is the original upload date of the image into iBase, appears in the CIIM, but not the public index. Easy fix. position = Is set manually in iBase ie. for back / front of photographs, but I am no longer seeing the field in the iBase interface or API? Is the field still in use?
The images order is based first on
position
(manually set in iBase), followed bysort
(which is based on image upload date).dev http://localhost:8000/objects/co8829091/a-photographic-print-of-industry-metal-miscellaneous-scrap-metal-photographic-print
live https://collection.sciencemuseumgroup.org.uk/objects/co8829091
Using 555502 as an example (API call)
These fields are used to order images
live
record belowposition
in iBase interface anymore?upload_sort: "29/09/2022"
"sort": "2022-09-29 21:31:21.0"
iBase for 555502
ES7/new
live
[1] API response for 555502