2021-04-30 17:35:35 +05:00
{
"openapi" : "3.0.1" ,
"info" : {
"title" : "ASB cloud web api" ,
"version" : "v1"
} ,
"paths" : {
"/auth/login" : {
"post" : {
"tags" : [
"Auth"
] ,
"summary" : "Аутентификация пользователя" ,
"operationId" : "Login" ,
"requestBody" : {
"description" : "" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/AuthDto"
}
} ,
"text/json" : {
"schema" : {
"$ref" : "#/components/schemas/AuthDto"
}
} ,
"application/*+json" : {
"schema" : {
"$ref" : "#/components/schemas/AuthDto"
}
}
}
} ,
"responses" : {
"200" : {
"description" : "новый токен" ,
"content" : {
"text/plain" : {
"schema" : {
"$ref" : "#/components/schemas/UserTokenDto"
}
} ,
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/UserTokenDto"
}
} ,
"text/json" : {
"schema" : {
"$ref" : "#/components/schemas/UserTokenDto"
}
}
}
} ,
"400" : {
"description" : "логин и пароль не подходят"
}
}
}
} ,
"/auth/refresh" : {
"get" : {
"tags" : [
"Auth"
] ,
"summary" : "Продление срока действия токена" ,
"operationId" : "Refresh" ,
"responses" : {
"200" : {
"description" : "Success"
}
}
}
} ,
2021-07-27 14:43:30 +05:00
"/api/well/{idWell}/data" : {
2021-04-30 17:35:35 +05:00
"get" : {
"tags" : [
"Data"
] ,
"summary" : "Возвращает данные САУБ по скважине.\r\nПо умолчанию за последние 10 минут." ,
"operationId" : "GetData" ,
"parameters" : [
{
2021-07-27 14:43:30 +05:00
"name" : "idWell" ,
2021-04-30 17:35:35 +05:00
"in" : "path" ,
"required" : true ,
"description" : "id скважины" ,
"schema" : {
"type" : "integer" ,
"format" : "int32"
}
} ,
{
"name" : "begin" ,
"in" : "query" ,
"description" : "дата начала выборки. По умолчанию: текущее время - intervalSec" ,
"schema" : {
"type" : "string" ,
"format" : "date-time"
}
} ,
{
"name" : "intervalSec" ,
"in" : "query" ,
"description" : "интервал времени даты начала выборки, секунды" ,
"schema" : {
"type" : "integer" ,
"format" : "int32" ,
"default" : 600
}
} ,
{
"name" : "approxPointsCount" ,
"in" : "query" ,
"description" : "желаемое количество точек. Если в выборке точек будет больше, то выборка будет прорежена." ,
"schema" : {
"type" : "integer" ,
"format" : "int32" ,
"default" : 1024
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/DataSaubBaseDto"
}
}
} ,
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/DataSaubBaseDto"
}
}
} ,
"text/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/DataSaubBaseDto"
}
}
}
}
}
}
}
} ,
2021-07-27 14:43:30 +05:00
"/api/well/{idWell}/message" : {
2021-04-30 17:35:35 +05:00
"get" : {
"tags" : [
"Message"
] ,
"summary" : "Выдает список сообщений по скважине" ,
"operationId" : "GetMessage" ,
"parameters" : [
{
2021-07-27 14:43:30 +05:00
"name" : "idWell" ,
2021-04-30 17:35:35 +05:00
"in" : "path" ,
"required" : true ,
"description" : "id скважины" ,
"schema" : {
"type" : "integer" ,
"format" : "int32"
}
} ,
{
"name" : "skip" ,
"in" : "query" ,
"description" : "для пагинации кол-во записей пропустить" ,
"schema" : {
"type" : "integer" ,
"format" : "int32" ,
"default" : 0
}
} ,
{
"name" : "take" ,
"in" : "query" ,
"description" : "для пагинации кол-во записей" ,
"schema" : {
"type" : "integer" ,
"format" : "int32" ,
"default" : 32
}
} ,
{
"name" : "categoryids" ,
"in" : "query" ,
"description" : "список категорий" ,
"schema" : {
"type" : "array" ,
"items" : {
"type" : "integer" ,
"format" : "int32"
}
}
} ,
{
"name" : "begin" ,
"in" : "query" ,
"description" : "дата начала" ,
"schema" : {
"type" : "string" ,
"format" : "date-time"
}
} ,
{
"name" : "end" ,
"in" : "query" ,
"description" : "окончание" ,
"schema" : {
"type" : "string" ,
"format" : "date-time"
}
}
] ,
"responses" : {
"200" : {
"description" : "Success" ,
"content" : {
"text/plain" : {
"schema" : {
"$ref" : "#/components/schemas/MessageDtoPaginationContainer"
}
} ,
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/MessageDtoPaginationContainer"
}
} ,
"text/json" : {
"schema" : {
"$ref" : "#/components/schemas/MessageDtoPaginationContainer"
}
}
}
}
}
}
} ,
"/api/telemetry/{uid}/info" : {
"post" : {
"tags" : [
"Telemetry"
] ,
"summary" : "Принимает общую информацию по скважине" ,
"operationId" : "PostInfo" ,
"parameters" : [
{
"name" : "uid" ,
"in" : "path" ,
"required" : true ,
"description" : "Уникальный идентификатор отправителя" ,
"schema" : {
"type" : "string"
}
}
] ,
"requestBody" : {
"description" : "нформация о б отправителе" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/TelemetryInfoDto"
}
} ,
"text/json" : {
"schema" : {
"$ref" : "#/components/schemas/TelemetryInfoDto"
}
} ,
"application/*+json" : {
"schema" : {
"$ref" : "#/components/schemas/TelemetryInfoDto"
}
}
}
} ,
"responses" : {
"200" : {
"description" : "Success"
}
}
}
} ,
"/api/telemetry/{uid}/data" : {
"post" : {
"tags" : [
"Telemetry"
] ,
"summary" : "Принимает данные от разных систем по скважине" ,
"operationId" : "PostData" ,
"parameters" : [
{
"name" : "uid" ,
"in" : "path" ,
"required" : true ,
"description" : "Уникальный идентификатор отправителя" ,
"schema" : {
"type" : "string"
}
}
] ,
"requestBody" : {
"description" : "Данные" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/DataSaubBaseDto"
}
}
} ,
"text/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/DataSaubBaseDto"
}
}
} ,
"application/*+json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/DataSaubBaseDto"
}
}
}
}
} ,
"responses" : {
"200" : {
"description" : "Success"
}
}
}
} ,
"/api/telemetry/{uid}/message" : {
"post" : {
"tags" : [
"Telemetry"
] ,
"summary" : "Принимает список новых сообщений от телеметрии" ,
"operationId" : "PostMessages" ,
"parameters" : [
{
"name" : "uid" ,
"in" : "path" ,
"required" : true ,
"description" : "Уникальный идентификатор отправителя" ,
"schema" : {
"type" : "string"
}
}
] ,
"requestBody" : {
"description" : "сообщения" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/TelemetryMessageDto"
}
}
} ,
"text/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/TelemetryMessageDto"
}
}
} ,
"application/*+json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/TelemetryMessageDto"
}
}
}
}
} ,
"responses" : {
"200" : {
"description" : "Success"
}
}
}
} ,
"/api/telemetry/{uid}/event" : {
"post" : {
"tags" : [
"Telemetry"
] ,
"summary" : "Принимает справочник событий" ,
"operationId" : "PostEvents" ,
"parameters" : [
{
"name" : "uid" ,
"in" : "path" ,
"required" : true ,
"description" : "Уникальный идентификатор отправителя" ,
"schema" : {
"type" : "string"
}
}
] ,
"requestBody" : {
"description" : "справочник событий" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/EventDto"
}
}
} ,
"text/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/EventDto"
}
}
} ,
"application/*+json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/EventDto"
}
}
}
}
} ,
"responses" : {
"200" : {
"description" : "Success"
}
}
}
} ,
"/api/telemetry/{uid}/user" : {
"post" : {
"tags" : [
"Telemetry"
] ,
"summary" : "Принимает справочник пользователей телеметрии" ,
"operationId" : "PostUsers" ,
"parameters" : [
{
"name" : "uid" ,
"in" : "path" ,
"required" : true ,
"description" : "Уникальный идентификатор отправителя" ,
"schema" : {
"type" : "string"
}
}
] ,
"requestBody" : {
"description" : "справочник пользователей телеметрии" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/TelemetryUserDto"
}
}
} ,
"text/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/TelemetryUserDto"
}
}
} ,
"application/*+json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/TelemetryUserDto"
}
}
}
}
} ,
"responses" : {
"200" : {
"description" : "Success"
}
}
}
} ,
"/api/well" : {
"get" : {
"tags" : [
"Well"
] ,
"operationId" : "GetWells" ,
"responses" : {
"200" : {
"description" : "Success" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/WellDto"
}
}
} ,
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/WellDto"
}
}
} ,
"text/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/WellDto"
}
}
}
}
}
}
}
}
} ,
"components" : {
"schemas" : {
"AuthDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"login" : {
"type" : "string" ,
"nullable" : true
} ,
"password" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
"DataSaubBaseDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"date" : {
"type" : "string" ,
"format" : "date-time"
} ,
"mode" : {
"type" : "integer" ,
"format" : "int32" ,
"nullable" : true
} ,
"user" : {
"type" : "string" ,
"nullable" : true
} ,
"wellDepth" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"bitDepth" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockPosition" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockPositionMin" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockPositionMax" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockSpeed" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockSpeedSp" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockSpeedSpRotor" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockSpeedSpSlide" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"blockSpeedSpDevelop" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressure" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressureIdle" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressureSp" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressureSpRotor" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressureSpSlide" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressureSpDevelop" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"pressureDeltaLimitMax" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"axialLoad" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"axialLoadSp" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"axialLoadLimitMax" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"hookWeight" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"hookWeightIdle" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"hookWeightLimitMin" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"hookWeightLimitMax" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"rotorTorque" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"rotorTorqueIdle" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"rotorTorqueSp" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"rotorTorqueLimitMax" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"rotorSpeed" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"flow" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"flowIdle" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
} ,
"flowDeltaLimitMax" : {
"type" : "number" ,
"format" : "double" ,
"nullable" : true
}
}
} ,
"EventDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "integer" ,
"format" : "int32"
} ,
"message" : {
"type" : "string" ,
"nullable" : true
} ,
"idCategory" : {
"type" : "integer" ,
"format" : "int32"
} ,
"tag" : {
"type" : "string" ,
"nullable" : true
} ,
"eventType" : {
"type" : "integer" ,
"format" : "int32"
} ,
"idSound" : {
"type" : "integer" ,
"format" : "int32"
}
}
} ,
"MessageDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "integer" ,
"format" : "int32"
} ,
"date" : {
"type" : "string" ,
"format" : "date-time"
} ,
"categoryId" : {
"type" : "integer" ,
"format" : "int32"
} ,
"user" : {
"type" : "string" ,
"nullable" : true
} ,
"message" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
"MessageDtoPaginationContainer" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"skip" : {
"type" : "integer" ,
"format" : "int32"
} ,
"take" : {
"type" : "integer" ,
"format" : "int32"
} ,
"count" : {
"type" : "integer" ,
"format" : "int32"
} ,
"items" : {
"type" : "array" ,
"nullable" : true ,
"items" : {
"$ref" : "#/components/schemas/MessageDto"
}
}
}
} ,
"TelemetryInfoDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"date" : {
"type" : "string" ,
"format" : "date-time"
} ,
"timeZoneId" : {
"type" : "string" ,
"nullable" : true
} ,
"timeZoneOffsetTotalHours" : {
"type" : "number" ,
"format" : "double"
} ,
"caption" : {
"type" : "string" ,
"nullable" : true
} ,
"cluster" : {
"type" : "string" ,
"nullable" : true
} ,
"deposit" : {
"type" : "string" ,
"nullable" : true
} ,
"hmiVersion" : {
"type" : "string" ,
"nullable" : true
} ,
"plcVersion" : {
"type" : "string" ,
"nullable" : true
} ,
"comment" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
"TelemetryMessageDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "integer" ,
"format" : "int32"
} ,
"date" : {
"type" : "string" ,
"format" : "date-time"
} ,
"idEvent" : {
"type" : "integer" ,
"format" : "int32"
} ,
"state" : {
"type" : "integer" ,
"format" : "int32" ,
"nullable" : true
} ,
"idTelemetryUser" : {
"type" : "integer" ,
"format" : "int32" ,
"nullable" : true
} ,
"arg0" : {
"type" : "string" ,
"nullable" : true
} ,
"arg1" : {
"type" : "string" ,
"nullable" : true
} ,
"arg2" : {
"type" : "string" ,
"nullable" : true
} ,
"arg3" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
"TelemetryUserDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"id" : {
"type" : "integer" ,
"format" : "int32"
} ,
"name" : {
"type" : "string" ,
"nullable" : true
} ,
"surname" : {
"type" : "string" ,
"nullable" : true
} ,
"patronymic" : {
"type" : "string" ,
"nullable" : true
} ,
"level" : {
"type" : "integer" ,
"format" : "int32"
}
}
} ,
"UserTokenDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"login" : {
"type" : "string" ,
"nullable" : true
} ,
"level" : {
"type" : "integer" ,
"format" : "int32" ,
"nullable" : true
} ,
"name" : {
"type" : "string" ,
"nullable" : true
} ,
"surname" : {
"type" : "string" ,
"nullable" : true
} ,
"patronymic" : {
"type" : "string" ,
"nullable" : true
} ,
"id" : {
"type" : "integer" ,
"format" : "int32"
} ,
"customerName" : {
"type" : "string" ,
"nullable" : true
} ,
"roleName" : {
"type" : "string" ,
"nullable" : true
} ,
"token" : {
"type" : "string" ,
"nullable" : true
}
}
} ,
"WellDto" : {
"type" : "object" ,
"additionalProperties" : false ,
"properties" : {
"caption" : {
"type" : "string" ,
"nullable" : true
} ,
"cluster" : {
"type" : "string" ,
"nullable" : true
} ,
"deposit" : {
"type" : "string" ,
"nullable" : true
} ,
"id" : {
"type" : "integer" ,
"format" : "int32"
} ,
"lastData" : {
"nullable" : true
}
}
}
} ,
"securitySchemes" : {
"Bearer" : {
"type" : "apiKey" ,
"description" : "JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token in the text input below. Example: 'Bearer 12345abcdef'" ,
"name" : "Authorization" ,
"in" : "header"
}
}
} ,
"security" : [
{
"Bearer" : [ ]
}
]
}