Unify and manage your data

Image Hosting Service

You can upload images to external storage and evaluate the image's preview and thumbnail.

Request

POST {ImageHostingURL}/image/{environmentId}/{tenantId}
Table 1. Parameters
ParametersNameRequiredDetails
HeadersAuthorizationYes

Information about authentication access token in format Bearer accessToken (see details in Authentication API).

QueryenvironmentIdYesEnvironment identifier which builds in URL as https://{environmentId}.reltio.com.
tenantIdYesTenant identifier.
BodyContent-type. Should be “multipart/form-data”.
fileNoImage to upload. Type should be “application/octet-stream”.
sourceUrlNoURL of source image.
uploadNoIf true, the image should be uploaded to S3. This parameter is taken into account only if sourceUrl is specified. Default value is true.

Examples

Example 1: Upload image file by specified URL

POST {ImageHostingURL}/image/myEnvironment/myTenant
{
  "sourceUrl" : “https://url.of.source.image”,
  "upload" : false
}
 
Headers:
    Authorization: Bearer {your-access-token}
    Content-Type: multipart/form-data

Example 2: Upload image file

POST {ImageHostingURL}/image/myEnvironment/myTenant
{
  "file" : binary file
}
 
Headers:
    Authorization: Bearer {your-access-token}
    Content-Type: multipart/form-data

Response

If the image is uploaded successfully, then the response contains JSON of image properties.

Example

{
  "Url": "https://full.size.url",
  "UrlPreview": "https://preview.url",
  "UrlThumbnail": "https://thumbnail.url",
  "CdnUrl": "https://cdn.full.size.url",
  "CdnUrlPreview": "https://cdn.preview.url",
  "CdnUrlThumbnail": "https://cdn.thumbnail.url",
  "Width": "800",
  "Height": "600",
  "Size": "4834",
  "MimeType": "image/png",
  "CreationTimestamp": "1465901311933"
}

Image Hosting Service Errors

Table 2. Image Hosting Service Errors
Root CauseStatus CodeError Code
Authorization token is not valid.40142001
File format is not supported.41542002
File size exceeds the configured maximum file size.40042003
Illegal request parameters.40042004
Internal service error.50042005