mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-13 00:12:54 +00:00
Add API description for safekeeper copy endpoint (#5770)
Adds a yaml API description for a new endpoint that allows creation of a new timeline as the copy of an existing one. Part of #5282
This commit is contained in:
@@ -86,6 +86,41 @@ paths:
|
||||
default:
|
||||
$ref: "#/components/responses/GenericError"
|
||||
|
||||
/v1/tenant/{tenant_id}/timeline/{source_timeline_id}/copy:
|
||||
parameters:
|
||||
- name: tenant_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: hex
|
||||
- name: source_timeline_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: hex
|
||||
|
||||
post:
|
||||
tags:
|
||||
- "Timeline"
|
||||
summary: Register new timeline as copy of existing timeline
|
||||
description: ""
|
||||
operationId: v1CopyTenantTimeline
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/TimelineCopyRequest"
|
||||
responses:
|
||||
"201":
|
||||
description: Timeline created
|
||||
# TODO: return timeline info?
|
||||
"403":
|
||||
$ref: "#/components/responses/ForbiddenError"
|
||||
default:
|
||||
$ref: "#/components/responses/GenericError"
|
||||
|
||||
|
||||
/v1/tenant/{tenant_id}/timeline/{timeline_id}:
|
||||
parameters:
|
||||
@@ -210,6 +245,18 @@ components:
|
||||
type: integer
|
||||
minimum: 0
|
||||
|
||||
TimelineCopyRequest:
|
||||
type: object
|
||||
required:
|
||||
- target_timeline_id
|
||||
- until_lsn
|
||||
properties:
|
||||
target_timeline_id:
|
||||
type: string
|
||||
format: hex
|
||||
until_lsn:
|
||||
type: string
|
||||
|
||||
SkTimelineInfo:
|
||||
type: object
|
||||
required:
|
||||
|
||||
Reference in New Issue
Block a user