Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add patch tunnels to device api #183

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/openapi/peridio-device-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,43 @@ paths:
- device_tunnel_port
- port_ranges
- tunnel_prn
responses:
"200":
description: Ok.
content:
application/json:
schema:
properties:
data:
$ref: "peridio-admin-openapi.yaml#/components/schemas/tunnel"
/tunnels/{tunnel_prn}:
patch:
operationId: update-a-tunnel
summary: Update a tunnel
description: |
Update a tunnel currently only allows changing a tunnel to a closed state.

<a style="display: flex; margin-bottom: 16px; background: purple; color: white; border-radius: 5px; padding: 2px 4px; width: fit-content;" href="/device-api#tunnels">
<svg style="margin-right: 0.4em;" width="19.6px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5" /></svg>Labs
</a>
tags:
- "Tunnels"
parameters:
- name: tunnel_prn
in: path
required: true
schema:
$ref: "peridio-admin-openapi.yaml#/components/schemas/tunnel-prn"
requestBody:
required: true
content:
application/json:
schema:
properties:
state:
type: string
examples: [closed]
description: The state we want the tunnel to be in. Only accepts "closed".
responses:
"200":
description: Ok.
Expand Down
Loading