Skip to content

Commit

Permalink
Add backup API
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundnoble committed Mar 30, 2022
1 parent 0ba42ae commit 1793901
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions chainweb.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,18 @@ components:
example:
$ref: '#/components/examples/base64HeaderPage/items/0'

backupStatus:
title: Backup job status
type: string
pattern: "backup-done|backup-in-progress|backup-failed"

backupId:
title: Backup job identifier
description: Textual backup job identifier
type: string
pattern: "[a-zA-Z0-9_-]+"
example: 1648665437000

# Binary encoded Block Header
binaryHeader:
title: Binary Block Header
Expand Down Expand Up @@ -1026,6 +1038,21 @@ components:
minimum: 0
example: 0

backupId:
name: backupId
in: path
description: The identifier of the backup being checked
required: true
schema:
$ref: '#/components/schemas/backupId'

backupPact:
name: backupPact
in: query
description: Flag, if present back up the Pact databases too
required: false
allowEmptyValue: true

minheight:
name: minheight
in: query
Expand Down Expand Up @@ -2699,6 +2726,56 @@ paths:
example:
$ref: "#/components/examples/nodeConfig"

/make-backup:
post:
summary: Start a backup job
tags: [ misc ]
parameters:
- $ref: '#/components/parameters/backupPact'
responses:
"200":
headers:
x-peer-addr:
$ref: '#/components/headers/x-peer-addr'
x-server-timestamp:
$ref: '#/components/headers/x-server-timestamp'
x-chainweb-node-version:
$ref: '#/components/headers/x-chainweb-node-version'
content:
text/plain:
schema:
$ref: '#/components/schemas/backupId'

/check-backup/{backupId}:
get:
summary: Check the status of a backup job
tags: [ misc ]
parameters:
- $ref: '#/components/parameters/backupId'
responses:
"200":
headers:
x-peer-addr:
$ref: '#/components/headers/x-peer-addr'
x-server-timestamp:
$ref: '#/components/headers/x-server-timestamp'
x-chainweb-node-version:
$ref: '#/components/headers/x-chainweb-node-version'
content:
text/plain:
schema:
$ref: '#/components/schemas/backupStatus'

"404":
headers:
x-peer-addr:
$ref: '#/components/headers/x-peer-addr'
x-server-timestamp:
$ref: '#/components/headers/x-server-timestamp'
x-chainweb-node-version:
$ref: '#/components/headers/x-chainweb-node-version'
description: There is no backup job with that identifier

/health-check:
servers:
- url: "https://api.chainweb.com/"
Expand Down

0 comments on commit 1793901

Please sign in to comment.