Skip to content

hasImages does not return the expected results #52

@Baptiste-Crepin

Description

@Baptiste-Crepin

hasImages does not return the expected results

Description

The hasImages query parameter does not return the expected results. The query should return objects that have images only, but the objects returned do not have images.

Steps to reproduce

  1. Query the Met Museum API at this endpoint GET /public/collection/v1/search with the following parameters:

    • isHighlight=true
    • hasImages=true
    • q=sunflowers
  2. Get the details of the first object returned in the response using the object ID.

  3. Check if the object has a primary image.

  4. Repeat the process for the other objects returned in the response.

  5. Compare the results with the expected behavior.

Expected behavior

The result of the query should be an array that contains the object IDs of the objects that match the query string. The object should have the following properties isHighlight and primaryImage that are used to filter the results

"isHighlight": true,
"primaryImage": "url",

Actual behavior

The objects returned in the response do not have a primary image.

This unexpected since the query parameter hasImages=true should return objects with images only.

Example

Response to https://collectionapi.metmuseum.org/public/collection/v1/search?isHighlight=true&hasImages=true&q=sunflowers:

  {
    "total": 5,
    "objectIDs": [
        485308,
        437329,
        761604,
        436535,
        436121
    ]
}

Getting details about the first object using the following URL https://collectionapi.metmuseum.org/public/collection/v1/objects/485308

{
    "objectID": 485308,
    "isHighlight": true,
    "accessionNumber": "1989.349",
    "accessionYear": "1989",
    "isPublicDomain": false,
    "primaryImage": "",
    "primaryImageSmall": "",
    "additionalImages": [],
    "constituents": [
        {
            "constituentID": 164422,
            "role": "Artist",
            "name": "Joan Mitchell",
            "constituentULAN_URL": "http://vocab.getty.edu/page/ulan/500000901",
            "constituentWikidata_URL": "https://www.wikidata.org/wiki/Q469934",
            "gender": "Female"
        }
    ],
    "department": "Modern and Contemporary Art",
    "objectName": "Painting",
    "title": "Sunflower",
    "culture": "",
    "period": "",
    "dynasty": "",
    "reign": "",
    "portfolio": "",
    "artistRole": "Artist",
    "artistPrefix": "",
    "artistDisplayName": "Joan Mitchell",
    "artistDisplayBio": "American, Chicago, Illinois 1925–1992 Paris",
    "artistSuffix": "",
    "artistAlphaSort": "Mitchell, Joan",
    "artistNationality": "American",
    "artistBeginDate": "1925",
    "artistEndDate": "1992",
    "artistGender": "Female",
    "artistWikidata_URL": "https://www.wikidata.org/wiki/Q469934",
    "artistULAN_URL": "http://vocab.getty.edu/page/ulan/500000901",
    "objectDate": "1969",
    "objectBeginDate": 1969,
    "objectEndDate": 1969,
    "medium": "Oil on canvas",
    "dimensions": "102 1/4 in. × 70 3/4 in. (259.7 × 179.7 cm)",
    "measurements": [
        {
            "elementName": "Overall",
            "elementDescription": null,
            "elementMeasurements": {
                "Height": 259.7155,
                "Width": 179.70535
            }
        },
        {
            "elementName": "Frame",
            "elementDescription": null,
            "elementMeasurements": {
                "Depth": 7.620015,
                "Height": 267.01804,
                "Width": 187.32538
            }
        }
    ],
    "creditLine": "Gift of Pierre Matisse, 1989",
    "geographyType": "",
    "city": "",
    "state": "",
    "county": "",
    "country": "",
    "region": "",
    "subregion": "",
    "locale": "",
    "locus": "",
    "excavation": "",
    "river": "",
    "classification": "Paintings",
    "rightsAndReproduction": "",
    "linkResource": "",
    "metadataDate": "2024-03-15T04:53:14.917Z",
    "repository": "Metropolitan Museum of Art, New York, NY",
    "objectURL": "https://www.metmuseum.org/art/collection/search/485308",
    "tags": [
        {
            "term": "Sunflowers",
            "AAT_URL": "http://vocab.getty.edu/page/aat/300404749",
            "Wikidata_URL": "https://www.wikidata.org/wiki/Q171497"
        }
    ],
    "objectWikidata_URL": "https://www.wikidata.org/wiki/Q19922136",
    "isTimelineWork": false,
    "GalleryNumber": ""
}

When getting the object with ID 485308, the object does not have a primary image, which is unexpected since the query parameter hasImages=true should return objects with images only.

The object does not have a primaryImageSmall, additionalImages either.

Additional information

the test in the example were done on the 04/05/2024 using postman/react/web browser and the results were consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions