Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.13
Sv translation
languageru

Описание: метод предназначен для обновления содержимого выгрузки. Все записи эталонной выгрузки будут удалены, и после этого добавится новая запись. Данный метод можно использовать для первичного наполнения.

Характеристики метода: POST, асинхронный.

Ресурс: xapi/etalonTable/{id}/content/replace.

Параметры:

  • id – fingerprint_id редактируемого объекта.

Например: enatalonTable/0123456789ABCDEF/content/replce

Content-type тела запроса должно быть не application/json, а multipart/form-data (подробнее см. https://ru.wikipedia.org/wiki/Multipart/form-data).

Content-Disposition, который будет содержать файл, должен иметь поле name со значением CONTENT и атрибут filename с названием файла с расширением TSV или CSV в зависимости от формата файла, разделенного Tab или запятыми соответственно.

Возможные значение ошибок поля CONTENT:

  • not_valid – файл имеет неверную сигнатуру;
  • not_allowed_file_extension – неразрешенное расширение файла, на данный момент разрешены 2 формата: TSV и CSV;
  • too_long_size – слишком большой размер файла;
  • duplicate – такой файл уже существует в системе.
Предупреждение
titleВажно!

Наполнение должно иметь целое число строк, минимум 2 строки.
Минимальное количество колонок – 2.
Минимальный байтовый размер загружаемого контента – 128 байт.
Максимальный байтовый размер загружаемого контента – 2 ГБ.

В случае успеха – код возврата «200»  200.

Блок кода
languagetext
titleТело ответа:
collapsetrue
{
    "FINGERPRINT_ID":    "string",
    "TYPE":              "string",
    "SOURCE":            "string",
    "DISPLAY_NAME":      "string",
    "NOTE":              "string",
    "CONDITION_COLUMNS": "string",
    "CREATE_DATE":       "string",
    "CHANGE_DATE":       "string",
    "STATUS":            "string"
}

После получения кода возврата «200» 200 нужно взять поле FINGERPRINT_ID и по нему проверять состояние выгрузки, пока статус не перейдет в состояние ready.

Предупреждение
titleВажно!

Число ячеек в загружаемых строках должно совпадать со значением числа столбцов, которое было указано при создании выгрузки.
При удалении выгрузки через консоль TrafficMonitor Traffic Monitor она считается существующей до момента распространения конфигурации, т.е. с этой выгрузкой возможны операции обновления и добавления содержимого.
При загрузке «ошибочного» ошибочного содержимого, т.е. содержимого, которое является дубликатом уже загруженной выгрузки (части выгрузки) или содержимого, строки которого содержат неправильное количество ячеек, весь эталонный объект получает невалидный статус. Внешняя подсистема должна перестать загружать такое содержимое и перейти к следующему содержимому. Загрузка корректного содержимого исправляет общий статус эталонного объекта. Некорректное содержимое никогда не попадает на модули анализа.

Sv translation
languageen

Description: the method is required to update the unloading contents. All entries of the sample unloading will be deleted, and then, a new entry will be added. This method can be used for the initial filling of the unloading.

Предупреждение
titleImportantWarning!

The filling should have an integer number of rows.
The minimum number of row for filling is 2. 
The minimum number of columns is 2.
The minimum byte size of loadable content is 128 byte. 
The minimum byte size of loadable content is 2GB.

Methods features: POST, asynchronous.

Resource: xapi/etalonTable/{id}/content/replace.

Parameters:

  • id – fingerprint_id of the object being edited.

Example: enatalonTable/0123456789ABCDEF/content/replce

Content-type of type of the request body should be not application/json, but multipart/form-data (for more details, see: https://tools.ietf.org/html/rfc2388).

Content-Disposition that Disposition that will include the file should have the name field with CONTENT value and filename attribute with the file name and TSV or CSV extension depending on the file format, separated with Tab or commas respectively.

Possible values of errors for the CONTENT field:

  • not_valid – the file has an invalid signature;
  • not_allowed_file_extension – an unauthorized file extension, for now. only 2 formats are supported: TSV and CSV;
  • too_long_size – the file size is too large;
  • duplicate – this file already exists in the system.

In case of success – the return code is "200" and the response body is as follows:

{

200.

Блок кода
languagetext
titleThe response body:
collapsetrue
{

    "FINGERPRINT_ID":    "string",


    "TYPE":              "string",


    "SOURCE":            "string",


    "DISPLAY_NAME":      "string",


    "NOTE":              "string",


    "CONDITION_COLUMNS": "string",


    "CREATE_DATE":       "string",


    "CHANGE_DATE":       "string",


    "STATUS":            "string"


}

After getting the " 200 " return code, you should take the FINGERPRINT_ID field and use it for the checking the unloading state, until the state changes to "ready".

Предупреждение
titleImportant!

The number of cells in loadable rows should match the number of columns that was specified when creating the unloading.
When you delete the unloading through Traffic Monitor console, it is considered existing until you distribute the configuration, i.e. you can update this unloading and add contents to it.
When loading "erroneous" content, i.e. the content which duplicates an already loaded unloading (or its part) or the content whose rows contain an incorrect number of cells, the whole sample object gets an invalid status. The external subsystem should stop loading this content and go to the next one. Loading the correct content changes the sample object status to the correct one. Incorrect content never reaches the analysis modules.