Set Addressable Icon


This request sets the icon of an addressable.

Resource

PUT /addressables/<OID>/image

Where OID is the object ID of the addressable.

Parameters

None

Payload

None if the icon is removed or an Attachment object. In the Attachment object the fields contentsB64String contains the image in a Base64 encoding. The fields objectType and mimeType must be specified.

Response

None if the icon is removed or Object Response < Attachment > otherwise.

The response object will contain the new object ID and will not contain the image.

Context

Authorization

User

Errors

HTTP code Xelion code Description

500

11000

If the attachment exceeds the maximum size or another server error occurred. See error message for more information.

Example

Request
PUT https://xelion.nl/api/v1/master/addressables/1557367/image
Payload
{
    "originalLocation": "icon.jpg",
    "mimeType": "image/jpeg",
    "contentsB64String": "/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAQABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD2fVdUmtLmCxsLZLrUrlHkiillMUYjQqHd3CsQAXQABWJLjjG5lNK1Sa7ubixv7ZLXUrZEkliilMsZjcsEdHKqSCUcEFVIKHjG1mNV0ua7uYL6wuUtdStkeOKWWIyxmNypdHQMpIJRCCGUgoOcblY0rS5rS5uL6/uUutSuUSOWWKIxRiNCxREQsxABdySWYkuecbVUA//Z",
    "objectType": "Attachment"
  }
Response
{
  "object": {
    "mimeType": "image/jpeg",
    "size": 0,
    "commonName": "",
    "oid": "1590019",
    "objectType": "Attachment"
  }
}