Images API
API for image hosting.
This page provides REST API for the Managing Images feature.
Operations
Upload Image
Request
POST {serviceUrl}/image/{environmentId}/{tenantId}
Name | Required | Details | |
---|---|---|---|
Headers |
Authorization
|
Yes | Information about authentication access token in format "Bearer
<accessToken> " (see details in Authentication API ). |
Path variables |
environmentId
|
Yes | Environment identifier built in URL as
https://{environmentId}.reltio.com |
tenantId
|
Yes | Tenant identifier. | |
Body | Yes | 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 , image should be uploaded to S3. Taken
into account only if sourceUrl is specified.
Default value is true . |
Response
If image is uploaded successfully, then the response will contain a JSON of image properties.Errors
Authorization token is not valid.- Status: 401
- Error code: 42001
- Status: 415
- Error code: 42002
- Status: 400
- Error code: 42003
- Status: 400
- Error code: 42004
- Status: 500
- Error code: 42005
Request-Upload Image File by Specified URL
POST http://idev-01-ih.reltio.com/ih/image/idev-01-dev/xJlAB36Tc0SS1ea
Authorization Bearer {authorizationToken}
Content-Type: multipart/form-data:
"sourceUrl": "https://url.of.source.image"
"upload": "false"
Upload Image File
PPOST https://url.to.service/image/myEnvironment/myTenant
Authorization Bearer {authorizationToken}
Content-Type: multipart/form-data:
"file": binary file
Content-Type:application/octet-stream
Response
Status: 200
Content-type: JSON
{
"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"
}