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

Экспорт API 1.7.0

Методы API для работы с разделом «Экспорт».

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

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

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

МетодПуть
GET/tt_export/configs
POST/tt_export/configs
GET/tt_export/configs/{uuid}
PUT/tt_export/configs/{uuid}
DELETE/tt_export/configs/{uuid}
GET/tt_export/{uuid}
GET/tt_report/configs
POST/tt_report/configs
GET/tt_report/configs/{uuid}
PUT/tt_report/configs/{uuid}
DELETE/tt_report/configs/{uuid}
GET/tt_report/{uuid}

GET /tt_export/configs

Раздел: Экспорт.

Возвращает все уже созданные настройки экспорта данных УРВ

Источник в Teamly

Назначение

URL запроса

Возвращает все уже созданные настройки экспорта данных УРВ

https://{IP контроллера}/api/v1/tt_export​/configs

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

Отсутствуют

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

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

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Название отчета

period*

string

Варианты

day- за сегодня,

prev_day – за вчера,

week – за текущую неделю,

prev_week – за прошлую неделю,

month – за текущий месяц,

prev_month – за прошлый месяц

Период за который берутся события прохода

format*

string

Варианты: [CSV, JSON]

Формат вывода данных

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

[string]

Внешние зоны в формате: Зона:Этаж:Здание

inner_zones*

[string]

Внутренние зоны в формате: Зона:Этаж:Здание

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

from

integer($int64)

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

to

integer($int64)

Временная метка UNIX для поиска событий в миллисекундах (игнорируется, если не указано «от»).

additional_field

string

Дополнительное поле сотрудников

Пример:

[{
"delimeter": ";",
"uuid": "d88704d0-59a1-11f1-b1c6-891099ffe336",
"outer_zones": [
"A:Проходная:1"
],
"additional_field": "",
"period": "month",
"format": "CSV",
"name": "отчет",
"inner_zones": [
"B:Проходная:1"
]
}]

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

Параметры и ответы по OpenAPI
{
"description": "Returns all time tracking export configurations",
"parameters": [],
"responses": {
"200": {
"description": "Successfully got all configurations",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"format",
"outer_zones",
"inner_zones"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"format": {
"type": "string",
"enum": [
"CSV",
"JSON"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"from": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
},
"to": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
}
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_export/configs" \
-H "Authorization: Bearer <token>"

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

[
{
"uuid": "string",
"name": "string",
"period": "day",
"format": "CSV",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"from": 1,
"to": 1
}
]

POST /tt_export/configs

Раздел: Экспорт.

Позволяет добавить новую настройку экспорта данных УРВ

Источник в Teamly

Назначение

URL запроса

Позволяет добавить новую настройку экспорта данных УРВ

https://{IP_контроллера}/api/v1/tt_export/configs

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

Название

Тип

Описание

config*

object(body)

Тело запроса

BODY

Название

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Название отчета

period*

string

Варианты

day- за сегодня,

prev_day – за вчера,

week – за текущую неделю,

prev_week – за прошлую неделю,

month – за текущий месяц,

prev_month – за прошлый месяц

Период за который берутся события прохода

format*

string

[CSV, JSON]

Формат вывода данных

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

[string]

Зона:Этаж:Здание

Внешние зоны

inner_zones*

[string]

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

Пример:

URL запроса: POST
https://{IP контроллера}/api/v1/tt_export/configs

Body

{
"uuid": "3a66a60c-e422-4fb9-8258-fcdfbc027d3c",
"name": "через api Пятидневка JSON",
"period": " week",
"format": "JSON",
"delimeter": "",
"outer_zones": [
"Улица:1:Главное"
],
"inner_zones": [
"Здание:1:Главное"
],
"staff_filter": [{
"prop_name": "Grafik_raboti",
"prop_values": [
"Пятидневка"
]
}]
}

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

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

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

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

Code 409 (Configuration already exists) - запрос не выполнен, указанная конфигурация уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Create new configuration",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"format",
"outer_zones",
"inner_zones"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"format": {
"type": "string",
"enum": [
"CSV",
"JSON"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"from": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
},
"to": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Successfully created new configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Configuration 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/tt_export/configs" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"period": "day",
"format": "CSV",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"from": 1,
"to": 1
}'

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

{
"uuid": "string",
"name": "string",
"period": "day",
"format": "CSV",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"from": 1,
"to": 1
}

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

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

GET /tt_export/configs/{uuid}

Раздел: Экспорт.

Возвращает конкретную настройку экспорта данных УРВ.

Источник в Teamly

Назначение

URL запроса

Возвращает конкретную настройку экспорта данных УРВ.

https://{IP контроллера}/api/v1/tt_export​/configs/942c4e00-7849-11ec-b65f-a19a10ea365e

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

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

Описание

uuid* string (path)

uuid настройки экспорта данных УРВ

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

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

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Название отчета

period*

string

Варианты

day- за сегодня,

prev_day – за вчера,

week – за текущую неделю,

prev_week – за прошлую неделю,

month – за текущий месяц,

prev_month – за прошлый месяц

Период за который берутся события прохода

format*

string

Варианты: [CSV, JSON]

Формат вывода данных

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

[string]

Зона:Этаж:Здание

Внешние зоны

inner_zones*

[string]

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

from

integer($int64)

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

to

integer($int64)

Временная метка UNIX для поиска событий в миллисекундах (игнорируется, если не указано «от»).

additional_field

string

Дополнительное поле сотрудников

Пример:

{
"delimeter": ";",
"uuid": "d88704d0-59a1-11f1-b1c6-891099ffe336",
"outer_zones": [
"A:Проходная:1"
],
"additional_field": "",
"period": "month",
"format": "CSV",
"name": "отчет",
"inner_zones": [
"B:Проходная:1"
]
}

Code 400 (Invalid UUID) - запрос не выполнен, указан некорректный uuid

Code 404 (Specified user defined notification does not exist) - запрос не выполнен, настройка экспорта данных УРВ с указанным uuid не существует

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

Параметры и ответы по OpenAPI
{
"description": "Get time tracking export configuration by UUID",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully received configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"format",
"outer_zones",
"inner_zones"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"format": {
"type": "string",
"enum": [
"CSV",
"JSON"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"from": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
},
"to": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
}
}
}
}
}
},
"400": {
"description": "Wrong UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified configuration does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_export/configs/{uuid}" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "string",
"name": "string",
"period": "day",
"format": "CSV",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"from": 1,
"to": 1
}

