Skip to main content
POST
/
cloud
/
v1
/
dbaas
/
postgres
/
validate_pg_conf
/
{project_id}
/
{region_id}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
pg_conf_validation = client.cloud.databases.postgres.custom_configurations.validate(
    project_id=0,
    region_id=0,
    pg_conf="\nlisten_addresses = 'localhost'\nport = 5432\nmax_connections = 100\nshared_buffers = 128MB\nlogging_collector = on",
    version="15",
)
print(pg_conf_validation.is_valid)
{
  "errors": [
    "<string>"
  ],
  "is_valid": true
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

Body

application/json
pg_conf
string
required

PostgreSQL configuration

Examples:

"\nlisten_addresses = 'localhost'\nport = 5432\nmax_connections = 100\nshared_buffers = 128MB\nlogging_collector = on"

version
string
required

PostgreSQL version

Examples:

"15"

Response

Validation results

errors
string[]
required

Errors list

is_valid
boolean
required

Validity of pg.conf file

Examples:

true

false