Skip to content
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
19 changes: 16 additions & 3 deletions internal/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ paths:
$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/scopedVariables.yml
$ref: paths/environment/scoped-variables.yml

# Hubs
/v1/hub:
Expand All @@ -56,13 +58,13 @@ paths:
/v1/server/instances:
$ref: paths/server/instances.yml
/v1/server/instances/telemetry:
$ref: paths/server/instanceTelemetry.yml
$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/imageDownload.yml
$ref: paths/server/image-download.yml

# Containers
/v1/container:
Expand All @@ -81,6 +83,8 @@ paths:
# Monitoring
/v1/monitoring/metrics:
$ref: paths/monitoring/metrics.yml
/v1/monitoring/events:
$ref: paths/monitoring/events.yml

# VPN
/v1/vpn/login:
Expand All @@ -93,7 +97,16 @@ paths:
$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

# Object Cache
/v1/object-cache:
$ref: paths/object-cache/object-cache.yml
components:
securitySchemes:
tokenAuth:
Expand Down
58 changes: 58 additions & 0 deletions internal/components/monitoring/Event.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
title: Event
description: A custom event submitted to the monitoring system.
type: object
required:
- event
- type
- priority
properties:
metadata:
anyOf:
- type: object
properties:
component:
type: object
description: The associated component for this event.
properties:
id:
type: string
type:
type: string
- type: "null"
event:
type: string
description: The event name.
type:
type: string
enum:
- info
- warning
- error
- success
- alert
- notice
- audit
priority:
type: string
enum:
- critical
- high
- medium
- normal
- low
text:
description: The text describing the event that has occurred.
type:
- string
- "null"
extra:
type: object
additionalProperties: true
labels:
type: object
additionalProperties:
type: string
tags:
type: array
items:
type: string
23 changes: 23 additions & 0 deletions internal/components/object-cache/ObjectCacheSave.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: ObjectCacheSave
description: An item saved in the internal API object cache.
type: object
required:
- scope
- expires
- key
- value
properties:
scope:
type: string
enum:
- global
- environment
- container
- instance
expires:
$ref: ../../../components/schemas/Duration.yml
key:
type: string
value:
type: string

4 changes: 2 additions & 2 deletions internal/paths/environment/instances.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
get:
operationId: "getEnvironmentInstances"
summary: List Environment Instances
description: Lists all Instances present in this Instance's Environment.
description: Lists all instances present in this instance's environment.
tags:
- Environments
- Instances
Expand All @@ -10,7 +10,7 @@ get:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns a list of Instances.
description: Returns a list of instances.
content:
application/json:
schema:
Expand Down
2 changes: 2 additions & 0 deletions internal/paths/environment/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ get:
$ref: ../../../components/schemas/containers/ServiceContainer.yml
scheduler:
$ref: ../../../components/schemas/containers/ServiceContainer.yml
gateway:
$ref: ../../../components/schemas/containers/ServiceContainer.yml
additionalProperties:
$ref: ../../../components/schemas/containers/ServiceContainer.yml
24 changes: 24 additions & 0 deletions internal/paths/environment/virtual-machines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
get:
operationId: "getEnvironmentVirtualMachines"
summary: Get Environment Virtual Machines
description: |
Returns a list of virtual machines that are in the same environment as this instance.
tags:
- Environments
parameters: []
responses:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns a list of virtual machines.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: ../../../components/schemas/vms/VirtualMachine.yml
32 changes: 32 additions & 0 deletions internal/paths/monitoring/events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
post:
operationId: "postEvent"
summary: Post Event
description: |
Post a custom event to Cycle's monitoring system.
tags:
- Monitoring
parameters: []
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: ../../components/monitoring/Event.yml
responses:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns true on success.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: boolean
enum:
- true
2 changes: 1 addition & 1 deletion internal/paths/monitoring/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ post:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns true on success
description: Returns true on success.
content:
application/json:
schema:
Expand Down
68 changes: 68 additions & 0 deletions internal/paths/object-cache/object-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
get:
operationId: "getObjectCache"
summary: Get Object Cache
description: |
Returns an object saved to the internal object cache.
tags:
- Object Cache
parameters:
- name: scope
in: query
required: true
description: Specify the object scope.
schema:
type: string
enum:
- global
- environment
- container
- instance
- name: key
in: query
required: true
description: Specify the object key.
schema:
type: string
responses:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns a saved object cache item.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: ../../components/object-cache/ObjectCacheSave.yml

post:
operationId: "postObjectCache"
summary: Post Object Cache
description: |
Save an item to the internal API object cache.
tags:
- Object Cache
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: ../../components/object-cache/ObjectCacheSave.yml
responses:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns true on success.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: "null"
38 changes: 38 additions & 0 deletions internal/paths/virtual-machine/domains.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
get:
operationId: "getVirtualMachineDomains"
summary: Get Virtual Machine Domains
description: |
Returns the domains associated with the specified virtual machine.
tags:
- Virtual Machines
parameters:
- name: virtual-machine-id
in: query
required: true
description: Specify which virtual machine to fetch domains for.
schema:
type: string
responses:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns a list of virtual machine domains.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
type: object
required:
- fqdn
properties:
fqdn:
type: string
record:
anyOf:
- $ref: ../../../components/schemas/dns/records/Record.yml
28 changes: 28 additions & 0 deletions internal/paths/virtual-machine/virtual-machine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
get:
operationId: "getVirtualMachine"
summary: Get Virtual Machine
description: |
Returns a specified virtual machine.
tags:
- Virtual Machines
parameters:
- name: virtual-machine-id
in: query
required: true
description: Specify which virtual machine to fetch.
schema:
type: string
responses:
default:
$ref: ../../../components/responses/errors/DefaultError.yml
200:
description: Returns a virtual machine.
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: ../../../components/schemas/vms/VirtualMachine.yml