Files
core/cluster/docs/ClusterAPI_swagger.yaml
2025-03-04 16:31:01 +01:00

1869 lines
45 KiB
YAML

basePath: /
definitions:
app.Config:
properties:
autostart:
type: boolean
binary:
type: string
domain:
type: string
ffversion:
type: string
id:
type: string
input:
items:
$ref: '#/definitions/app.ConfigIO'
type: array
limitCPU:
description: percent
type: number
limitGPU:
allOf:
- $ref: '#/definitions/app.ConfigLimitGPU'
description: GPU limits
limitMemory:
description: bytes
type: integer
limitWaitFor:
description: seconds
type: integer
logPatterns:
description: will be interpreted as regular expressions
items:
type: string
type: array
options:
items:
type: string
type: array
output:
items:
$ref: '#/definitions/app.ConfigIO'
type: array
owner:
type: string
reconnect:
type: boolean
reconnectDelay:
description: seconds
type: integer
reference:
type: string
scheduler:
description: crontab pattern or RFC3339 timestamp
type: string
staleTimeout:
description: seconds
type: integer
timeout:
description: seconds
type: integer
type: object
app.ConfigIO:
properties:
address:
type: string
cleanup:
items:
$ref: '#/definitions/app.ConfigIOCleanup'
type: array
id:
type: string
options:
items:
type: string
type: array
type: object
app.ConfigIOCleanup:
properties:
maxFileAge:
type: integer
maxFiles:
type: integer
pattern:
type: string
purgeOnDelete:
type: boolean
type: object
app.ConfigLimitGPU:
properties:
decoder:
description: percent 0-100
type: number
encoder:
description: percent 0-100
type: number
memory:
description: bytes
type: integer
usage:
description: percent 0-100
type: number
type: object
client.AboutResponse:
properties:
address:
type: string
id:
type: string
resources:
$ref: '#/definitions/client.AboutResponseResources'
started_at:
type: string
version:
type: string
type: object
client.AboutResponseGPUResources:
properties:
decoder:
description: Current decoder usage, 0-100
type: number
encoder:
description: Current encoder usage, 0-100
type: number
memory_bytes:
description: Currently used memory in bytes
type: integer
memory_limit_bytes:
description: Defined memory limit in bytes
type: integer
memory_total_bytes:
description: Total available memory in bytes
type: integer
usage:
description: Current general usage, 0-100
type: number
usage_limit:
description: Defined general usage limit, 0-100
type: number
type: object
client.AboutResponseResources:
properties:
cpu:
description: Current CPU load, 0-100*ncpu
type: number
cpu_core:
description: Current CPU load of the core itself, 0-100*ncpu
type: number
cpu_limit:
description: Defined CPU load limit, 0-100*ncpu
type: number
error:
description: Last error
type: string
gpu:
description: Currently used GPU resources
items:
$ref: '#/definitions/client.AboutResponseGPUResources'
type: array
is_throttling:
description: Whether this core is currently throttling
type: boolean
memory_bytes:
description: Currently used memory in bytes
type: integer
memory_core_bytes:
description: Current used memory of the core itself in bytes
type: integer
memory_limit_bytes:
description: Defined memory limit in bytes
type: integer
memory_total_bytes:
description: Total available memory in bytes
type: integer
ncpu:
description: Number of CPU on this node
type: number
type: object
client.AddIdentityRequest:
properties:
identity:
$ref: '#/definitions/identity.User'
type: object
client.AddProcessRequest:
properties:
config:
$ref: '#/definitions/app.Config'
type: object
client.GetProcessResponse:
properties:
nodeid:
type: string
process:
$ref: '#/definitions/github_com_datarhei_core_v16_cluster_store.Process'
type: object
client.JoinRequest:
properties:
id:
type: string
raft_address:
type: string
type: object
client.LockRequest:
properties:
name:
type: string
valid_until:
type: string
type: object
client.RelocateProcessesRequest:
properties:
map:
additionalProperties:
type: string
type: object
type: object
client.SetKVRequest:
properties:
key:
type: string
value:
type: string
type: object
client.SetNodeStateRequest:
properties:
state:
type: string
type: object
client.SetPoliciesRequest:
properties:
policies:
items:
$ref: '#/definitions/policy.Policy'
type: array
type: object
client.SetProcessCommandRequest:
properties:
order:
type: string
type: object
client.SetProcessMetadataRequest:
properties:
metadata: {}
type: object
client.UpdateIdentityRequest:
properties:
identity:
$ref: '#/definitions/identity.User'
type: object
client.UpdateProcessRequest:
properties:
config:
$ref: '#/definitions/app.Config'
type: object
cluster.Error:
properties:
code:
format: int
type: integer
details:
items:
type: string
type: array
message:
type: string
type: object
config.Config:
properties:
address:
type: string
api:
properties:
access:
properties:
http:
properties:
allow:
items:
type: string
type: array
block:
items:
type: string
type: array
type: object
https:
properties:
allow:
items:
type: string
type: array
block:
items:
type: string
type: array
type: object
type: object
auth:
properties:
auth0:
properties:
enable:
type: boolean
tenants:
items:
$ref: '#/definitions/value.Auth0Tenant'
type: array
type: object
disable_localhost:
type: boolean
enable:
type: boolean
jwt:
properties:
secret:
type: string
type: object
password:
type: string
username:
type: string
type: object
read_only:
type: boolean
type: object
cluster:
properties:
address:
description: ip:port
type: string
debug:
properties:
disable_ffmpeg_check:
type: boolean
type: object
emergency_leader_timeout_sec:
description: seconds
format: int64
type: integer
enable:
type: boolean
id:
type: string
node_recover_timeout_sec:
description: seconds
format: int64
type: integer
peers:
items:
type: string
type: array
revocer_timeout_sec:
description: seconds
format: int64
type: integer
startup_timeout_sec:
description: seconds
format: int64
type: integer
sync_interval_sec:
description: seconds
format: int64
type: integer
type: object
compress:
properties:
encoding:
items:
type: string
type: array
mimetypes:
items:
type: string
type: array
min_length:
type: integer
type: object
created_at:
description: When this config has been persisted
type: string
db:
properties:
dir:
type: string
type: object
debug:
properties:
agent_address:
type: string
auto_max_procs:
type: boolean
force_gc:
description: deprecated, use MemoryLimit instead
format: int
type: integer
memory_limit_mbytes:
format: int64
type: integer
profiling:
type: boolean
type: object
ffmpeg:
properties:
access:
properties:
input:
properties:
allow:
items:
type: string
type: array
block:
items:
type: string
type: array
type: object
output:
properties:
allow:
items:
type: string
type: array
block:
items:
type: string
type: array
type: object
type: object
binary:
type: string
log:
properties:
max_history:
format: int
type: integer
max_lines:
format: int
type: integer
max_minimal_history:
format: int
type: integer
type: object
max_processes:
format: int64
type: integer
type: object
host:
properties:
auto:
type: boolean
name:
items:
type: string
type: array
type: object
id:
type: string
log:
properties:
level:
enum:
- debug
- info
- warn
- error
- silent
type: string
max_lines:
format: int
type: integer
topics:
items:
type: string
type: array
type: object
metrics:
properties:
enable:
type: boolean
enable_prometheus:
type: boolean
interval_sec:
description: seconds
format: int64
type: integer
range_sec:
description: seconds
format: int64
type: integer
type: object
name:
type: string
playout:
properties:
enable:
type: boolean
max_port:
format: int
type: integer
min_port:
format: int
type: integer
type: object
resources:
properties:
max_cpu_usage:
description: percent 0-100
type: number
max_gpu_memory_usage:
description: percent 0-100
type: number
max_gpu_usage:
description: percent 0-100
type: number
max_memory_usage:
description: percent 0-100
type: number
type: object
router:
properties:
blocked_prefixes:
items:
type: string
type: array
routes:
additionalProperties:
type: string
type: object
ui_path:
type: string
type: object
rtmp:
properties:
address:
type: string
address_tls:
type: string
app:
type: string
enable:
type: boolean
enable_tls:
type: boolean
token:
description: Deprecated, use IAM
type: string
type: object
service:
properties:
enable:
type: boolean
token:
type: string
url:
type: string
type: object
sessions:
properties:
enable:
type: boolean
ip_ignorelist:
items:
type: string
type: array
max_bitrate_mbit:
format: uint64
type: integer
max_sessions:
format: uint64
type: integer
persist:
type: boolean
persist_interval_sec:
format: int
type: integer
session_log_buffer_sec:
format: int
type: integer
session_log_path_pattern:
type: string
session_timeout_sec:
format: int
type: integer
type: object
srt:
properties:
address:
type: string
enable:
type: boolean
log:
properties:
enable:
type: boolean
topics:
items:
type: string
type: array
type: object
passphrase:
type: string
token:
description: Deprecated, use IAM
type: string
type: object
storage:
properties:
cors:
properties:
origins:
items:
type: string
type: array
type: object
disk:
properties:
cache:
properties:
enable:
type: boolean
max_file_size_mbytes:
format: uint64
type: integer
max_size_mbytes:
format: uint64
type: integer
ttl_seconds:
format: int64
type: integer
types:
properties:
allow:
items:
type: string
type: array
block:
items:
type: string
type: array
type: object
type: object
dir:
type: string
max_size_mbytes:
format: int64
type: integer
type: object
memory:
properties:
auth:
description: Deprecated, use IAM
properties:
enable:
description: Deprecated, use IAM
type: boolean
password:
description: Deprecated, use IAM
type: string
username:
description: Deprecated, use IAM
type: string
type: object
backup:
properties:
dir:
type: string
patterns:
items:
type: string
type: array
type: object
max_size_mbytes:
format: int64
type: integer
purge:
type: boolean
type: object
mimetypes:
additionalProperties:
type: string
type: object
mimetypes_file:
type: string
s3:
items:
$ref: '#/definitions/value.S3Storage'
type: array
type: object
tls:
properties:
address:
type: string
auto:
type: boolean
cert_file:
type: string
email:
type: string
enable:
type: boolean
key_file:
type: string
secret:
type: string
staging:
type: boolean
type: object
update_check:
type: boolean
version:
format: int64
type: integer
type: object
github_com_datarhei_core_v16_cluster_store.Process:
properties:
config:
$ref: '#/definitions/app.Config'
createdAt:
type: string
error:
type: string
metadata:
additionalProperties: true
type: object
order:
type: string
updatedAt:
type: string
type: object
identity.Auth0Tenant:
properties:
audience:
type: string
client_id:
type: string
domain:
type: string
type: object
identity.User:
properties:
alias:
type: string
auth:
$ref: '#/definitions/identity.UserAuth'
created_at:
type: string
name:
type: string
superuser:
type: boolean
updated_at:
type: string
type: object
identity.UserAuth:
properties:
api:
$ref: '#/definitions/identity.UserAuthAPI'
services:
$ref: '#/definitions/identity.UserAuthServices'
type: object
identity.UserAuthAPI:
properties:
auth0:
$ref: '#/definitions/identity.UserAuthAPIAuth0'
password:
type: string
type: object
identity.UserAuthAPIAuth0:
properties:
tenant:
$ref: '#/definitions/identity.Auth0Tenant'
user:
type: string
type: object
identity.UserAuthServices:
properties:
basic:
description: Passwords for BasicAuth
items:
type: string
type: array
session:
description: Secrets for session JWT
items:
type: string
type: array
token:
description: Tokens/Streamkey for RTMP and SRT
items:
type: string
type: array
type: object
policy.Policy:
properties:
actions:
items:
type: string
type: array
domain:
type: string
name:
type: string
resource:
type: string
types:
items:
type: string
type: array
type: object
skills.Codec:
properties:
decoders:
items:
type: string
type: array
encoders:
items:
type: string
type: array
id:
type: string
name:
type: string
type: object
skills.Device:
properties:
devices:
items:
$ref: '#/definitions/skills.HWDevice'
type: array
id:
type: string
name:
type: string
type: object
skills.Filter:
properties:
id:
type: string
name:
type: string
type: object
skills.Format:
properties:
id:
type: string
name:
type: string
type: object
skills.HWAccel:
properties:
id:
type: string
name:
type: string
type: object
skills.HWDevice:
properties:
extra:
type: string
id:
type: string
media:
type: string
name:
type: string
type: object
skills.Library:
properties:
compiled:
type: string
linked:
type: string
name:
type: string
type: object
skills.Protocol:
properties:
id:
type: string
name:
type: string
type: object
skills.Skills:
properties:
codecs:
$ref: '#/definitions/skills.ffCodecs'
devices:
$ref: '#/definitions/skills.ffDevices'
ffmpeg:
$ref: '#/definitions/skills.ffmpeg'
filters:
items:
$ref: '#/definitions/skills.Filter'
type: array
formats:
$ref: '#/definitions/skills.ffFormats'
hwaccels:
items:
$ref: '#/definitions/skills.HWAccel'
type: array
protocols:
$ref: '#/definitions/skills.ffProtocols'
type: object
skills.ffCodecs:
properties:
audio:
items:
$ref: '#/definitions/skills.Codec'
type: array
subtitle:
items:
$ref: '#/definitions/skills.Codec'
type: array
video:
items:
$ref: '#/definitions/skills.Codec'
type: array
type: object
skills.ffDevices:
properties:
demuxers:
items:
$ref: '#/definitions/skills.Device'
type: array
muxers:
items:
$ref: '#/definitions/skills.Device'
type: array
type: object
skills.ffFormats:
properties:
demuxers:
items:
$ref: '#/definitions/skills.Format'
type: array
muxers:
items:
$ref: '#/definitions/skills.Format'
type: array
type: object
skills.ffProtocols:
properties:
input:
items:
$ref: '#/definitions/skills.Protocol'
type: array
output:
items:
$ref: '#/definitions/skills.Protocol'
type: array
type: object
skills.ffmpeg:
properties:
compiler:
type: string
configuration:
type: string
libraries:
items:
$ref: '#/definitions/skills.Library'
type: array
version:
type: string
type: object
value.Auth0Tenant:
properties:
audience:
type: string
clientid:
type: string
domain:
type: string
users:
items:
type: string
type: array
type: object
value.S3Storage:
properties:
access_key_id:
type: string
auth:
allOf:
- $ref: '#/definitions/value.S3StorageAuth'
description: Deprecated, use IAM
bucket:
type: string
endpoint:
type: string
mountpoint:
type: string
name:
type: string
region:
type: string
secret_access_key:
type: string
use_ssl:
type: boolean
type: object
value.S3StorageAuth:
properties:
enable:
description: Deprecated, use IAM
type: boolean
password:
description: Deprecated, use IAM
type: string
username:
description: Deprecated, use IAM
type: string
type: object
info:
contact:
email: hello@datarhei.com
name: datarhei Core Support
url: https://www.datarhei.com
description: Internal REST API for the datarhei Core cluster
license:
name: Apache 2.0
url: https://github.com/datarhei/core/v16/blob/main/LICENSE
title: datarhei Core Cluster API
version: "1.0"
paths:
/:
get:
description: The cluster version
operationId: cluster-1-version
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
summary: The cluster version
tags:
- v1.0.0
/v1/about:
get:
description: The cluster version
operationId: cluster-1-about
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/client.AboutResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
summary: The cluster version
tags:
- v1.0.0
/v1/barrier/{name}:
get:
description: Has the barrier already has been passed
operationId: cluster-1-barrier
parameters:
- description: Barrier name
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/cluster.Error'
summary: Has the barrier already has been passed
tags:
- v1.0.0
/v1/core:
get:
description: Core API address and login of this node
operationId: cluster-1-core-api-address
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
summary: Core API address and login
tags:
- v1.0.0
/v1/core/config:
get:
description: Core config of this node
operationId: cluster-1-core-config
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/config.Config'
summary: Core config
tags:
- v1.0.0
/v1/core/skills:
get:
description: Core skills of this node
operationId: cluster-1-core-skills
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/skills.Skills'
summary: Core skills
tags:
- v1.0.0
/v1/iam/user:
post:
consumes:
- application/json
description: Add an identity to the cluster DB
operationId: cluster-1-add-identity
parameters:
- description: Identity config
in: body
name: config
required: true
schema:
$ref: '#/definitions/client.AddIdentityRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Add an identity
tags:
- v1.0.0
/v1/iam/user/{name}:
delete:
description: Remove an identity from the cluster DB
operationId: cluster-1-remove-identity
parameters:
- description: Identity name
in: path
name: name
required: true
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Remove an identity
tags:
- v1.0.0
put:
consumes:
- application/json
description: Replace an existing identity in the cluster DB
operationId: cluster-1-update-identity
parameters:
- description: Process ID
in: path
name: name
required: true
type: string
- description: Identity config
in: body
name: config
required: true
schema:
$ref: '#/definitions/client.UpdateIdentityRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Replace an existing identity
tags:
- v1.0.0
/v1/iam/user/{name}/policies:
put:
description: Set policies for an identity in the cluster DB. Any existing policies
will be replaced.
operationId: cluster-3-set-identity-policies
parameters:
- description: Process ID
in: path
name: id
required: true
type: string
- description: Policies for that user
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.SetPoliciesRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Set identity policies
tags:
- v1.0.0
/v1/kv:
post:
description: Store value under key
operationId: cluster-1-kv-set
parameters:
- description: Set KV request
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.SetKVRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Store value under key
tags:
- v1.0.0
/v1/kv/{key}:
delete:
description: Remove a key
operationId: cluster-1-kv-unset
parameters:
- description: Key name
in: path
name: name
required: true
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Remove a key
tags:
- v1.0.0
get:
description: Fetch a key
operationId: cluster-1-kv-get
parameters:
- description: Key name
in: path
name: name
required: true
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Fetch a key
tags:
- v1.0.0
/v1/lock:
post:
description: Acquire a named lock
operationId: cluster-1-lock
parameters:
- description: LockCreate request
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.LockRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Acquire a named lock
tags:
- v1.0.0
/v1/lock/{name}:
delete:
description: Remove a lock
operationId: cluster-1-unlock
parameters:
- description: Lock name
in: path
name: name
required: true
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Remove a lock
tags:
- v1.0.0
/v1/node/{id}/state:
get:
description: Set a state for a node
operationId: cluster-1-node-set-state
parameters:
- description: Set node state request
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.SetNodeStateRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Set a state for a node
tags:
- v1.0.0
/v1/process:
post:
consumes:
- application/json
description: Add a process to the cluster DB
operationId: cluster-1-add-process
parameters:
- description: Process config
in: body
name: config
required: true
schema:
$ref: '#/definitions/client.AddProcessRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Add a process
tags:
- v1.0.0
/v1/process/{id}:
delete:
description: Remove a process from the cluster DB
operationId: cluster-1-remove-process
parameters:
- description: Process ID
in: path
name: id
required: true
type: string
- description: Domain to act on
in: query
name: domain
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Remove a process
tags:
- v1.0.0
get:
description: Get a process from the cluster DB
operationId: cluster-1-get-process
parameters:
- description: Process ID
in: path
name: id
required: true
type: string
- description: Domain to act on
in: query
name: domain
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/client.GetProcessResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Get a process
tags:
- v1.0.0
put:
consumes:
- application/json
description: Replace an existing process in the cluster DB
operationId: cluster-1-update-process
parameters:
- description: Process ID
in: path
name: id
required: true
type: string
- description: Domain to act on
in: query
name: domain
type: string
- description: Process config
in: body
name: config
required: true
schema:
$ref: '#/definitions/client.UpdateProcessRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Replace an existing process
tags:
- v1.0.0
/v1/process/{id}/command:
put:
description: Set the order for a process.
operationId: cluster-3-set-process-order
parameters:
- description: Process ID
in: path
name: id
required: true
type: string
- description: Domain to act on
in: query
name: domain
type: string
- description: Process order
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.SetProcessCommandRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Set the order for a process
tags:
- v1.0.0
/v1/process/{id}/metadata/{key}:
put:
description: Add arbitrary JSON metadata under the given key. If the key exists,
all already stored metadata with this key will be overwritten. If the key
doesn't exist, it will be created.
operationId: cluster-3-set-process-metadata
parameters:
- description: Process ID
in: path
name: id
required: true
type: string
- description: Key for data store
in: path
name: key
required: true
type: string
- description: Domain to act on
in: query
name: domain
type: string
- description: Arbitrary JSON data. The null value will remove the key and its
contents
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.SetProcessMetadataRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Add JSON metadata with a process under the given key
tags:
- v1.0.0
/v1/relocate:
put:
description: Relocate processes to another node.
operationId: cluster-3-relocate-processes
parameters:
- description: List of processes to relocate
in: body
name: data
required: true
schema:
$ref: '#/definitions/client.RelocateProcessesRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Relocate processes to another node
tags:
- v1.0.0
/v1/server:
post:
consumes:
- application/json
description: Add a new server to the cluster
operationId: cluster-1-add-server
parameters:
- description: Server ID and address
in: body
name: config
required: true
schema:
$ref: '#/definitions/client.JoinRequest'
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/cluster.Error'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Add a new server
tags:
- v1.0.0
/v1/server/{id}:
delete:
description: Remove a server from the cluster
operationId: cluster-1-remove-server
parameters:
- description: Server ID
in: path
name: id
required: true
type: string
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Remove a server
tags:
- v1.0.0
/v1/snapshot:
get:
description: Current snapshot of the clusterDB
operationId: cluster-1-snapshot
produces:
- application/octet-stream
responses:
"200":
description: OK
schema:
type: file
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
summary: Cluster DB snapshot
tags:
- v1.0.0
/v1/transfer/{id}:
put:
consumes:
- application/json
description: Transfer leadership
operationId: cluster-1-transfer-leadership
parameters:
- description: Origin ID of request
in: header
name: X-Cluster-Origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
"508":
description: Loop Detected
schema:
$ref: '#/definitions/cluster.Error'
summary: Transfer leadership
tags:
- v1.0.0
swagger: "2.0"