Получение изображений/файлов объекта

<aside> 💡 Общий метод, контекст системы, V=500

</aside>

Входные параметры

Параметр REQ Описание
ObjectId да id объекта
ObjectType да тип объекта
RefreshLinks нужно ли обновлять ссылки на файлы. по умолчанию false

Результат

Возвращаемый объект типа XImagesContainer

public class XImagesContainer : ICloneable<XImagesContainer>
{
    [JsonProperty("Images")]
    public IEnumerable<XImage> Images { get; set; }; // список файлов

    [JsonProperty("ObjectType")]
    public string ObjectType { get; set; } = ""; // тип объекта
    
    [JsonProperty("ObjectId")]
    public string ObjectId { get; set; } = ""; // код объекта
}

public class XImage
{
    [JsonProperty("fileId")]
    public string FileId { get; set; } = "";
    
    [JsonProperty("fileError")]
    public string FileError { get; set; } = "";
    
    [JsonProperty("url")]
    public string Url { get; set; } = "";
    
    [JsonProperty("originalName")]
    public string OriginalName { get; set; } = "";
    
    [JsonProperty("MimeType")]
    public string MimeType { get; set; }  
         
    [JsonProperty("surl")]
    public string Surl { get; set; } = "";
    
    [JsonProperty("murl")]
    public string Murl { get; set; } = "";
    
    [JsonProperty("folder")]
    public string Folder { get; set; } = "";

    [JsonProperty("isFolder")]
    public string IsFolder { get; set; } = "0";
    
		[JsonProperty("isExternal")]
		public bool IsExternal { get; set; } = false;

    [JsonProperty("yandexImage")]
    public bool YandexImage { get; set; } = false;
    
    [JsonProperty("yandexLocalPathSmall")]
    public string YandexLocalPathSmall { get; set; } = "";
    
    [JsonProperty("yandexLocalPathMedium")]
    public string YandexLocalPathMedium { get; set; } = "";
    
    [JsonProperty("yandexLocalPath")]
    public string YandexLocalPath { get; set; } = "";

    [JsonProperty("objectType")]
    public string ObjectType { get; set; } = "";
    
    [JsonProperty("objectId")]
    public string ObjectId { get; set; } = "";
}

Пример запроса

{
    "ApiVersion": "500",
    "Method": "GetObjectImages",
    "ApiKey": "apiKey",
    "Parameters": {
        "ObjectId": 61978,
        "ObjectType": 2,
        "RefreshLinks": true
    }
}

Пример ответа

{
    "Result": {
        "Images": [
            {
                "fileId": "",
                "fileError": "",
                "url": "<http://i15.xlombard.ru/images/581f7c4f-82df-49ee-9fd7-1bc5561a53c0/Client/6f58adc0-1b5c-4b5d-8789-e9d5bc2ce8f9/8f4ac007-d8ce-43b2-9adc-3b9c4b4971a0.png>",
                "originalName": "e0cbba1c5885d84cbde19d82d1d6f80b3edabcfd.png",
                "MimeType": "image/png",
                "surl": "<http://i15.xlombard.ru/images/581f7c4f-82df-49ee-9fd7-1bc5561a53c0/Client/6f58adc0-1b5c-4b5d-8789-e9d5bc2ce8f9/s/8f4ac007-d8ce-43b2-9adc-3b9c4b4971a0_small.jpeg>",
                "murl": "<http://i15.xlombard.ru/images/581f7c4f-82df-49ee-9fd7-1bc5561a53c0/Client/6f58adc0-1b5c-4b5d-8789-e9d5bc2ce8f9/m/8f4ac007-d8ce-43b2-9adc-3b9c4b4971a0_medium.jpeg>",
                "folder": "",
                "isFolder": "0",
                "isExternal": false,
                "yandexImage": false,
                "yandexLocalPathSmall": "",
                "yandexLocalPathMedium": "",
                "yandexLocalPath": "",
                "objectType": "",
                "objectId": ""
            }
        ],
        "ObjectType": "Client",
        "ObjectId": "6f58adc0-1b5c-4b5d-8789-e9d5bc2ce8f9"
    },
    "ApiKey": null,
    "ApiVersion": "500",
    "Method": "GetObjectImages",
    "Errors": [],
    "Duration": 34905.91
}