Skip to main content
POST
/
project
/
{project_id}
/
location
/
{location}
/
postgres
/
{postgres_database_reference}
/
cert
/
create-client-keypair
Create and return client certificate keypair with requested common name
curl --request POST \
  --url https://api.ubicloud.com/project/{project_id}/location/{location}/postgres/{postgres_database_reference}/cert/create-client-keypair \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "common_name": "<string>",
  "duration": 123
}
'
"<string>"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required

ID of the project

Pattern: ^pj[0-9a-hj-km-np-tv-z]{24}$
Example:

"pjkkmx0f2vke4h36nk9cm8v8q0"

location
string
required

The Ubicloud location/region

Example:

"eu-central-h1"

postgres_database_reference
string
required

Postgres database ID or name Resource ID or name

Pattern: ^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$

Body

application/json
common_name
string

CN for cert

duration
integer

Duration before expiry, in seconds

Response

certificate keypair file in pem format

The response is of type file.