mirror of https://github.com/vernonkeenan/lib
287 lines
6.7 KiB
YAML
287 lines
6.7 KiB
YAML
|
swagger: "2.0"
|
||
|
info:
|
||
|
version: 0.0.2
|
||
|
title: isp
|
||
|
description: Telnexus ISP Microservice
|
||
|
termsOfService: http://telnexus.com/terms/
|
||
|
contact:
|
||
|
email: noc@telnexus.com
|
||
|
license:
|
||
|
name: Proprietary - Copyright (c) 2012-2020 by Telnexus LLC
|
||
|
securityDefinitions:
|
||
|
ApiKeyAuth:
|
||
|
type: apiKey
|
||
|
in: header
|
||
|
name: X-API-Key
|
||
|
security:
|
||
|
- ApiKeyAuth: []
|
||
|
schemes:
|
||
|
- http
|
||
|
basePath: /v1
|
||
|
host: isp.infra.tnxs.net:8080
|
||
|
consumes:
|
||
|
- application/json
|
||
|
produces:
|
||
|
- application/json
|
||
|
responses:
|
||
|
AccessForbidden:
|
||
|
description: "Access forbidden, account lacks access"
|
||
|
schema:
|
||
|
$ref: "#/definitions/Error"
|
||
|
headers:
|
||
|
Access-Control-Allow-Origin:
|
||
|
type: string
|
||
|
Cache-Control:
|
||
|
type: string
|
||
|
NotFound:
|
||
|
description: Resource was not found
|
||
|
schema:
|
||
|
$ref: "#/definitions/Error"
|
||
|
headers:
|
||
|
Access-Control-Allow-Origin:
|
||
|
type: string
|
||
|
Cache-Control:
|
||
|
type: string
|
||
|
ServerError:
|
||
|
description: Server Internal Error
|
||
|
schema:
|
||
|
$ref: "#/definitions/Error"
|
||
|
headers:
|
||
|
Access-Control-Allow-Origin:
|
||
|
type: string
|
||
|
Cache-Control:
|
||
|
type: string
|
||
|
Unauthorized:
|
||
|
description: "Access Unauthorized, invalid API-KEY was used"
|
||
|
schema:
|
||
|
$ref: "#/definitions/Error"
|
||
|
headers:
|
||
|
Access-Control-Allow-Origin:
|
||
|
type: string
|
||
|
Cache-Control:
|
||
|
type: string
|
||
|
UnprocessableEntity:
|
||
|
description: "Unprocessable Entity, likely a bad parameter"
|
||
|
schema:
|
||
|
$ref: "#/definitions/Error"
|
||
|
headers:
|
||
|
Access-Control-Allow-Origin:
|
||
|
type: string
|
||
|
Cache-Control:
|
||
|
type: string
|
||
|
ZoneResponse:
|
||
|
description: Telnexus Response with an array of Zone objects
|
||
|
headers:
|
||
|
Access-Control-Allow-Origin:
|
||
|
type: string
|
||
|
Cache-Control:
|
||
|
type: string
|
||
|
schema:
|
||
|
$ref: "#/definitions/ZoneResponse"
|
||
|
parameters:
|
||
|
limitQuery:
|
||
|
default: 100
|
||
|
description:
|
||
|
"How many objects to return at one time (max 300, default 100)"
|
||
|
format: int64
|
||
|
in: query
|
||
|
name: limit
|
||
|
required: false
|
||
|
type: integer
|
||
|
offsetQuery:
|
||
|
default: 0
|
||
|
description: How many objects to skip? (default 0)
|
||
|
format: int64
|
||
|
in: query
|
||
|
name: offset
|
||
|
required: false
|
||
|
type: integer
|
||
|
accountIdQuery:
|
||
|
description: Telnexus Record Id of an Account
|
||
|
in: query
|
||
|
name: accountId
|
||
|
required: false
|
||
|
type: string
|
||
|
zoneIdQuery:
|
||
|
description: Telnexus Record Id of a Zone
|
||
|
in: query
|
||
|
name: zoneId
|
||
|
required: false
|
||
|
type: string
|
||
|
paths:
|
||
|
/zone:
|
||
|
get:
|
||
|
description: Get DNS Zones
|
||
|
summary: Get DNS Zones
|
||
|
tags:
|
||
|
- Zone
|
||
|
operationId: getZones
|
||
|
parameters:
|
||
|
- $ref: "#/parameters/limitQuery"
|
||
|
- $ref: "#/parameters/offsetQuery"
|
||
|
- $ref: "#/parameters/zoneIdQuery"
|
||
|
responses:
|
||
|
"200":
|
||
|
$ref: "#/responses/ZoneResponse"
|
||
|
"401":
|
||
|
$ref: "#/responses/Unauthorized"
|
||
|
"403":
|
||
|
$ref: "#/responses/AccessForbidden"
|
||
|
"404":
|
||
|
$ref: "#/responses/NotFound"
|
||
|
"422":
|
||
|
$ref: "#/responses/UnprocessableEntity"
|
||
|
"500":
|
||
|
$ref: "#/responses/ServerError"
|
||
|
definitions:
|
||
|
Error:
|
||
|
properties:
|
||
|
code:
|
||
|
format: int64
|
||
|
type: integer
|
||
|
fields:
|
||
|
type: string
|
||
|
message:
|
||
|
type: string
|
||
|
type: object
|
||
|
Registrar:
|
||
|
type: object
|
||
|
properties:
|
||
|
ID:
|
||
|
type: string
|
||
|
description: Record Id
|
||
|
AccountID:
|
||
|
type: string
|
||
|
description: Account
|
||
|
ContactID:
|
||
|
type: string
|
||
|
description: Contact
|
||
|
CreatedById:
|
||
|
type: string
|
||
|
description: Created By
|
||
|
CreatedDate:
|
||
|
type: string
|
||
|
description: Created Date
|
||
|
DateEnd:
|
||
|
type: string
|
||
|
description: End Date
|
||
|
DateStart:
|
||
|
type: string
|
||
|
description: Start Date
|
||
|
Description:
|
||
|
type: string
|
||
|
description: Description
|
||
|
LastModifiedById:
|
||
|
type: string
|
||
|
description: Last Modified By
|
||
|
LastModifiedDate:
|
||
|
type: string
|
||
|
description: Last Modifed Date
|
||
|
RegistrarName:
|
||
|
type: string
|
||
|
description: Registrar Name
|
||
|
URL:
|
||
|
type: string
|
||
|
description: Registrar URL
|
||
|
Zone:
|
||
|
type: object
|
||
|
properties:
|
||
|
ID:
|
||
|
type: string
|
||
|
description: Record Id
|
||
|
AccountID:
|
||
|
type: string
|
||
|
description: Account
|
||
|
ContactID:
|
||
|
type: string
|
||
|
description: Contact
|
||
|
CreatedById:
|
||
|
type: string
|
||
|
description: Created By
|
||
|
CreatedDate:
|
||
|
type: string
|
||
|
description: Created Date
|
||
|
DateEnd:
|
||
|
type: string
|
||
|
description: End Date
|
||
|
DateStart:
|
||
|
type: string
|
||
|
description: Start Date
|
||
|
Description:
|
||
|
type: string
|
||
|
description: Description
|
||
|
ExpirationDate:
|
||
|
type: string
|
||
|
description: Expiration Date
|
||
|
IDProtect:
|
||
|
type: boolean
|
||
|
description: ID Protect?
|
||
|
HostID:
|
||
|
type: string
|
||
|
description: The ID of the Host upon which this Zone is hosted
|
||
|
LastModifiedById:
|
||
|
type: string
|
||
|
description: Last Modified By
|
||
|
LastModifiedDate:
|
||
|
type: string
|
||
|
description: Last Modifed Date
|
||
|
PeriodStartID:
|
||
|
type: boolean
|
||
|
description: Auto Renew?
|
||
|
RegistrarID:
|
||
|
type: string
|
||
|
description: ID of the Registar that owns this zone instance
|
||
|
Term:
|
||
|
type: string
|
||
|
description: Term
|
||
|
ZoneName:
|
||
|
type: string
|
||
|
description: Zone Name
|
||
|
ZoneResponse:
|
||
|
description: An array of Zone objects
|
||
|
properties:
|
||
|
data:
|
||
|
items:
|
||
|
$ref: "#/definitions/Zone"
|
||
|
type: array
|
||
|
meta:
|
||
|
$ref: "#/definitions/ResponseMeta"
|
||
|
type: object
|
||
|
ResponseMeta:
|
||
|
properties:
|
||
|
Contact:
|
||
|
description: Microservice Contact Info
|
||
|
type: string
|
||
|
Copyright:
|
||
|
description: Copyright Info
|
||
|
type: string
|
||
|
License:
|
||
|
description: License Information and Restrictions
|
||
|
type: string
|
||
|
OperationID:
|
||
|
description: Operation ID
|
||
|
type: string
|
||
|
RequestIP:
|
||
|
description: Request IP Address
|
||
|
type: string
|
||
|
RequestType:
|
||
|
description: Request Type
|
||
|
type: string
|
||
|
RequestURL:
|
||
|
description: Request URL
|
||
|
type: string
|
||
|
ServerInfo:
|
||
|
description: Data Server Info
|
||
|
type: string
|
||
|
ServerResponseTime:
|
||
|
description: Data Server Response Time (ms)
|
||
|
type: string
|
||
|
ServerTimestamp:
|
||
|
description: Backend Server Timestamp
|
||
|
type: string
|
||
|
TelnexusAccount:
|
||
|
description:
|
||
|
Telnexus Account Number used for recording transactions
|
||
|
type: string
|
||
|
type: object
|