Accelerate the Value of 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
Parameters Name Required Details
Headers Authorization Yes

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

Query environmentId Yes Environment identifier which builds in URL as https://{environmentId}.reltio.com.
tenantId Yes Tenant identifier.
Body Content-type. Should be “multipart/form-data”.
file No Image to upload. Type should be “application/octet-stream”.
sourceUrl No URL of source image.
upload No If 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 {accessToken}
    Content-Type: multipart/form-data

Example 2: Upload image file

POST {ImageHostingURL}/image/myEnvironment/myTenant
{
  "file" : binary file
}
 
Headers:
    Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
    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 Cause Status Code Error Code
Authorization token is not valid. 401 42001
File format is not supported. 415 42002
File size exceeds the configured maximum file size. 400 42003
Illegal request parameters. 400 42004
Internal service error. 500 42005