get-products-IMAGE_HASH-image.rst (888B)
1 .. http:get:: /products/$IMAGE_HASH/image 2 3 Returns a stored product image by its content hash. The hash is the lowercase 4 hexadecimal SHA-256 digest of the base64-encoded image data supplied in 5 ``image`` during product creation or update. 6 7 **Required permission:** none (public endpoint) 8 9 **Response:** 10 11 :http:statuscode:`200 OK`: 12 The body is a `ProductImageResponse`. 13 :http:statuscode:`400 Bad Request`: 14 The hash is not a valid hex-encoded SHA-256 digest. 15 :http:statuscode:`404 Not found`: 16 No image is known for the given hash. 17 :http:statuscode:`500 Internal Server Error`: 18 The server experienced an internal failure. 19 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 20 21 .. ts:def:: ProductImageResponse 22 23 interface ProductImageResponse { 24 // Data URL containing the product image as stored in the backend. 25 image: ImageDataUrl; 26 }