mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-11-19 06:54:13 +00:00
Sam Therapy
12b219bf45
gitignore: add default zones directory upload: fix typo in swagger docs config: simplify default save location Signed-off-by: Sam Therapy <sam@samtherapy.net>
98 lines
2.8 KiB
YAML
98 lines
2.8 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/upload:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
description: |-
|
|
Upload takes a multipart form file as user input. It must not exceed 1 mb and must be of text/plain content type.
|
|
If a file uploads successfully it will be saved locally and parsed.
|
|
If parsing is successful pomme will save the file to your ZoneDir defined in your config.
|
|
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"
|