Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit 1793901

Browse files
committed
Add backup API
1 parent 0ba42ae commit 1793901

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

chainweb.openapi.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,18 @@ components:
655655
example:
656656
$ref: '#/components/examples/base64HeaderPage/items/0'
657657

658+
backupStatus:
659+
title: Backup job status
660+
type: string
661+
pattern: "backup-done|backup-in-progress|backup-failed"
662+
663+
backupId:
664+
title: Backup job identifier
665+
description: Textual backup job identifier
666+
type: string
667+
pattern: "[a-zA-Z0-9_-]+"
668+
example: 1648665437000
669+
658670
# Binary encoded Block Header
659671
binaryHeader:
660672
title: Binary Block Header
@@ -1026,6 +1038,21 @@ components:
10261038
minimum: 0
10271039
example: 0
10281040

1041+
backupId:
1042+
name: backupId
1043+
in: path
1044+
description: The identifier of the backup being checked
1045+
required: true
1046+
schema:
1047+
$ref: '#/components/schemas/backupId'
1048+
1049+
backupPact:
1050+
name: backupPact
1051+
in: query
1052+
description: Flag, if present back up the Pact databases too
1053+
required: false
1054+
allowEmptyValue: true
1055+
10291056
minheight:
10301057
name: minheight
10311058
in: query
@@ -2699,6 +2726,56 @@ paths:
26992726
example:
27002727
$ref: "#/components/examples/nodeConfig"
27012728

2729+
/make-backup:
2730+
post:
2731+
summary: Start a backup job
2732+
tags: [ misc ]
2733+
parameters:
2734+
- $ref: '#/components/parameters/backupPact'
2735+
responses:
2736+
"200":
2737+
headers:
2738+
x-peer-addr:
2739+
$ref: '#/components/headers/x-peer-addr'
2740+
x-server-timestamp:
2741+
$ref: '#/components/headers/x-server-timestamp'
2742+
x-chainweb-node-version:
2743+
$ref: '#/components/headers/x-chainweb-node-version'
2744+
content:
2745+
text/plain:
2746+
schema:
2747+
$ref: '#/components/schemas/backupId'
2748+
2749+
/check-backup/{backupId}:
2750+
get:
2751+
summary: Check the status of a backup job
2752+
tags: [ misc ]
2753+
parameters:
2754+
- $ref: '#/components/parameters/backupId'
2755+
responses:
2756+
"200":
2757+
headers:
2758+
x-peer-addr:
2759+
$ref: '#/components/headers/x-peer-addr'
2760+
x-server-timestamp:
2761+
$ref: '#/components/headers/x-server-timestamp'
2762+
x-chainweb-node-version:
2763+
$ref: '#/components/headers/x-chainweb-node-version'
2764+
content:
2765+
text/plain:
2766+
schema:
2767+
$ref: '#/components/schemas/backupStatus'
2768+
2769+
"404":
2770+
headers:
2771+
x-peer-addr:
2772+
$ref: '#/components/headers/x-peer-addr'
2773+
x-server-timestamp:
2774+
$ref: '#/components/headers/x-server-timestamp'
2775+
x-chainweb-node-version:
2776+
$ref: '#/components/headers/x-chainweb-node-version'
2777+
description: There is no backup job with that identifier
2778+
27022779
/health-check:
27032780
servers:
27042781
- url: "https://api.chainweb.com/"

0 commit comments

Comments
 (0)