mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Update swagger yaml
This commit is contained in:
parent
fd0485d897
commit
0ef132a7be
@ -457,9 +457,9 @@ paths:
|
||||
# and replaced with
|
||||
# type: string
|
||||
# or something like that
|
||||
- $ref: '#/definitions/StatisticItem'
|
||||
- $ref: '#/definitions/MapStatisticItem'
|
||||
- $ref: '#/definitions/RingStatisticItem'
|
||||
$ref: '#/definitions/MapStatisticItem'
|
||||
# - $ref: '#/definitions/StatisticItem'
|
||||
# - $ref: '#/definitions/RingStatisticItem'
|
||||
|
||||
'/servers/{server_id}/search-data':
|
||||
get:
|
||||
@ -897,7 +897,7 @@ paths:
|
||||
security:
|
||||
- basicAuth: []
|
||||
summary: 'Get a specific apikey on the server, hashed'
|
||||
operationId: api_get_apikeys
|
||||
operationId: api_get_apikey_by_id
|
||||
tags:
|
||||
- apikey
|
||||
responses:
|
||||
@ -977,11 +977,11 @@ paths:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: #/definitions/User
|
||||
$ref: '#/definitions/User'
|
||||
'500':
|
||||
description: Internal Server Error, users could not be retrieved. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
post:
|
||||
security:
|
||||
- basicAuth: []
|
||||
@ -991,59 +991,58 @@ paths:
|
||||
tags:
|
||||
- user
|
||||
parameters:
|
||||
- name: username
|
||||
description: Login name for user (unique, immutable)
|
||||
required: true
|
||||
in: body
|
||||
- name: password
|
||||
description: Hashed password for authentication
|
||||
required: false
|
||||
in: body
|
||||
- name: plain_text_password
|
||||
description: Plain text password (will be hashed) for authentication
|
||||
required: false
|
||||
in: body
|
||||
- name: firstname
|
||||
description: Firstname of user
|
||||
required: false
|
||||
in: body
|
||||
- name: lastname
|
||||
description: Lastname of user
|
||||
required: false
|
||||
in: body
|
||||
- name: email
|
||||
description: Email address if user (must be unique)
|
||||
required: true
|
||||
in: body
|
||||
- name: otp_secret
|
||||
description: OTP secret
|
||||
required: false
|
||||
in: body
|
||||
- name: confirmed
|
||||
description: Confirmed status
|
||||
required: false
|
||||
in: body
|
||||
- name: role_name
|
||||
description: Name of role to be assigned to user (default 'User')
|
||||
required: false
|
||||
in: body
|
||||
- name: role_id
|
||||
description: Role ID of role to be assigned to user
|
||||
required: false
|
||||
in: body
|
||||
- in: body
|
||||
name: user
|
||||
description: The user to create
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- username
|
||||
- email
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: Login name for user (unique, immutable)
|
||||
password:
|
||||
type: string
|
||||
description: Hashed password for authentication
|
||||
plain_text_password:
|
||||
type: string
|
||||
description: Plain text password (will be hashed) for authentication
|
||||
firstname:
|
||||
type: string
|
||||
description: Firstname of user
|
||||
lastname:
|
||||
type: string
|
||||
description: Lastname of user
|
||||
email:
|
||||
type: string
|
||||
description: Email address if user (must be unique)
|
||||
otp_secret:
|
||||
type: string
|
||||
description: OTP secret
|
||||
confirmed:
|
||||
type: string
|
||||
description: Confirmed status
|
||||
role_name:
|
||||
type: string
|
||||
description: Name of role to be assigned to user (default 'User')
|
||||
role_id:
|
||||
type: integer
|
||||
description: Role ID of role to be assigned to user
|
||||
responses:
|
||||
'201':
|
||||
description: Created
|
||||
schema:
|
||||
$ref: #/definitions/User
|
||||
$ref: '#/definitions/User'
|
||||
'400':
|
||||
description: Unprocessable Entry, the User data provided has issues
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. There was a problem creating the user
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/users/{username}':
|
||||
parameters:
|
||||
- name: username
|
||||
@ -1055,22 +1054,22 @@ paths:
|
||||
security:
|
||||
- basicAuth: []
|
||||
summary: Get a specific User on the server
|
||||
operationId: api_list_users
|
||||
operationId: api_get_user
|
||||
tags:
|
||||
- user
|
||||
responses:
|
||||
'200':
|
||||
description: Retrieve a specific User
|
||||
schema:
|
||||
$ref: #/definitions/User
|
||||
$ref: '#/definitions/User'
|
||||
'404':
|
||||
description: Not found. The User with the specified username does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error, user could not be retrieved. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/users/{user_id}':
|
||||
parameters:
|
||||
- name: user_id
|
||||
@ -1086,57 +1085,52 @@ paths:
|
||||
tags:
|
||||
- user
|
||||
parameters:
|
||||
- name: username
|
||||
description: Login name for user (unique, immutable)
|
||||
required: false
|
||||
in: body
|
||||
- name: password
|
||||
description: Hashed password for authentication
|
||||
required: false
|
||||
in: body
|
||||
- name: plain_text_password
|
||||
description: Plain text password (will be hashed) for authentication
|
||||
required: false
|
||||
in: body
|
||||
- name: firstname
|
||||
description: Firstname of user
|
||||
required: false
|
||||
in: body
|
||||
- name: lastname
|
||||
description: Lastname of user
|
||||
required: false
|
||||
in: body
|
||||
- name: email
|
||||
description: Email address if user (must be unique)
|
||||
required: false
|
||||
in: body
|
||||
- name: otp_secret
|
||||
description: OTP secret
|
||||
required: false
|
||||
in: body
|
||||
- name: confirmed
|
||||
description: Confirmed status
|
||||
required: false
|
||||
in: body
|
||||
- name: role_name
|
||||
description: Name of role to be assigned to user (default 'User')
|
||||
required: false
|
||||
in: body
|
||||
- name: role_id
|
||||
description: Role id of role to be assigned to user
|
||||
required: false
|
||||
in: body
|
||||
- in: body
|
||||
name: user
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: Login name for user (unique, immutable)
|
||||
password:
|
||||
type: string
|
||||
description: Hashed password for authentication
|
||||
plain_text_password:
|
||||
type: string
|
||||
description: Plain text password (will be hashed) for authentication
|
||||
firstname:
|
||||
type: string
|
||||
description: Firstname of user
|
||||
lastname:
|
||||
type: string
|
||||
description: Lastname of user
|
||||
email:
|
||||
type: string
|
||||
description: Email address if user (must be unique)
|
||||
otp_secret:
|
||||
type: string
|
||||
description: OTP secret
|
||||
confirmed:
|
||||
type: string
|
||||
description: Confirmed status
|
||||
role_name:
|
||||
type: string
|
||||
description: Name of role to be assigned to user (default 'User')
|
||||
role_id:
|
||||
type: string
|
||||
description: Role id of role to be assigned to user
|
||||
responses:
|
||||
'204':
|
||||
description: OK. User is modified (empty response body)
|
||||
'404':
|
||||
description: Not found. The User with the specified user_id does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
delete:
|
||||
security:
|
||||
- basicAuth: []
|
||||
@ -1150,11 +1144,11 @@ paths:
|
||||
'404':
|
||||
description: Not found. The User with the specified user_id does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/accounts':
|
||||
get:
|
||||
security:
|
||||
@ -1169,11 +1163,11 @@ paths:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: #/definitions/Account
|
||||
$ref: '#/definitions/Account'
|
||||
'500':
|
||||
description: Internal Server Error, accounts could not be retrieved. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
post:
|
||||
security:
|
||||
- basicAuth: []
|
||||
@ -1183,35 +1177,37 @@ paths:
|
||||
tags:
|
||||
- account
|
||||
parameters:
|
||||
- name: name
|
||||
description: Name for account (unique, immutable)
|
||||
required: true
|
||||
in: body
|
||||
- name: description
|
||||
description: Description of account
|
||||
required: false
|
||||
in: body
|
||||
- name: contact
|
||||
description: Contact information
|
||||
required: false
|
||||
in: body
|
||||
- name: mail
|
||||
description: Email address for contact
|
||||
required: false
|
||||
in: body
|
||||
- in: body
|
||||
name: account
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name for account (unique, immutable)
|
||||
description:
|
||||
type: string
|
||||
description: Description of account
|
||||
contact:
|
||||
type: string
|
||||
description: Contact information
|
||||
mail:
|
||||
type: string
|
||||
description: Email address for contact
|
||||
responses:
|
||||
'201':
|
||||
description: Created
|
||||
schema:
|
||||
$ref: #/definitions/Account
|
||||
$ref: '#/definitions/Account'
|
||||
'400':
|
||||
description: Unprocessable Entry, the Account data provided has issues.
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. There was a problem creating the account
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/accounts/{account_name}':
|
||||
parameters:
|
||||
- name: account_name
|
||||
@ -1223,22 +1219,22 @@ paths:
|
||||
security:
|
||||
- basicAuth: []
|
||||
summary: Get a specific Account on the server
|
||||
operationId: api_list_accounts
|
||||
operationId: api_get_account_by_name
|
||||
tags:
|
||||
- user
|
||||
responses:
|
||||
'200':
|
||||
description: Retrieve a specific account
|
||||
schema:
|
||||
$ref: #/definitions/Account
|
||||
$ref: '#/definitions/Account'
|
||||
'404':
|
||||
description: Not found. The Account with the specified name does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error, account could not be retrieved. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/accounts/{account_id}':
|
||||
parameters:
|
||||
- name: account_id
|
||||
@ -1254,33 +1250,35 @@ paths:
|
||||
tags:
|
||||
- user
|
||||
parameters:
|
||||
- name: name
|
||||
description: Name for account (unique, immutable)
|
||||
required: true
|
||||
in: body
|
||||
- name: description
|
||||
description: Description of account
|
||||
required: false
|
||||
in: body
|
||||
- name: contact
|
||||
description: Contact information
|
||||
required: false
|
||||
in: body
|
||||
- name: mail
|
||||
description: Email address for contact
|
||||
required: false
|
||||
in: body
|
||||
- in: body
|
||||
name: account
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name for account (unique, immutable)
|
||||
description:
|
||||
type: string
|
||||
description: Description of account
|
||||
contact:
|
||||
type: string
|
||||
description: Contact information
|
||||
mail:
|
||||
type: string
|
||||
description: Email address for contact
|
||||
responses:
|
||||
'204':
|
||||
description: OK. Account is modified (empty response body)
|
||||
'404':
|
||||
description: Not found. The Account with the specified account_id does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
delete:
|
||||
security:
|
||||
- basicAuth: []
|
||||
@ -1294,11 +1292,11 @@ paths:
|
||||
'404':
|
||||
description: Not found. The Account with the specified account_id does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/accounts/users/{account_id}':
|
||||
parameters:
|
||||
- name: account_id
|
||||
@ -1320,15 +1318,15 @@ paths:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: #/definitions/User
|
||||
$ref: '#/definitions/User'
|
||||
'404':
|
||||
description: Not found. The Account with the specified account_id does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error, accounts could not be retrieved. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'/pdnsadmin/accounts/users/{account_id}/{user_id}':
|
||||
parameters:
|
||||
- name: account_id
|
||||
@ -1355,11 +1353,11 @@ paths:
|
||||
'404':
|
||||
description: Not found. The Account or User with the specified id does not exist
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
delete:
|
||||
security:
|
||||
- basicAuth: []
|
||||
@ -1374,11 +1372,11 @@ paths:
|
||||
'404':
|
||||
description: Not found. The Account or User with the specified id does not exist or user was not linked to account
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
'500':
|
||||
description: Internal Server Error. Contains error message
|
||||
schema:
|
||||
$ref: #/definitions/Error
|
||||
$ref: '#/definitions/Error'
|
||||
|
||||
|
||||
definitions:
|
||||
@ -1750,7 +1748,7 @@ definitions:
|
||||
type: array
|
||||
description: 'named statistic values'
|
||||
items:
|
||||
type: array
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
@ -1774,7 +1772,7 @@ definitions:
|
||||
type: array
|
||||
description: 'named ring statistic values'
|
||||
items:
|
||||
type: array
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
|
Loading…
Reference in New Issue
Block a user