mirror of
https://github.com/openziti/zrok.git
synced 2024-12-23 23:29:22 +01:00
413 lines
7.9 KiB
YAML
413 lines
7.9 KiB
YAML
info:
|
|
description: zrok client access
|
|
title: zrok
|
|
version: 1.0.0
|
|
|
|
basePath: /api/v1
|
|
|
|
securityDefinitions:
|
|
key:
|
|
type: apiKey
|
|
in: header
|
|
name: x-token
|
|
|
|
paths:
|
|
#
|
|
# identity
|
|
#
|
|
/account:
|
|
post:
|
|
tags:
|
|
- identity
|
|
operationId: createAccount
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/accountRequest"
|
|
responses:
|
|
201:
|
|
description: account created
|
|
400:
|
|
description: account not created (already exists)
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
|
|
/enable:
|
|
post:
|
|
tags:
|
|
- identity
|
|
security:
|
|
- key: []
|
|
operationId: enable
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/enableRequest"
|
|
responses:
|
|
201:
|
|
description: environment enabled
|
|
schema:
|
|
$ref: "#/definitions/enableResponse"
|
|
401:
|
|
description: invalid api key
|
|
404:
|
|
description: account not found
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
|
|
/disable:
|
|
post:
|
|
tags:
|
|
- identity
|
|
security:
|
|
- key: []
|
|
operationId: disable
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/disableRequest"
|
|
responses:
|
|
200:
|
|
description: environment disabled
|
|
401:
|
|
description: invalid environment
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
|
|
/login:
|
|
post:
|
|
tags:
|
|
- identity
|
|
operationId: login
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/loginRequest"
|
|
responses:
|
|
200:
|
|
description: login successful
|
|
schema:
|
|
$ref: "#/definitions/loginResponse"
|
|
401:
|
|
description: invalid login
|
|
|
|
/register:
|
|
post:
|
|
tags:
|
|
- identity
|
|
operationId: register
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/registerRequest"
|
|
responses:
|
|
200:
|
|
description: account created
|
|
schema:
|
|
$ref: "#/definitions/registerResponse"
|
|
404:
|
|
description: request not found
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
|
|
/verify:
|
|
post:
|
|
tags:
|
|
- identity
|
|
operationId: verify
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/verifyRequest"
|
|
responses:
|
|
200:
|
|
description: token ready
|
|
schema:
|
|
$ref: "#/definitions/verifyResponse"
|
|
404:
|
|
description: token not found
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
#
|
|
# metadata
|
|
#
|
|
/overview:
|
|
get:
|
|
tags:
|
|
- metadata
|
|
security:
|
|
- key: []
|
|
operationId: overview
|
|
responses:
|
|
200:
|
|
description: overview returned
|
|
schema:
|
|
$ref: "#/definitions/environmentServicesList"
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
|
|
/version:
|
|
get:
|
|
tags:
|
|
- metadata
|
|
operationId: version
|
|
responses:
|
|
200:
|
|
description: current server version
|
|
schema:
|
|
$ref: "#/definitions/version"
|
|
#
|
|
# tunnel
|
|
#
|
|
/tunnel:
|
|
post:
|
|
tags:
|
|
- tunnel
|
|
security:
|
|
- key: []
|
|
operationId: tunnel
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/tunnelRequest"
|
|
responses:
|
|
201:
|
|
description: tunnel created
|
|
schema:
|
|
$ref: "#/definitions/tunnelResponse"
|
|
401:
|
|
description: invalid environment identity
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
/untunnel:
|
|
delete:
|
|
tags:
|
|
- tunnel
|
|
security:
|
|
- key: []
|
|
operationId: untunnel
|
|
parameters:
|
|
- name: body
|
|
in: body
|
|
schema:
|
|
$ref: "#/definitions/untunnelRequest"
|
|
responses:
|
|
200:
|
|
description: tunnel removed
|
|
404:
|
|
description: not found
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
500:
|
|
description: internal server error
|
|
schema:
|
|
$ref: "#/definitions/errorMessage"
|
|
|
|
definitions:
|
|
accountRequest:
|
|
type: object
|
|
properties:
|
|
email:
|
|
type: string
|
|
|
|
authUser:
|
|
type: object
|
|
properties:
|
|
username:
|
|
type: string
|
|
password:
|
|
type: string
|
|
|
|
enableRequest:
|
|
type: object
|
|
properties:
|
|
description:
|
|
type: string
|
|
host:
|
|
type: string
|
|
enableResponse:
|
|
type: object
|
|
properties:
|
|
identity:
|
|
type: string
|
|
cfg:
|
|
type: string
|
|
|
|
disableRequest:
|
|
type: object
|
|
properties:
|
|
identity:
|
|
type: string
|
|
|
|
environments:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/environment"
|
|
environment:
|
|
type: object
|
|
properties:
|
|
description:
|
|
type: string
|
|
host:
|
|
type: string
|
|
address:
|
|
type: string
|
|
zId:
|
|
type: string
|
|
active:
|
|
type: boolean
|
|
createdAt:
|
|
type: integer
|
|
updatedAt:
|
|
type: integer
|
|
|
|
environmentServicesList:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/environmentServices"
|
|
environmentServices:
|
|
type: object
|
|
properties:
|
|
environment:
|
|
$ref: "#/definitions/environment"
|
|
services:
|
|
$ref: "#/definitions/services"
|
|
|
|
errorMessage:
|
|
type: string
|
|
|
|
loginRequest:
|
|
type: object
|
|
properties:
|
|
email:
|
|
type: string
|
|
password:
|
|
type: string
|
|
loginResponse:
|
|
type: string
|
|
|
|
principal:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
email:
|
|
type: string
|
|
token:
|
|
type: string
|
|
|
|
registerRequest:
|
|
type: object
|
|
properties:
|
|
token:
|
|
type: string
|
|
password:
|
|
type: string
|
|
registerResponse:
|
|
type: object
|
|
properties:
|
|
token:
|
|
type: string
|
|
|
|
services:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/service"
|
|
service:
|
|
type: object
|
|
properties:
|
|
zId:
|
|
type: string
|
|
name:
|
|
type: string
|
|
frontend:
|
|
type: string
|
|
backend:
|
|
type: string
|
|
metrics:
|
|
$ref: "#/definitions/serviceMetrics"
|
|
createdAt:
|
|
type: integer
|
|
updatedAt:
|
|
type: integer
|
|
|
|
serviceMetrics:
|
|
type: array
|
|
items:
|
|
type: integer
|
|
|
|
tunnelRequest:
|
|
type: object
|
|
properties:
|
|
zId:
|
|
type: string
|
|
endpoint:
|
|
type: string
|
|
authScheme:
|
|
type: string
|
|
authUsers:
|
|
type: array
|
|
items:
|
|
$ref: "#/definitions/authUser"
|
|
tunnelResponse:
|
|
type: object
|
|
properties:
|
|
proxyEndpoint:
|
|
type: string
|
|
svcName:
|
|
type: string
|
|
|
|
untunnelRequest:
|
|
type: object
|
|
properties:
|
|
zId:
|
|
type: string
|
|
svcName:
|
|
type: string
|
|
|
|
verifyRequest:
|
|
type: object
|
|
properties:
|
|
token:
|
|
type: string
|
|
verifyResponse:
|
|
type: object
|
|
properties:
|
|
email:
|
|
type: string
|
|
|
|
version:
|
|
type: string
|
|
|
|
produces:
|
|
- application/zrok.v1+json
|
|
consumes:
|
|
- application/zrok.v1+json
|
|
schemes:
|
|
- http
|
|
swagger: "2.0" |