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

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

Ключ

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

Описание: Список политик отсортированный по имени.

Метод:  GET

Ресурс: event/policy

Параметры:

  • start — — с какой позиции начать отдавать политики, по - умолчанию 0
  • limit — — сколько политик отдавать, по - умолчанию 100, не может быть больше 1000

Ответ: Список политик, описанный следующей JSON схемой отдачи списка каталогов:

 


{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "data": {
            "type": "array",
            "description": "Массив политик",
            "items": {
                "type": "object",
                "description": "Политика",
                "properties": {
                    "POLICY_ID": {
                        "type": "string",
                        "description": "Идентификатор"
                    },
                    "DISPLAY_NAME": {
                        "type": "string",
                        "description": "Имя"
                    },
                    "CREATE_DATE": {
                        "type": "string",
                        "description": "Дата создания"
                    },
                    "IS_DELETED": {
                        "type": "integer",
                        "description": "Удалена ли из активной конфигурации",
                        "enum": [
                            0,
                            1
                        ]
                    }
                },
                "required": [
                    "POLICY_ID",
                    "DISPLAY_NAME",
                    "CREATE_DATE",
                    "IS_DELETED"
                ]
            }
        },
        "meta": {
            "description": "Дополнительные данные",
            "type": "object",
            "properties": {
                "totalCount": {
                    "type": "integer",
                    "description": "Общее количество политик"
                },
                "start": {
                    "type": "integer",
                    "description": "С какой позиции началось отдаваться"
                },
                "limit": {
                    "type": "integer",
                    "description": "Сколько всего отдалось"
                }
            },
            "required": [
                "totalCount",
                "start",
                "limit"
            ]
        }
    },
    "required": [
        "data",
        "meta"
    ]
}
 


Пример:

Запрос

 


GET /xapi/event/policy?start=0&limit=10
X-API-Version: 1
X-API-CompanyId: iw
X-API-ImporterName: dome
X-API-Auth-Token: brse99dugp1cdbr69axz
 


Ответ

 


{
    "data": [{
        "POLICY_ID": "3D0F8CDAF9E74F82AC85EB32D12727A700000000",
        "DISPLAY_NAME": "Грифованная информация",
        "CREATE_DATE": "2016-05-12 10:24:41.342554",
        "IS_DELETED": 0
    }],
    "meta": {
        "totalCount": 1,
        "start": 0,
        "limit": 10
    }
}
Sv translation
languageen

escription: The list of policies sorted by name.

Method:  GET

Resource: event/policy

Parameters:

  • start —  a position from which to start returning policies, the default value is 0
  • limit —  the number of policies to be returned; the default value is 100; cannot be more than  1000

Response: The list of policies described with the following JSON Schema:

JSON schema of returing the list of policies:

 

{
     "$schema" :  "http://json-schema.org/draft-04/schema#" ,
     "type" :  "object" ,
     "properties" : {
         "data" : {
             "type" :  "array" ,
             "description" :  "Array of policies" ,
             "items" : {
                 "type" :  "object" ,
                 "description" :  "Policy" ,
                 "properties" : {
                     "POLICY_ID" : {
                         "type" :  "string" ,
                         "description" :  "Identifier"
                     },
                     "DISPLAY_NAME" : {
                         "type" :  "string" ,
                         "description" :  "Name"
                     },
                     "CREATE_DATE" : {
                         "type" :  "string" ,
                         "description" :  "Creation date"
                     },
                     "IS_DELETED" : {
                         "type" :  "integer" ,
                         "description" :  "Whether it is removed from the active configuration" ,
                         "enum" : [
                             0,
                             1
                         ]
                     }
                 },
                 "required" : [
                     "POLICY_ID" ,
                     "DISPLAY_NAME" ,
                     "CREATE_DATE" ,
                     "IS_DELETED"
                 ]
             }
         },
         "meta" : {
             "description" :  "Additional data" ,
             "type" :  "object" ,
             "properties" : {
                 "totalCount" : {
                     "type" :  "integer" ,
                     "description" :  "Total number of policies"
                 },
                 "start" : {
                     "type" :  "integer" ,
                     "description" :  "A position where to start returning policies"
                 },
                 "limit" : {
                     "type" :  "integer" ,
                     "description" :  "Total number of returned policies"
                 }
             },
             "required" : [
                 "totalCount" ,
                 "start" ,
                 "limit"
             ]
         }
     },
     "required" : [
         "data" ,
         "meta"
     ]
}

 

Example:

Query

 

GET /xapi/event/policy?start= 0 &limit= 10
X-API-Version:  1
X-API-CompanyId: iw
X-API-ImporterName: dome
X-API-Auth-Token: brse99dugp1cdbr69axz

 

Response

 

{
     "data" : [{
         "POLICY_ID" :  "3D0F8CDAF9E74F82AC85EB32D12727A700000000" ,
         "DISPLAY_NAME" :  "Security labels" ,
         "CREATE_DATE" :  "2016-05-12 10:24:41.342554" ,
         "IS_DELETED" : 0
     }],
     "meta" : {
         "totalCount" : 1,
         "start" : 0,
         "limit" : 10
     }
}