Image

Image Service

Web service endpoints for retrieving and managing images.

Destroy Content Image

DELETE /images/contents/images/{imageID}

Delete the specified image that belongs to an Update.

Path Parameters:
NameTypeRequiredDescription
imageIDStringtrueID of the image to be deleted
Return Status:
HTTP Status CodeDescription
204 (No Content)Request was successful
400 (Bad Request)An input parameter is missing or malformed
403 (Forbidden)The requesting user is not allowed to delete this image
410 (Gone)Image support has been disabled in this Jive instance
404 (Not Found)The requested image does not exist

Get Content Images

GET /images/contents/{contentID}

Return metadata about the images associated with an Update.

Path Parameters:
NameTypeRequiredDescription
contentIDStringtrueID of the content object for which to retrieve images (must be an update)
Query Parameters:
NameTypeRequiredDescription
fieldsStringfalseNames of the fields to be returned
Return Status:
HTTP Status CodeDescription
200 (OK)Request was successful
400 (Bad Request)An input field is missing or malformed
403 (Forbidden)You are not allowed to access the specified update
404 (Not Found)The specified update is not found

Get Custom Status Level Image

GET /images/status/c/{name}

Return the binary image content of the custom status level image for the specified name.

Path Parameters:
NameTypeRequiredDescription
nameStringtrueName of the status level image to be returned
Return Status:
HTTP Status CodeDescription
200 (OK)Request was successful
400 (Bad Request)The status level image name is missing
500 (Internal Server Error)The requested status level image cannot be retrieved
404 (Not Found)The specified image name does not exist

Get Default Status Level Image

GET /images/status/{name}

Return the binary image content of the default status level image for the specified name.

Path Parameters:
NameTypeRequiredDescription
nameStringtrueName of the status level image to be returned
Return Status:
HTTP Status CodeDescription
200 (OK)Request was successful
400 (Bad Request)The status level image name is missing
500 (Internal Server Error)The requested status level image cannot be retrieved
404 (Not Found)The specified image name does not exist

Get Image

GET /images/{imageID}

Return the specified image as binary content. If width is defined and height is not defined (or vice versa) then the returned size will depend on the value defined for aspect ratio. For instance, if the original image is 100 (W)x 600 (H) and 50 (W) is requested with preserveAspectRatio equals true, then the returned image will be 50 (W) x 300 (H). If preserveAspectRatio was false then the returned image will be 50 (W) x 600 (H). Remember that width and height are maximum possible values. This means that if you request 150 (W) then you will get 100 (W) since that is the size of the image.

Parameters width or height are optional, when not defined then the original avatar image will be returned.

Path Parameters:
NameTypeRequiredDescription
imageIDStringtrueID of the image to be returned
Query Parameters:
NameTypeRequiredDescription
widthStringfalsesuggested width for resizing the image. If image is small than the requested size then original size is preserved.
heightStringfalsesuggested height for resizing the image. If image is small than the requested size then original size is preserved.
preserveAspectRatioStringfalse"true" or "false", indicating whether to preserve the original image's aspect ratio
Return Status:
HTTP Status CodeDescription
200 (OK)Request was successful
400 (Bad Request)An input parameter is missing or malformed
403 (Forbidden)The requesting user is not allowed to retrieve this image
410 (Gone)Image support has been disabled in this Jive instance
500 (Internal Server Error)An I/O error occurs while processing this image
404 (Not Found)The requested image does not exist

Upload New Image

POST /images

Upload an image as a multipart/form-data request body, store it as a temporary image, and return a 201 (Created) status with a Location header that specifies the absolute URL of this temporary image.

Takes:
  • multipart/form-data body that includes the uploaded image
  • Retrieves:
  • Image representing the uploaded image
  • Return Status:
    HTTP Status CodeDescription
    201 (Created)Request was successful
    400 (Bad Request)A field with a "filename" property is not found, or the image is too large
    403 (Forbidden)The requesting user is not authenticated, or is not allowed to upload images
    410 (Gone)Images are not supported in this Jive instance
    500 (Internal Server Error)A processing error occurs while saving an image