mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-23 16:10:37 +00:00
108 lines
2.4 KiB
YAML
108 lines
2.4 KiB
YAML
openapi: "3.0.2"
|
|
info:
|
|
title: Compute node control API
|
|
version: "1.0"
|
|
|
|
servers:
|
|
- url: "http://localhost:3080"
|
|
|
|
paths:
|
|
/status:
|
|
get:
|
|
tags:
|
|
- "info"
|
|
summary: Get compute node internal status
|
|
description: ""
|
|
operationId: getComputeStatus
|
|
responses:
|
|
"200":
|
|
description: ComputeState
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ComputeState"
|
|
|
|
/metrics.json:
|
|
get:
|
|
tags:
|
|
- "info"
|
|
summary: Get compute node startup metrics in JSON format
|
|
description: ""
|
|
operationId: getComputeMetricsJSON
|
|
responses:
|
|
"200":
|
|
description: ComputeMetrics
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ComputeMetrics"
|
|
|
|
/check_writability:
|
|
post:
|
|
tags:
|
|
- "check"
|
|
summary: Check that we can write new data on this compute
|
|
description: ""
|
|
operationId: checkComputeWritability
|
|
responses:
|
|
"200":
|
|
description: Check result
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
description: Error text or 'true' if check passed
|
|
example: "true"
|
|
|
|
components:
|
|
securitySchemes:
|
|
JWT:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
|
|
schemas:
|
|
ComputeMetrics:
|
|
type: object
|
|
description: Compute startup metrics
|
|
required:
|
|
- sync_safekeepers_ms
|
|
- basebackup_ms
|
|
- config_ms
|
|
- total_startup_ms
|
|
properties:
|
|
sync_safekeepers_ms:
|
|
type: integer
|
|
basebackup_ms:
|
|
type: integer
|
|
config_ms:
|
|
type: integer
|
|
total_startup_ms:
|
|
type: integer
|
|
|
|
ComputeState:
|
|
type: object
|
|
required:
|
|
- status
|
|
- last_active
|
|
properties:
|
|
status:
|
|
$ref: '#/components/schemas/ComputeStatus'
|
|
last_active:
|
|
type: string
|
|
description: The last detected compute activity timestamp in UTC and RFC3339 format
|
|
example: "2022-10-12T07:20:50.52Z"
|
|
error:
|
|
type: string
|
|
description: Text of the error during compute startup, if any
|
|
|
|
ComputeStatus:
|
|
type: string
|
|
enum:
|
|
- init
|
|
- failed
|
|
- running
|
|
|
|
security:
|
|
- JWT: []
|