HTTP (REST) сервис
3 |
0
21 февраля 2024 в 19:43:20
(43 недели 4 дня 9 часов назад)
Создать простой http (rest) сервис для УТ. Текущая версия УТ 11.4.7
Выполняемое действие:
Добавить к документу с заданным "guid" присоединенный файл с содержимым "base64" и именем "name"
Метод POST
Ресурс /sendfile
Content type application/json
Пример json
{"guid" : " 6F9619FF-8B86-D011-B42D-00CF4FC964FF",
"name" : "clock_1889.png"
"base64" : "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAAK/INwWK6QAAG/9JREFUeJy9m3eQXdd93z/n1ndfb/u2d2B30TsBkABJgaIoyZQsyWNZtmON5SiKI9tKnIiRnPEk+kuTmShO5DISZauZkkiZVMReAHYARF90LMr23vf1ekv+uLtLgAJJEAD9m/nt23333HPO73t+59fOWcGHSKEN/yNcsfNt2NZmhLpHksQahNQhhOQBZ7GVwMHKYjsXHbtyEtt+Hcc5nfPmBzjxg/yHOT939NtMxqaH6iSTe4SQfgtZ3YbmbXE8IU3oXiSPD0k3QFa4BgCzjF0q4hRziHIOCqmcU8r3O7Z5TNiV56nk3she/sHs7Z6rO/ptIs+ar98lS8qfCFX9OL6qOilShxqpprYmREN1kPqYh6aoStQvURVQ0GR36IW8xULOYiJpMjxfYXy+yNBEmlwqjTU3AekJ7OzsoF0uP+OI/D8Xzv3D8ds1Z7gNAPjWfONeJPGfJSPwSaraZKO2iY7WBHd2hbm3w8uaep3qgISu3NhQczmLkQWTw/0l3ryco7s3xfTENPb0IPbsQMkp5Z62rPR3ChcePnqrc4dbAEBf/c0Vqux8SxiBL0i1q+RISxv3bqzhd7YE2dGqE/fLy20LZYuxuTwzqRKpXAXTdq7py6vLRPwadVGD6rBn+XvLgUuTZZ45k+OZU2ku9k1hTfRhTV7JW8X0T53i5LcLvT8fvVkZ4CYB8K77xpdlVfu2XNtZFVmxmvu31vPFnUG2NOl4VEGx4nBlPM2ZgRSnhzOMpyo4koKq6aiqgqHJxEIGpbLJXKaEadpUyi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oQaCAvNFxBC1gAkBI4QQjimaZXTebs4nyylh6ex7Tnc1HUKV+A53EzuFo5Pr08fUl1rmVRcW2HgaogX8Cx+vxQDL9s63JXN4wpbAErcQDBzK/RhA/BuY15v3CUg/lXp/wMq3Upm+IgGuQAAAABJRU5ErkJggg=="}
Пример ответа rest
формат json
в случае успеха
{"status" : "ok"
}
в случае ошибки
{
"status" : "failed"
"error" : "описание ошибки",
}
Файлы могут хранится в базе или в томах на диске. В зависимости от настройки УТ
-
Завершена (31.08.2019)