pomme/docs/swagger.yaml

131 lines
3.6 KiB
YAML

definitions:
internal.Response:
properties:
message:
type: string
type: object
internal.SwaggerGenericResponse-internal_Response:
properties:
response:
allOf:
- $ref: '#/definitions/internal.Response'
description: Response items
type: object
info:
contact: {}
description: Pomme is a service that parses zonefiles
termsOfService: http://freecumextremist.com/
title: Pomme
version: 0.0.1
paths:
/api/login:
post:
consumes:
- application/json
description: |-
login to Pomme
Rate limited: 5 requests every 5 second
parameters:
- description: Username
in: query
name: username
required: true
type: string
- description: Password
in: query
name: password
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
"401":
description: authFailed is a 401 error when logging in fails, includes realm
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
summary: authenticate as a regular user
tags:
- accounts
/api/parse:
post:
consumes:
- multipart/form-data
description: |-
parse your zonefile
Rate limited: 10 requests every 10 second
you must specify "Bearer" before entering your token
parameters:
- description: Zonefile name
in: query
name: filename
required: true
type: string
- description: Bearer Token
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
"500":
description: internalServerError is a 500 server error with a logged error
call back
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
security:
- Bearer: []
summary: parse your zonefile
tags:
- DNS
/api/upload:
post:
consumes:
- multipart/form-data
description: |-
upload takes files from the user and stores it locally to be parsed. Uploads are associated with a specific user.
Rate limited: 10 requests every 10 second
you must specify "Bearer" before entering your token
parameters:
- description: Zonefile to upload
in: formData
name: file
required: true
type: file
- description: Bearer Token
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
"500":
description: internalServerError is a 500 server error with a logged error
call back
schema:
$ref: '#/definitions/internal.SwaggerGenericResponse-internal_Response'
security:
- Bearer: []
summary: upload a zonefile
tags:
- DNS
securityDefinitions:
Bearer:
description: Type "Bearer" followed by a space and JWT token.
in: header
name: Authorization
type: apiKey
swagger: "2.0"