PUT /tt_export/configs/{uuid}

Раздел: Экспорт.

Позволяет отредактировать уже созданную настройку экспорта данных УРВ

Источник в Teamly

Назначение

URL запроса

Позволяет отредактировать уже созданную настройку экспорта данных УРВ

https://{IP_контроллера}/api/v1/tt_export/configs/{uuid}

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

Название

Тип

Описание

uuid*

config*

string (path)

object (body)

UUID настройки экспорта данных УРВ

Тело запроса

BODY

Название

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Название отчета

period*

string

Варианты

day- за сегодня,

prev_day – за вчера,

week – за текущую неделю,

prev_week – за прошлую неделю,

month – за текущий месяц,

prev_month – за прошлый месяц

Период за который берутся события прохода

format*

string

Варианты: [CSV, JSON]

Формат вывода данных

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

[string]

Зона:Этаж:Здание

Внешние зоны

inner_zones*

[string]

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

Пример:

URL запроса: PUT

https://{IP контроллера}/api/v1/tt_export/configs/3a66a60c-e422-4fb9-8258-fcdfbc027d3c

Body

{
"uuid": "3a66a60c-e422-4fb9-8258-fcdfbc027d3c",
"name": " через api Пятидневка JSON",
"period": "prev_day",
"format": "JSON",
"delimeter": "",
"outer_zones": [
" Улица:1:Главное"
],
"inner_zones": [
"Здание:1:Главное"
],
"staff_filter": [{
"prop_name": "Grafik_raboti",
"prop_values": [
"Пятидневка"
]
}]
}

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

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

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

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

