[add] added public mode
This commit is contained in:
33
api.yml
33
api.yml
@@ -253,6 +253,39 @@ paths:
|
||||
$ref: "#/components/schemas/client_info"
|
||||
"401":
|
||||
$ref: "#/components/responses/unauthorized_public"
|
||||
post:
|
||||
tags:
|
||||
- "public"
|
||||
summary: "Set ipv4 client information. This is ONLY available if ENV['RAILS_API_PUBLIC'] is set"
|
||||
description: "If body is present, it will take precedence over the request IP. Response contains the newly set `ipv4` value."
|
||||
requestBody:
|
||||
description: "An existing clients properties wil only be updated if the parameter is present."
|
||||
required: false
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/client_update"
|
||||
operationId: "set_public_client_ip"
|
||||
security: []
|
||||
responses:
|
||||
"200":
|
||||
description: "Client created"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/client_info"
|
||||
"201":
|
||||
description: "Client updated"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/client_info"
|
||||
"403":
|
||||
description: "Forbidden - API not public"
|
||||
"406":
|
||||
description: "Not Acceptable - IPv4 Address is invalid"
|
||||
"429":
|
||||
description: "Too many clients - Maximum client count reached"
|
||||
|
||||
components:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user