-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapi.yml
More file actions
127 lines (114 loc) · 3.97 KB
/
api.yml
File metadata and controls
127 lines (114 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
openapi: 3.1.0
servers:
- description: Cycle Internal API
url: http://localhost
x-unix-socket:
description: Unix socket path for internal API
url: /var/run/cycle/api/api.sock
info:
license:
name: Apache-2.0
url: http://www.apache.org/licenses/LICENSE-2.0
title: Cycle Internal API
description: |
Inside every container running on Cycle, there is a Unix socket mounted at *`/var/run/cycle/api/api.sock`*. You can send HTTP requests over this socket to access information about the local environment, access secrets, and much more.
The way this internal API functions is very similar to how Cycle's main API works, though the purpose is different. The internal API is primarily used by instances to learn about their environment, and dynamically update as deployments change. In the future, we expect you'll be able to use the internal API to register service containers and much more.
The internal API returns identical JSON responses to the main API. There is also a websocket based API that you can tune into for streaming platform updates.
version: 1.0.0
contact:
email: support@cycle.io
x-logo:
url: https://static.cycle.io/icons/logo/logo-white.svg
# tags:
# - name: Environments
# description: "env tag"
security:
- tokenAuth: []
paths:
# Environments
/v1/environment:
$ref: paths/environment/environment.yml
/v1/environment/containers:
$ref: paths/environment/containers.yml
/v1/environment/instances:
$ref: paths/environment/instances.yml
/v1/environment/ips:
$ref: paths/environment/ips.yml
/v1/environment/services:
$ref: paths/environment/services.yml
/v1/environment/virtual-machines:
$ref: paths/environment/virtual-machines.yml
/v1/environment/services/lb/telemetry/snapshots:
$ref: paths/environment/lbtelemetry.yml
/v1/environment/scoped-variables:
$ref: paths/environment/scoped-variables.yml
# Hubs
/v1/hub:
$ref: paths/hub/hub.yml
/v1/hub/integrations:
$ref: paths/hub/integration.yml
# Servers
/v1/server:
$ref: paths/server/server.yml
/v1/server/instances:
$ref: paths/server/instances.yml
/v1/server/instances/telemetry:
$ref: paths/server/instance-telemetry.yml
/v1/server/containers:
$ref: paths/server/containers.yml
/v1/server/images:
$ref: paths/server/images.yml
/v1/server/images/download:
$ref: paths/server/image-download.yml
/v1/server/power/poweroff:
$ref: paths/server/poweroff.yml
/v1/server/power/reboot:
$ref: paths/server/reboot.yml
# Containers
/v1/container:
$ref: paths/container/container.yml
/v1/container/instances:
$ref: paths/container/instances.yml
/v1/containers/certificates:
$ref: paths/container/certificates.yml
/v1/containers/domains:
$ref: paths/container/domains.yml
# Conductor
/v1/conductor/tasks:
$ref: paths/conductor/tasks.yml
# Monitoring
/v1/monitoring/metrics:
$ref: paths/monitoring/metrics.yml
/v1/monitoring/events:
$ref: paths/monitoring/events.yml
# VPN
/v1/vpn/login:
$ref: paths/vpn/login.yml
# SDN
/v1/sdn/networks:
$ref: paths/sdn/networks.yml
/v1/sdn/networks/instances:
$ref: paths/sdn/instances.yml
/v1/sdn/networks/environments:
$ref: paths/sdn/environments.yml
# Virtual Machines
/v1/virtual-machine:
$ref: paths/virtual-machine/virtual-machine.yml
/v1/virtual-machine/domains:
$ref: paths/virtual-machine/domains.yml
/v1/virtual-machine/gateways:
$ref: paths/virtual-machine/gateways.yml
# Object Cache
/v1/object-cache:
$ref: paths/object-cache/object-cache.yml
components:
securitySchemes:
tokenAuth:
name: X-CYCLE-TOKEN
in: header
type: apiKey
description: The authentication header for every request on the internal API. Take the value of the CYCLE_API_TOKEN environment variable present in the instance, and pass it as the value to this header to authenticate.
# Used for VPN login validation
basicAuth:
type: http
scheme: basic