Code 404 (Specified configuration does not exist) - запрос не выполнен, указанная конфигурация не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Update existing configuration",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"format",
"outer_zones",
"inner_zones"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"format": {
"type": "string",
"enum": [
"CSV",
"JSON"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"from": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
},
"to": {
"type": "integer",
"format": "int64",
"description": "UNIX timestamp in milliseconds"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified configuration does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_export/configs/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"period": "day",
"format": "CSV",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"from": 1,
"to": 1
}'

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

{
"uuid": "string",
"name": "string",
"period": "day",
"format": "CSV",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"from": 1,
"to": 1
}

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

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

DELETE /tt_export/configs/{uuid}

Раздел: Экспорт.

Удаляет отчет с указанным uuid

Источник в Teamly

Назначение

URL запроса

Удаляет отчет с указанным uuid

https://{IP_контроллера}/api/v1/tt_export/configs/{uuid}

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

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

Описание

uuid* string (path)

UUID настройки экспорта данных УРВ

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

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

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

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

Code 404 (Specified configuration does not exist) - запрос не выполнен, указанная конфигурация не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Delete specified configuration",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted specified configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified configuration does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X DELETE "https://{IP_контроллера}/api/v1/tt_export/configs/{uuid}" \
-H "Authorization: Bearer <token>"

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

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

GET /tt_export/{uuid}

Раздел: Экспорт.

Возвращает выборку данных по настройкам экспорта данных УРВ. Данная ссылка автоматически формируется в пользовательском интерфейсе в поле “Ссылка API”, для ручного запроса нужно вместо {uuid} подставить "uuid" нужного отчета.

Источник в Teamly

Назначение

URL запроса

Возвращает выборку данных по настройкам экспорта данных УРВ. Данная ссылка автоматически формируется в пользовательском интерфейсе в поле “Ссылка API”, для ручного запроса нужно вместо {uuid} подставить "uuid" нужного отчета.

https://{IP контроллера}/api/v1/tt_export​/configs​/942c4e00-7849-11ec-b65f-a19a10ea365e

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

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

Описание

uuid* string (path)

uuid настройки экспорта данных УРВ

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

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

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

Тип

Формат

Назначение

text*

string($binary)

Выборка данных по настройкам экспорта данных УРВ

Пример:

Пример из Teamly сохранён дословно, но не является корректным JSON.

{
"No": "1",
"Date_Time": "20.01.2022 09:28:30",
"Zone_control": "ENTRANCE",
"UUID": "3946c020-79f1-11ec-b1c3-fbf99c6062f4",
"User_UUID": "4c98baf0-6256-11ec-ac6c-17a934b10e25",
"User_full_name": "Иванов Иван Иванович",
"Card_code": "6674991",
"Access_point_UUID": "636f6740-79f0-11ec-adad-1363f78032b3",
"Access_point_name": "ТП \"Администрация\"",
"From_zone": "Улица:1:Главное",
"To_zone": "Здание:1:Главное",
"Type": "EXECUTED",
"Reason": "ACCESS PROFILE"
}
{
"No": "2",
"Date_Time": "20.01.2022 17:55:11",
"Zone_control": "EXIT",
"UUID": "2e2ad140-79f1-11ec-b1c3-fbf99c6062f4",
"User_UUID": "4c98baf0-6256-11ec-ac6c-17a934b10e25",
"User_full_name": "Иванов Иван Иванович",
"Card_code": "2305153583",
"Access_point_UUID": "636f6740-79f0-11ec-adad-1363f78032b3",
"Access_point_name": "ТП \"Администрация\"",
"From_zone": "Здание:1:Главное",
"To_zone": "Улица:1:Главное",
"Type": "EXECUTED",
"Reason": "ACCESS PROFILE"
}

Code 404 (Specified configuration was not found) - запрос не выполнен, пользователь не найден

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

Параметры и ответы по OpenAPI
{
"description": "Get time tracking export with specified configuration",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"example": "123e4567-e89b-12d3-a456-426614174000"
},
"description": "Zones export configuration UUID"
},
{
"in": "query",
"name": "from",
"required": false,
"description": "UNIX timestamp to search events from in milliseconds. This parameter overrides period",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
}
},
{
"in": "query",
"name": "to",
"required": false,
"description": "UNIX timestamp to search events to in milliseconds (ignored if 'from' was not specified). If not specified and 'from' does, assumed as now. This parameter overrides period",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
}
},
{
"in": "query",
"name": "format",
"schema": {
"type": "string",
"enum": [
"CSV",
"JSON"
]
},
"required": false,
"description": "Override format parameter from configuration"
}
],
"responses": {
"200": {
"description": "Successfully received export file",
"content": {
"text/csv": {
"schema": {
"type": "string",
"format": "binary"
}
},
"application/json": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "Specified configuration was not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_export/{uuid}" \
-H "Authorization: Bearer <token>"

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

"string"

GET /tt_report/configs

Раздел: Экспорт.

Возвращает все настройки отчетов УРВ

Источник в Teamly

Назначение

URL запроса

Возвращает все настройки отчетов УРВ

https://{IP_контроллера}/api/v1/tt_report/configs

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

Отсутствуют

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

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

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

Тип

Формат

Назначение

uuid*

string

pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID отчета

name*

string

Имя отчета

period*

string

[day, prev_day, week, prev_week, month, prev_month]

Период

format*

string

[ CSV, JSON ]

Формат представления данных

delimeter

string

minLength: 1

Разделитель

outer_zones*

string

Зона:Этаж:Здание

Внешние зоны в формате

inner_zones*

string

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[

Фильтр по сотрудникам

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

string

Список значений справочника

]

from

integer($int64)

UNIX-метка времени в миллисекундах

to

integer($int64)

UNIX-метка времени в миллисекундах

Пример:

Пример из Teamly сохранён дословно, но не является корректным JSON.

[{
uuid* string /pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i
name* string
period* string /Варианты: [day, prev_day, week, prev_week, month, prev_month]
delimeter string /minLength: 1
outer_zones* /Внешние зоны в формате: Зона:Этаж:Здание
[
string
]
inner_zones* /Внутренние зоны в формате: Зона:Этаж:Здание
[
string
]
staff_filter /Фильтры по полям персонала на основе справочников
[
{
prop_name* string /Внутреннее имя поля персонала на основе справочника
prop_values* /Список значений справочника
[
string
]
}]
work_start_time* string /Время начала рабочего дня в формате: HH:mm
work_end_time* string /Время окончания рабочего дня в формате: HH:mm
work_day_length_min* integer /minimum: 1 Длительность рабочего дня в минутах
time_zone_offset integer /Смещение часового пояса в минутах
}]

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

Параметры и ответы по OpenAPI
{
"description": "Returns all time tracking reports configurations",
"parameters": [],
"responses": {
"200": {
"description": "Successfully got all configurations",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"outer_zones",
"inner_zones",
"work_start_time",
"work_end_time",
"work_day_length_min"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"count_time_mode": {
"type": "boolean",
"description": "True means: first entry - last exit scheme, false means: enter - exit scheme"
},
"lunch_break": {
"type": "string",
"description": "Whether to take into account the lunch break"
},
"lunch_break_mode": {
"type": "boolean",
"description": "Lunch break duration in format: HH:mm"
},
"use_zones": {
"type": "boolean",
"description": "Whether to consider zones"
},
"lunch_calc_day_end": {
"type": "boolean",
"description": "Using a lunch break in end-of-work calculations"
},
"work_start_time": {
"type": "string",
"description": "Work start time in format: HH:mm"
},
"work_end_time": {
"type": "string",
"description": "Work end time in format: HH:mm"
},
"work_day_length_min": {
"type": "integer",
"minimum": 1,
"description": "Work day lenght in minutes"
},
"time_zone_offset": {
"type": "integer",
"description": "Time zone offset in minutes"
}
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_report/configs" \
-H "Authorization: Bearer <token>"

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

[
{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 1
}
]

POST /tt_report/configs

Раздел: Экспорт.

Добавляет настройку отчета УРВ

Источник в Teamly

Назначение

URL запроса

Добавляет настройку отчета УРВ

https://{IP_контроллера}/api/v1/tt_report/configs

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

Название

Тип

Описание

config*

object (body)

Тело запроса

BODY

Название

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Имя отчета УРВ

period*

string

[day, prev_day, week, prev_week, month, prev_month]

Период

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

Зона:Этаж:Здание

Внешние зоны

inner_zones*

[string]

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

count_time_mode

boolean

true означает: схема первого входа - схема последнего выхода, false означает: схема входа - схема выхода

Режим учета времени

lunch_break

string

Учет обеденного перерыва

lunch_break_mode

boolean

HH:mm

Продолжительность обеденного перерыва

use_zones

boolean

Учет зон

lunch_calc_day_end

boolean

Учет обеденного перерыва в расчетах по окончании работы

work_start_time*

string

HH:mm

Время начала рабочего дня

work_end_time*

string

HH:mm

Время окончания рабочего дня

work_day_length_min*

integer

minimum: 1

Длительность рабочего дня в минутах

time_zone_offset

integer

Смещение часового пояса в минутах

Пример:

URL запроса: POST
https://{IP_контроллера}/api/v1/tt_report/configs

Body

{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 0
}

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

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

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

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

Code 409 (Configuration already exists) - запрос не выполнен, указанная конфигурация уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Create new configuration",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"outer_zones",
"inner_zones",
"work_start_time",
"work_end_time",
"work_day_length_min"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"count_time_mode": {
"type": "boolean",
"description": "True means: first entry - last exit scheme, false means: enter - exit scheme"
},
"lunch_break": {
"type": "string",
"description": "Whether to take into account the lunch break"
},
"lunch_break_mode": {
"type": "boolean",
"description": "Lunch break duration in format: HH:mm"
},
"use_zones": {
"type": "boolean",
"description": "Whether to consider zones"
},
"lunch_calc_day_end": {
"type": "boolean",
"description": "Using a lunch break in end-of-work calculations"
},
"work_start_time": {
"type": "string",
"description": "Work start time in format: HH:mm"
},
"work_end_time": {
"type": "string",
"description": "Work end time in format: HH:mm"
},
"work_day_length_min": {
"type": "integer",
"minimum": 1,
"description": "Work day lenght in minutes"
},
"time_zone_offset": {
"type": "integer",
"description": "Time zone offset in minutes"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Successfully created new configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Configuration 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/tt_report/configs" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 1
}'

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

{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 1
}

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

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

GET /tt_report/configs/{uuid}

Раздел: Экспорт.

Возвращает настройки конкретного отчета УРВ

Источник в Teamly

Назначение

URL запроса

Возвращает настройки конкретного отчета УРВ

https://{IP_контроллера}/api/v1/tt_report/configs/{uuid}

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

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

Описание

uuid* string($uuid)(path)

UUID настройки отчета УРВ

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

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

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Имя отчета УРВ

period*

string

[day, prev_day, week, prev_week, month, prev_month]

Период

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

Зона:Этаж:Здание

Внешние зоны

inner_zones*

[string]

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

work_start_time*

string

HH:mm

Время начала рабочего дня

work_end_time*

string

HH:mm

Время окончания рабочего дня

work_day_length_min*

integer

minimum: 1

Длительность рабочего дня в минутах

time_zone_offset

integer

Смещение часового пояса в минутах

Пример:

{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 0
}

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

Code 404 (Specified configuration does not exist) - запрос не выполнен, указанная конфигурация не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Get time tracking reports configuration by UUID",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully received configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"outer_zones",
"inner_zones",
"work_start_time",
"work_end_time",
"work_day_length_min"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"count_time_mode": {
"type": "boolean",
"description": "True means: first entry - last exit scheme, false means: enter - exit scheme"
},
"lunch_break": {
"type": "string",
"description": "Whether to take into account the lunch break"
},
"lunch_break_mode": {
"type": "boolean",
"description": "Lunch break duration in format: HH:mm"
},
"use_zones": {
"type": "boolean",
"description": "Whether to consider zones"
},
"lunch_calc_day_end": {
"type": "boolean",
"description": "Using a lunch break in end-of-work calculations"
},
"work_start_time": {
"type": "string",
"description": "Work start time in format: HH:mm"
},
"work_end_time": {
"type": "string",
"description": "Work end time in format: HH:mm"
},
"work_day_length_min": {
"type": "integer",
"minimum": 1,
"description": "Work day lenght in minutes"
},
"time_zone_offset": {
"type": "integer",
"description": "Time zone offset in minutes"
}
}
}
}
}
},
"400": {
"description": "Wrong UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified configuration does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_report/configs/{uuid}" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 1
}

PUT /tt_report/configs/{uuid}

Раздел: Экспорт.

Редактирует существующую настройку отчета УРВ

Источник в Teamly

Назначение

URL запроса

Редактирует существующую настройку отчета УРВ

https://{IP_контроллера}/api/v1/tt_report/configs/{uuid}

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

Название

Тип

Описание

uuid*

config*

string (path)

object (body)

UUID настройки отчета УРВ

Тело запроса

BODY

Название

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

Тип

Формат

Назначение

uuid*

string

pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID настройки отчета УРВ

name*

string

Имя отчета УРВ

period*

string

[day, prev_day, week, prev_week, month, prev_month]

Период

delimeter

string

minLength: 1

";", ",", "\t"

Разделитель для отчетов в формате CSV

outer_zones*

Зона:Этаж:Здание

Внешние зоны

inner_zones*

[string]

Зона:Этаж:Здание

Внутренние зоны

staff_filter

[{

Фильтры по полям персонала на основе справочников

prop_name*

string

Внутреннее имя поля персонала на основе справочника

prop_values*

[string]

Список значений справочника

}]

work_start_time*

string

HH:mm

Время начала рабочего дня

work_end_time*

string

HH:mm

Время окончания рабочего дня

work_day_length_min*

integer

minimum: 1

Длительность рабочего дня в минутах

time_zone_offset

integer

Смещение часового пояса в минутах

Пример:

URL запроса: PUT

https://{IP_контроллера}/api/v1/tt_report/configs/{uuid}

Body

{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 0
}

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

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

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

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

Code 404 (Specified configuration does not exist) - запрос не выполнен, указанная конфигурация не существует

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

Параметры и ответы по OpenAPI
{
"description": "Update existing configuration",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"period",
"outer_zones",
"inner_zones",
"work_start_time",
"work_end_time",
"work_day_length_min"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"period": {
"type": "string",
"enum": [
"day",
"prev_day",
"week",
"prev_week",
"month",
"prev_month"
]
},
"delimeter": {
"type": "string",
"minLength": 1
},
"outer_zones": {
"description": "Zones moving to which is interpreted as exit, from - entrance",
"type": "array",
"items": {
"type": "string"
}
},
"inner_zones": {
"description": "Zones moving to which is interpreted as entrance, from - exit",
"type": "array",
"items": {
"type": "string"
}
},
"staff_filter": {
"description": "Filter staff by some staff properties",
"type": "array",
"items": {
"type": "object",
"required": [
"prop_name",
"prop_values"
],
"properties": {
"prop_name": {
"type": "string",
"description": "property name"
},
"prop_values": {
"description": "Array of acceptable property values",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"count_time_mode": {
"type": "boolean",
"description": "True means: first entry - last exit scheme, false means: enter - exit scheme"
},
"lunch_break": {
"type": "string",
"description": "Whether to take into account the lunch break"
},
"lunch_break_mode": {
"type": "boolean",
"description": "Lunch break duration in format: HH:mm"
},
"use_zones": {
"type": "boolean",
"description": "Whether to consider zones"
},
"lunch_calc_day_end": {
"type": "boolean",
"description": "Using a lunch break in end-of-work calculations"
},
"work_start_time": {
"type": "string",
"description": "Work start time in format: HH:mm"
},
"work_end_time": {
"type": "string",
"description": "Work end time in format: HH:mm"
},
"work_day_length_min": {
"type": "integer",
"minimum": 1,
"description": "Work day lenght in minutes"
},
"time_zone_offset": {
"type": "integer",
"description": "Time zone offset in minutes"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified configuration does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_report/configs/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 1
}'

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

{
"uuid": "string",
"name": "string",
"period": "day",
"delimeter": "string",
"outer_zones": [
"string"
],
"inner_zones": [
"string"
],
"staff_filter": [
{
"prop_name": "string",
"prop_values": [
"string"
]
}
],
"count_time_mode": true,
"lunch_break": "string",
"lunch_break_mode": true,
"use_zones": true,
"lunch_calc_day_end": true,
"work_start_time": "string",
"work_end_time": "string",
"work_day_length_min": 1,
"time_zone_offset": 1
}

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

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

DELETE /tt_report/configs/{uuid}

Раздел: Экспорт.

Удаляет существующую настройку отчета УРВ

Источник в Teamly

Назначение

URL запроса

Удаляет существующую настройку отчета УРВ

https://{IP_контроллера}/api/v1/tt_report/configs/{uuid}

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

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

Описание

uuid* string (path)

UUID настройки экспорта данных УРВ

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

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

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

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

Code 404 (Specified configuration does not exist) - запрос не выполнен, указанная конфигурация не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Delete specified configuration",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted specified configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified configuration does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X DELETE "https://{IP_контроллера}/api/v1/tt_report/configs/{uuid}" \
-H "Authorization: Bearer <token>"

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

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

GET /tt_report/{uuid}

Раздел: Экспорт.

Формирует отчет учета рабочего времени по указанной конфигурации.

Параметры и ответы по OpenAPI
{
"description": "Get time tracking report export with specified configuration",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"example": "123e4567-e89b-12d3-a456-426614174000"
},
"description": "Zones export configuration UUID"
},
{
"in": "query",
"name": "from",
"required": false,
"description": "UNIX timestamp to search events from in milliseconds. This parameter overrides period",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
}
},
{
"in": "query",
"name": "to",
"required": false,
"description": "UNIX timestamp to search events to in milliseconds (ignored if 'from' was not specified). If not specified and 'from' does, assumed as now. This parameter overrides period",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
}
}
],
"responses": {
"200": {
"description": "Successfully received export file",
"content": {
"text/csv": {
"schema": {
"type": "string",
"format": "binary"
}
},
"application/json": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "Specified configuration was not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/tt_report/{uuid}" \
-H "Authorization: Bearer <token>"

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

"string"