Skip to content

Latest commit

 

History

History
276 lines (173 loc) · 5.32 KB

File metadata and controls

276 lines (173 loc) · 5.32 KB

This section describes features of the Logical Replication Controller.

Overview

This service allows to set up and manage publications on postgres. Also this service provides an ability to grant user for replication.

Replication Service API

Create publication

POST /publications/create

Description

Create publication. If schemas and tables are empty publication will be created for all tables.

Parameters

Type Name Description Schema
Body publication
required
Data for publication create publication

Publication

Name Description Schema
publicationName
required
Name of publication string
database
required
Logical database name string
tables
optional
Tables included in publication. string
schemas
optional
Schemas included in publication. string

Responses

HTTP Code Description Schema
200 OK string
400 Bad request string

Consumes

  • application/json

Produces

  • */*

Alter Add publication

POST /publications/alter/add

Description

Alter publication. Add some tables and schemas to publication. Empty both tables and schemas are not allowed.

Parameters

Type Name Description Schema
Body publication
required
Data for publication create publication

Publication

Name Description Schema
publicationName
required
Name of publication string
database
required
Logical database name string
tables
optional
Tables included in publication. string
schemas
optional
Schemas included in publication. string

Responses

HTTP Code Description Schema
200 OK string
400 Bad request string

Consumes

  • application/json

Produces

  • */*

Alter Set publication

POST /publications/alter/add

Description

Alter publication. Change some tables and schemas in publication. Empty both tables and schemas are not allowed.

Parameters

Type Name Description Schema
Body publication
required
Data for publication create publication

Publication

Name Description Schema
publicationName
required
Name of publication string
database
required
Logical database name string
tables
optional
Tables included in publication. string
schemas
optional
Schemas included in publication. string

Responses

HTTP Code Description Schema
200 OK string
400 Bad request string

Consumes

  • application/json

Produces

  • */*

Get publication

GET /{database}/{publication}

Description

Get publication Info.

Parameters

Type Name Description Schema
Path publicationName
required
Name of publication string
Path database
required
Logical database name string
Query withTables
optional
If table info must present in response bool

Responses

HTTP Code Description Schema
200 OK Publication Info
400 Bad request string

Publication Info

Name Description Schema
name Name of publication string
database Logical database name string
owner Publication owner string
tables Tables included in publication Array of Table

Table

Name Description Schema
name Table name string
attrNames Attributes included in publication Array of string
rowfilter RowFilter for table, if present string

Consumes

  • */*

Produces

  • */*

Drop publication

DELETE /publications/drop

Description

Drop publication for logical database.

Parameters

Type Name Description Schema
Body publication
required
Data for publication create publication

Publication

Name Description Schema
publicationName
required
Name of publication string
database
required
Logical database name string
tables
optional
Tables included in publication. string
schemas
optional
Schemas included in publication. string

Responses

HTTP Code Description Schema
200 OK string
400 Bad request string

Consumes

  • application/json

Produces

  • */*

Grant user

Post /users/grant

Description

Grant user with REPLICATION.

Parameters

Type Name Description Schema
Body user
required
User data user

User

Name Description Schema
username
required
Name of the user string

Responses

HTTP Code Description Schema
200 OK string
400 Bad request string

Consumes

  • application/json

Produces

  • */*