api_v1.4/hub_api/docs/openapi-specs.yml

92 lines
2.4 KiB
YAML
Raw Normal View History

info:
2023-01-23 12:29:41 -05:00
title: CERC API Swagger - OpenAPI 3.0
description: NextGen Cities Institute API
termsOfService: http://swagger.io/terms/
contact:
2023-02-13 08:09:48 -05:00
email: peteryefi@gmail.com
version: 1.4
externalDocs:
description: Find out more about Swagger
url: http://swagger.io
paths:
2023-01-24 05:38:45 -05:00
/v1.4/uptime:
get:
2023-02-13 08:09:48 -05:00
parameters:
[]
2023-01-24 05:38:45 -05:00
tags:
- Uptime
summary: API uptime
operationId: uptime
description: Retrieve current API uptime
responses:
'200':
description: Request sucessful
content:
application/json:
schema:
$ref: '#/components/schemas/uptime'
/v1.4/session/start:
put:
parameters:
- in: header
name: username
schema:
type: string
required: true
description: the application username accessing this API
- in: header
name: password
schema:
type: string
required: true
description: the password for the user accessing this API
- in: header
name: application_id
schema:
type: string
required: true
description: the Id of the application accessing this API
tags:
- Session start
summary: Starts an user session
operationId: session_start
description: Authenticate and initialize an user session in the api
responses:
'200':
description: Authorized
content:
application/json:
schema:
$ref: '#/components/schemas/authorized'
'403':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/unauthorized'
components:
schemas:
uptime:
type: object
properties:
uptime:
type: string
format: hh:mm:ss.ms
example: "00:09:53.600281"
authorized:
type: object
properties:
session_id:
type: string
format: uuid
example: "ad0720ed-0f31-4f3e-9686-1177d4624ec1"
token:
type: string
format: uuid
example: "660d1aa0-d24f-4cb1-902d-13c7bd29793c"
unauthorized:
type: object
properties:
error:
type: string
example: "unauthorized"