Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Код відповідіContent-typeДопустимі параметриПриклад вмісту
200application/json

image

400application/jsonmessage
code
techMessage
{
"message": "Вхідні дані мають невірний формат або одне з полів містить значення у невірному форматі",
"code": "CCSCLIB-3",
"techMessage": "JSON parse error: Cannot deserialize value of type `com.cipher.cloud.service.qr.core.EQrCodeImageFormat` from String \"PNGs\": value not one of declared Enum instance names: [JPEG, PNG, SVG]; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `com.cipher.cloud.service.qr.core.EQrCodeImageFormat` from String \"PNGs\": value not one of declared Enum instance names: [JPEG, PNG, SVG]\n at [Source: (PushbackInputStream); line: 5, column: 18] (through reference chain: com.cipher.cloud.service.qr.dataobject.QrCreatorRequestData[\"imageFormat\"]);EndpointURI:http://10.0.31.29:9096/creator;ClientURI:37.229.139.42, 172.18.0.1"
}
500application/jsonmessage
code
techMessage
{
"message": "Помилка на стороні віддаленого сервісу в процесі виконання запиту",
"code": "CCSCLIB-31",
"techMessage": "ServiceUrl:http://localhost:9098;ServiceAnswer:I/O error on POST request for \"http://localhost:9098/context\": Connect to localhost:9098 [localhost/127.0.0.1] failed: Connection refused (Connection refused); nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:9098 [localhost/127.0.0.1] failed: Connection refused (Connection refused)"
}
Приклад коду на JavaScript + jQuery 2.2.4
Code Block
languagejs
var settings = {
  "url": "http://ccs-dev.cipher.kiev.ua:9010/ccs/qr/api/v1/creator",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({"textData":"Опис: акти виконаних робіт\nПідписувач: Бармалей Алібабайович Вишневий\nПосада: директор\nОрганізація: ТОВ \"Роги та копита\"\nІПН: 0000000033\nУНЗР: 10000000000033\nАЦСК/КНЕДП: ЦСК ТОВ \"Сайфер БІС\"\nДата підпису: 27.03.2019, 16:22:40 GMT+2\nСН підписанту: 63EF3F5D24764D26\nЕПЧ підпису: дійсна; 27.03.2019, 16:22:40 GMT+2;\nСН ЕПЧ підпису: 63EF3F5D24764D26\nЕПЧ даних: дійсна; 27.03.2019, 16:22:40 GMT+2\nСН ЕПЧ даних: 63EF3F5D24764D26","width":0,"height":0,"imageFormat":"PNG"}),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});