106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
swagger: '2.0'
|
|
|
|
info:
|
|
title: Call-me API
|
|
description: API description for external applications that integrates with Call-me.
|
|
version: 1.0.1
|
|
|
|
basePath: /api/v1
|
|
|
|
schemes:
|
|
- https
|
|
- http
|
|
|
|
paths:
|
|
/users:
|
|
get:
|
|
tags:
|
|
- 'users'
|
|
summary: 'Connected users'
|
|
description: 'Get all connected users'
|
|
consumes:
|
|
- 'application/json'
|
|
produces:
|
|
- 'application/json'
|
|
security:
|
|
- secretApiKey: []
|
|
responses:
|
|
'200':
|
|
description: 'Connected users'
|
|
schema:
|
|
$ref: '#/definitions/UsersResponse'
|
|
'403':
|
|
description: 'Unauthorized!'
|
|
|
|
/connected:
|
|
get:
|
|
tags:
|
|
- 'connected'
|
|
summary: 'Connected users to call'
|
|
description: 'Retrieve all connected users to call'
|
|
parameters:
|
|
- name: user
|
|
in: path
|
|
description: 'Username of the requesting user'
|
|
required: true
|
|
type: string
|
|
consumes:
|
|
- 'application/json'
|
|
produces:
|
|
- 'application/json'
|
|
security:
|
|
- secretApiKey: []
|
|
responses:
|
|
'200':
|
|
description: 'Connected users to call'
|
|
schema:
|
|
$ref: '#/definitions/connectedResponse'
|
|
'403':
|
|
description: 'Unauthorized!'
|
|
|
|
/vapidPublicKey:
|
|
get:
|
|
tags:
|
|
- 'push'
|
|
summary: 'Get VAPID public key'
|
|
description: 'Get the VAPID public key for Web Push subscription'
|
|
produces:
|
|
- 'application/json'
|
|
responses:
|
|
'200':
|
|
description: 'VAPID public key'
|
|
schema:
|
|
$ref: '#/definitions/VapidPublicKeyResponse'
|
|
|
|
securityDefinitions:
|
|
secretApiKey:
|
|
type: 'apiKey'
|
|
name: 'authorization'
|
|
in: 'header'
|
|
description: 'Format like this: authorization: {API_KEY_SECRET}'
|
|
|
|
definitions:
|
|
UsersResponse:
|
|
type: 'object'
|
|
properties:
|
|
users:
|
|
type: 'array'
|
|
example: ['call-me', 'miro']
|
|
|
|
connectedResponse:
|
|
type: 'object'
|
|
properties:
|
|
connected:
|
|
type: array
|
|
example: ['https://your.domain/join?user=call-me&call=miro']
|
|
|
|
VapidPublicKeyResponse:
|
|
type: 'object'
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
example: true
|
|
vapidPublicKey:
|
|
type: string
|
|
example: 'BEl62iUYgUivxIkv69yViEuiBIa-Ib9-SkvMeAtA3LFgDzkPs-aP9IKV5O1BamVfGPpxtSkgUc_bUz41MXd8Aww'
|