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