Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
381 changes: 381 additions & 0 deletions api-docs/api-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,381 @@
openapi: 3.0.1
info:
title: UCI Inbound
description: UCI Inbound Api Documentation
termsOfService: http://swagger.io/terms/
license:
name: Apache 2.0
url: http://springdoc.org
version: "1.0"
servers:
- url: http://localhost:8085
description: Generated server url
paths:
/netcore/whatsApp:
post:
tags:
- Netcore Apis
summary: Send message to kafka topic via netcore whatsapp service
description: This API is used to get send message to inbound kafka topic received
from netcore whatsapp service.
operationId: netcoreWhatsApp
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NetcoreMessageFormat'
examples:
Text Message:
description: Request body for text messages
value:
messages:
- message_id: ABEGkZlgQyWAAgo-sDVSUOa9jH0z
from: "919960432580"
received_at: "1567090835"
context:
ncmessage_id: null
message_id: null
message_type: TEXT
text_type:
text: Hi UCI
required: true
responses:
"200":
description: OK!
/gupshup/whatsApp:
post:
tags:
- Gupshup Apis
summary: Send message to kafka topic via gupshup whatsapp service
description: This API is used to get send message to inbound kafka topic received
from gupshup whatsapp service.
operationId: gupshupWhatsApp
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/GSWhatsAppMessage'
responses:
"200":
description: OK!
/service/health/kafka:
get:
tags:
- Services Health Api
summary: Get Kafka Health
description: This API is used to get kafka health status
operationId: kafkaStatusCheck
responses:
"200":
description: OK!
content:
application/json:
schema:
$ref: '#/components/schemas/ComponentHealthApiExample'
/service/health/cassandra:
get:
tags:
- Services Health Api
summary: Get Cassandra Health
description: This API is used to get cassandra health status
operationId: cassandraStatusCheck
responses:
"200":
description: OK!
content:
application/json:
schema:
$ref: '#/components/schemas/ComponentHealthApiExample'
/service/health/campaign:
get:
tags:
- Services Health Api
summary: Get Campaign Health
description: This API is used to get campaign health status
operationId: campaignUrlStatusCheck
responses:
"200":
description: OK!
content:
application/json:
schema:
$ref: '#/components/schemas/ComponentHealthApiExample'
/health:
get:
tags:
- System Health Apis
summary: Get System Health
description: |-
This API is used to get system health. It included health of two components.
- Kafka
- Cassandra
operationId: statusCheck
responses:
"200":
description: OK!
content:
application/json:
schema:
$ref: '#/components/schemas/SystemHealthApiExample'
/campaign/start:
get:
tags:
- Campaign Apis
summary: Start Campaign
description: This API is used to start the campaign kafka topic.- The fields
marked with an asterisk (*) are mandatory. They cannot be null or empty.
operationId: startCampaign
parameters:
- name: campaignId
in: query
required: true
schema:
type: string
responses:
"200":
description: OK
/campaign/resume:
get:
tags:
- Campaign Apis
summary: Resume Campaign
description: This API is used to start campaign kafka topic.
operationId: resumeCampaign
parameters:
- name: campaignId
in: query
required: true
schema:
type: string
responses:
"200":
description: OK
/campaign/pause:
get:
tags:
- Campaign Apis
summary: Pause Campaign
description: This API is used to pause the campaign kafka topic.
operationId: pauseCampaign
parameters:
- name: campaignId
in: query
required: true
schema:
type: string
responses:
"200":
description: OK
components:
schemas:
MessageContext:
type: object
properties:
ncmessage_id:
type: string
message_id:
type: string
NetcoreInboundFile:
type: object
properties:
mime_type:
type: string
signature:
type: string
url:
type: string
caption:
type: string
NetcoreMessageFormat:
type: object
properties:
messages:
type: array
items:
$ref: '#/components/schemas/NetcoreWhatsAppMessage'
NetcoreWhatsAppMessage:
type: object
properties:
waNumber:
type: string
mobile:
type: string
replyId:
type: string
messageId:
type: string
timestamp:
type: string
name:
type: string
version:
type: integer
format: int32
type:
type: string
text:
$ref: '#/components/schemas/TextType'
eventType:
type: string
context:
$ref: '#/components/schemas/MessageContext'
statusRemark:
type: string
source:
type: string
image:
$ref: '#/components/schemas/NetcoreInboundFile'
document:
$ref: '#/components/schemas/NetcoreInboundFile'
voice:
$ref: '#/components/schemas/NetcoreInboundFile'
audio:
$ref: '#/components/schemas/NetcoreInboundFile'
video:
$ref: '#/components/schemas/NetcoreInboundFile'
location:
type: string
response:
type: string
extra:
type: string
app:
type: string
TextType:
type: object
properties:
text:
type: string
GSWhatsAppMessage:
type: object
properties:
waNumber:
type: string
mobile:
type: string
replyId:
type: string
messageId:
type: string
timestamp:
type: integer
format: int64
name:
type: string
version:
type: integer
format: int32
type:
type: string
text:
type: string
image:
$ref: '#/components/schemas/WAInboundFile'
document:
$ref: '#/components/schemas/WAInboundFile'
voice:
$ref: '#/components/schemas/WAInboundFile'
audio:
$ref: '#/components/schemas/WAInboundFile'
video:
$ref: '#/components/schemas/WAInboundFile'
location:
type: string
response:
type: string
extra:
type: string
app:
type: string
WAInboundFile:
type: object
properties:
mime_type:
type: string
signature:
type: string
url:
type: string
caption:
type: string
ComponentHealthApiExample:
type: object
properties:
id:
type: string
example: api.content.health
ver:
type: string
example: "3.0"
ts:
type: string
example: 2021-09-01T11:14:50Z
params:
$ref: '#/components/schemas/HealthApiParamsParameter'
responseCode:
type: string
example: OK
result:
$ref: '#/components/schemas/ComponentHealthApiResultParameter'
ComponentHealthApiResultParameter:
type: object
properties:
healthy:
type: boolean
example: true
HealthApiParamsParameter:
type: object
properties:
resmsgid:
type: string
example: 859fee0c-94d6-4a0d-b786-2025d763b78a
msgid:
type: string
example: "null"
err:
type: string
example: "null"
status:
type: string
example: Successful
errmsg:
type: string
example: "null"
HealthApiChecksParameter:
type: object
properties:
name:
type: string
example: Cassandra
healthy:
type: boolean
example: true
HealthApiResultParameter:
type: object
properties:
checks:
type: array
items:
$ref: '#/components/schemas/HealthApiChecksParameter'
healthy:
type: boolean
example: true
SystemHealthApiExample:
type: object
properties:
id:
type: string
example: api.content.health
ver:
type: string
example: "3.0"
ts:
type: string
example: 2021-09-01T11:14:50Z
params:
$ref: '#/components/schemas/HealthApiParamsParameter'
responseCode:
type: string
example: OK
result:
$ref: '#/components/schemas/HealthApiResultParameter'
Loading