Skip to main content
GET
/
connections
/
{nameOrID}
/
credentials
Get Active Connection Credentials
curl --request GET \
  --url https://use.hoop.dev/api/connections/{nameOrID}/credentials
import requests

url = "https://use.hoop.dev/api/connections/{nameOrID}/credentials"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://use.hoop.dev/api/connections/{nameOrID}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://use.hoop.dev/api/connections/{nameOrID}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://use.hoop.dev/api/connections/{nameOrID}/credentials"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/connections/{nameOrID}/credentials")
.asString();
require 'uri'
require 'net/http'

url = URI("https://use.hoop.dev/api/connections/{nameOrID}/credentials")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "connection_credentials": "<unknown>",
  "connection_name": "pgdemo",
  "connection_subtype": "postgres",
  "connection_type": "postgres",
  "created_at": "2025-08-25T12:00:00Z",
  "expire_at": "2025-08-25T13:00:00Z",
  "has_review": false,
  "id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
  "review_id": "3CBC8DB5-FBF8-4293-8E35-59A6EEA40207",
  "session_id": "2CBC8DB5-FBF8-4293-8E35-59A6EEA40207"
}
{
"message": "the error description"
}
{
"message": "the error description"
}
{
"message": "the error description"
}

Path Parameters

nameOrID
string
required

Name or UUID of the connection

Response

OK

connection_credentials
any

The connection information

connection_name
string

The name of the connection

Example:

"pgdemo"

connection_subtype
string

The connection subtype

Example:

"postgres"

connection_type
string

Connection type

Example:

"postgres"

created_at
string

When the resource was created

Example:

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

expire_at
string

When the database access connection expires. Null when the credential has no expiration (persistent native-client credentials issued without access_duration_seconds).

Example:

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

has_review
boolean

Whether this credential request requires review/JIT approval

Example:

false

id
string<uuid>
read-only

The unique identifier of the connection database access

Example:

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

review_id
string<uuid>

The review ID if review is required

Example:

"3CBC8DB5-FBF8-4293-8E35-59A6EEA40207"

session_id
string<uuid>

The session ID associated with this credential access

Example:

"2CBC8DB5-FBF8-4293-8E35-59A6EEA40207"