Webhooks
The Image Service offers the following webhooks.
Image Upload
Description
This webhook gets invoked on each image upload. The response payload will be used to determine whether the image upload should be successful or not.
The Image Service will use the errors property on the retuned JSON object to determine whether the upload should be successful or not.
API
Request
WebhookRequestMessage<ImageUploadWebhookRequestPayload>
Payload Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "image_upload_webhook_request_payload",
"description": "The request payload schema for Image Upload webhook.\nUsed by https://docs.axinom.com/services/image/api/webhooks#image-upload",
"additionalProperties": false,
"required": [
"image_name",
"size",
"width",
"height",
"format",
"has_alpha",
"image_type"
],
"properties": {
"image_name": {
"type": "string",
"description": "Original image name"
},
"size": {
"type": "number",
"description": "Size of the image in bytes"
},
"width": {
"type": "number",
"description": "Width of the image in pixels"
},
"height": {
"type": "number",
"description": "Height of the image in pixels"
},
"format": {
"type": "string",
"description": "Format of the image. e.g. jpeg, png, webp, gif, svg"
},
"has_alpha": {
"type": "boolean",
"description": "Boolean indicating the presence of an alpha transparency channel"
},
"image_type": {
"type": "string",
"description": "Type of the image as defined in the Image Service. e.g. MOVIE_COVER"
}
}
}
Response
WebhookResponseMessage<ImageUploadWebhookResponsePayload>
Payload Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "image_upload_webhook_response_payload",
"description": "The response payload schema for Image Upload webhook.\nUsed by https://docs.axinom.com/services/image/api/webhooks#image-upload",
"additionalProperties": false,
"properties": {},
"required": []
}