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 list tunnels device api endpoint #186

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/openapi/peridio-admin-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3417,6 +3417,10 @@ components:
type: array
items:
$ref: "#/components/schemas/signing-key"
array-of-tunnels:
type: array
items:
$ref: "#/components/schemas/tunnel"
array-of-webhooks:
type: array
items:
Expand Down
27 changes: 27 additions & 0 deletions src/openapi/peridio-device-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,33 @@ paths:
type: string
signatures:
$ref: "peridio-admin-openapi.yaml#/components/schemas/array-of-signatures"
/tunnels:
get:
operationId: list-tunnels
summary: List tunnels
description: |
This only returns `:requested` and `:open` tunnels.

<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>

For list options, we only support pagination params.
tags:
- "Tunnels"
parameters:
- $ref: "peridio-admin-openapi.yaml#/components/parameters/page"
responses:
"200":
description: Ok.
content:
application/json:
schema:
properties:
tunnels:
$ref: "peridio-admin-openapi.yaml#/components/schemas/array-of-tunnels"
next_page:
$ref: "peridio-admin-openapi.yaml#/components/schemas/next-page"
/tunnels/configure:
post:
operationId: configure-a-tunnel
Expand Down
Loading