Skip to main content
POST
/
connections
/
{nameOrID}
/
dbaccess
Create Database Access
curl --request POST \
  --url https://use.hoop.dev/api/connections/{nameOrID}/dbaccess \
  --header 'Content-Type: application/json' \
  --data '{
  "access_duration_seconds": 123
}'
{
  "connection_string": "postgres://noop:noop@db.example.com:5432/mydb?sslmode=disable",
  "created_at": "2025-08-25T12:00:00Z",
  "database_name": "mydb",
  "expire_at": "2025-08-25T13:00:00Z",
  "hostname": "db.example.com",
  "id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
  "password": "noop",
  "port": "5432",
  "username": "noop"
}

Path Parameters

nameOrID
string
required

Name or UUID of the connection

Body

application/json

The request body resource

access_duration_seconds
integer

Response

Created

connection_string
string

The connection string to access the database instance

Example:

"postgres://noop:noop@db.example.com:5432/mydb?sslmode=disable"

created_at
string

When the resource was created

Example:

"2025-08-25T12:00:00Z"

database_name
string

The default database name of the connection

Example:

"mydb"

expire_at
string

When the database access connection expires

Example:

"2025-08-25T13:00:00Z"

hostname
string

The hostname to access the database instance

Example:

"db.example.com"

id
string<uuid>

The unique identifier of the connection database access

Example:

"15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7"

password
string

The password of the database instance

Example:

"noop"

port
string

The port of the database instance

Example:

"5432"

username
string

The username of the database instance

Example:

"noop"

I