Перейти к основному содержимому

Аудит API 1.7.0

Методы API для работы с разделом «Аудит».

Базовый путь: https://{IP_контроллера}/api/v1. Версия описания API: 1.7.0.

Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.

Методы раздела

МетодПуть
GET/alert-notification-filters/audit
POST/alert-notification-filters/audit
PUT/alert-notification-filters/audit/{uuid}

GET /alert-notification-filters/audit

Раздел: Аудит.

Возвращает список событий аудита с настроенными уведомлениями

Источник в Teamly

Назначение

URL запроса

Возвращает список событий аудита с настроенными уведомлениями

https://{IP_контроллера}/api/v1/alert-notification-filters/audit

Параметры запроса:

Отсутствуют

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

uuid*

string

Уникальный идентификатор

properties*

string

name, access_point_uuid, type, enum

Свойства события

actions

string

Действия

active

boolean

Состояние события

{
"items": [
{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}
]
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Return audit event filters",
"responses": {
"200": {
"description": "Successfully returned filters happened in specified time period",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"properties"
],
"properties": {
"uuid": {
"type": "string",
"description": "Уникальный идентификатор"
},
"properties": {
"type": "object",
"properties": {
"name": {
"type": "object",
"required": [
"type",
"enum"
],
"properties": {
"type": {
"type": "string",
"enum": [
"string"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"props": {
"type": "object"
}
}
}
},
"active": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
}
}
}
},
"400": {
"description": "Bad search parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

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

curl -k -X GET "https://{IP_контроллера}/api/v1/alert-notification-filters/audit" \
-H "Authorization: Bearer <token>"

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

{
"items": [
{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}
]
}

POST /alert-notification-filters/audit

Раздел: Аудит.

Создает новый фильтр для событий Доступа

Источник в Teamly

Назначение

URL запроса

Создает новый фильтр для событий Доступа

https://{IP_контроллера}/api/v1/alert-notification-filters/audit

Параметры запроса:

Название

Тип

Описание

Request body*

query/body/path

Тело запроса

BODY

Название

* - обязательный

Тип

Формат

Назначение

uuid*

string

Уникальный идентификатор фильтра

properties*

object

Свойства фильтра

name*

string

Название фильтра

access_point_uuid*

string

UUID точки прохода

user_uuid*

string

UUID персоны

actions

array

Для внутреннего использования

Список действий

name

string

Название действия

props

object

Свойства действия

active

boolean

true – активен,
false – неактивен

Активность фильтра

Пример:

URL запроса: POST
https://{IP_контроллера}/api/v1/alert-notification-filters/audit

Body

{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}

Варианты ответа:

Code 201 (Successfully) - удачное выполнение запроса

{
"success": true,
"message": "string"
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 409 (User with specified uuid already exists) - запрос не выполнен, пользователь с таким uuid уже добавлен

Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Create new filter",
"requestBody": {
"description": "Creates new audit event filter in database",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"properties"
],
"properties": {
"uuid": {
"type": "string",
"description": "Уникальный идентификатор"
},
"properties": {
"type": "object",
"properties": {
"name": {
"type": "object",
"required": [
"type",
"enum"
],
"properties": {
"type": {
"type": "string",
"enum": [
"string"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"props": {
"type": "object"
}
}
}
},
"active": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
},
"responses": {
"201": {
"description": "audit event filter has been successfully added",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "audit event filter already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

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

curl -k -X POST "https://{IP_контроллера}/api/v1/alert-notification-filters/audit" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}'

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

{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}

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

{
"success": false,
"message": "string",
"data": {}
}

PUT /alert-notification-filters/audit/{uuid}

Раздел: Аудит.

Редактирует фильтр событий Аудита, для уведомлений

Источник в Teamly

Назначение

URL запроса

Редактирует фильтр событий Аудита, для уведомлений

https://{IP_контроллера}/api/v1/alert-notification-filters​/audit​/{uuid}

Параметры запроса:

Название

Тип

Описание

uuid *

string

UUID фильтра события аудита

BODY

Название

* - обязательный

Тип

Формат

Назначение

uuid*

string

Уникальный идентификатор фильтра

properties*

object

Свойства фильтра

name

string

Название фильтра

type*

string

Тип события (всегда строка)

enum*

string

Имя события (name). Полный перечень событий доступно:GET//audit_events/types

actions

array

Для внутреннего использования

Список действий

name

string

Название действия

props

object

Свойства действия

active

boolean

true – активен,
false – неактивен

Активность фильтра

Пример:

URL запроса: PUT

https://{IP_контроллера}/api/v1/alert-notification-filters​/audit​/{uuid}

Body

{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 409 (Audit event filter already exists) - запрос не выполнен, фильтр с таким uuid не сущеcтвует

Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Create new filter",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "access event filter uuid"
}
],
"requestBody": {
"description": "Creates new audit event filter in database",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"properties"
],
"properties": {
"uuid": {
"type": "string",
"description": "Уникальный идентификатор"
},
"properties": {
"type": "object",
"properties": {
"name": {
"type": "object",
"required": [
"type",
"enum"
],
"properties": {
"type": {
"type": "string",
"enum": [
"string"
]
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"props": {
"type": "object"
}
}
}
},
"active": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
},
"responses": {
"200": {
"description": "audit event filter has been successfully added",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "audit event filter already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

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

curl -k -X PUT "https://{IP_контроллера}/api/v1/alert-notification-filters/audit/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}'

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

{
"uuid": "string",
"properties": {
"name": {
"type": "string",
"enum": [
"string"
]
}
},
"actions": [
{
"name": "string",
"props": {}
}
],
"active": true
}

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

{
"success": false,
"message": "string",
"data": {}
}