Реализованы сервисы ВМ2 - проверка сообщений и синхронизация с Б24 (деплой еще без перевода в боевой режим)
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: HAN Bitrix Sync
|
||||
version: 0.1.0
|
||||
paths:
|
||||
/health/live:
|
||||
get:
|
||||
operationId: healthLive
|
||||
responses:
|
||||
"200":
|
||||
description: Process is alive
|
||||
/health/ready:
|
||||
get:
|
||||
operationId: healthReady
|
||||
responses:
|
||||
"200":
|
||||
description: Full-mode configuration and database are ready
|
||||
"503":
|
||||
description: Disabled or a core dependency is not ready
|
||||
/internal/sync/v1/status:
|
||||
get:
|
||||
operationId: syncStatus
|
||||
security:
|
||||
- bearerAuth: []
|
||||
responses:
|
||||
"200":
|
||||
description: Low-cardinality operational status without PII
|
||||
"401":
|
||||
description: Missing or invalid service token
|
||||
/bitrix/sync/webhook/contact:
|
||||
post:
|
||||
operationId: receiveContactRobot
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/ReceiverToken"
|
||||
- $ref: "#/components/parameters/EntityId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RobotForm"
|
||||
responses:
|
||||
"202":
|
||||
description: Event durably stored
|
||||
"400":
|
||||
description: Malformed robot contract
|
||||
"403":
|
||||
description: Receiver authentication rejected
|
||||
"413":
|
||||
description: Body too large
|
||||
"503":
|
||||
description: Sync is disabled
|
||||
/bitrix/sync/webhook/alert:
|
||||
post:
|
||||
operationId: receiveAlertRobot
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/ReceiverToken"
|
||||
- $ref: "#/components/parameters/EntityId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: "#/components/schemas/RobotForm"
|
||||
responses:
|
||||
"202":
|
||||
description: Event durably stored
|
||||
"400":
|
||||
description: Malformed robot contract
|
||||
"403":
|
||||
description: Receiver authentication rejected
|
||||
"413":
|
||||
description: Body too large
|
||||
"503":
|
||||
description: Sync is disabled
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
type: http
|
||||
scheme: bearer
|
||||
parameters:
|
||||
ReceiverToken:
|
||||
name: token
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
maxLength: 256
|
||||
description: Secret receiver token; MUST be excluded from logs and traces.
|
||||
EntityId:
|
||||
name: ID
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
pattern: "^[1-9][0-9]{0,19}$"
|
||||
schemas:
|
||||
RobotForm:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- document_id[0]
|
||||
- document_id[1]
|
||||
- document_id[2]
|
||||
- auth[domain]
|
||||
- auth[member_id]
|
||||
properties:
|
||||
document_id[0]:
|
||||
type: string
|
||||
document_id[1]:
|
||||
type: string
|
||||
document_id[2]:
|
||||
type: string
|
||||
auth[domain]:
|
||||
type: string
|
||||
auth[member_id]:
|
||||
type: string
|
||||
auth[client_endpoint]:
|
||||
type: string
|
||||
auth[server_endpoint]:
|
||||
type: string
|
||||
Reference in New Issue
Block a user