Skip to main content
GET
/
dbroles
/
jobs
/
{id}
Get DB Role Job
curl --request GET \
  --url https://use.hoop.dev/api/dbroles/jobs/{id}
import requests

url = "https://use.hoop.dev/api/dbroles/jobs/{id}"

response = requests.get(url)

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

fetch('https://use.hoop.dev/api/dbroles/jobs/{id}', 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/dbroles/jobs/{id}",
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/dbroles/jobs/{id}"

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/dbroles/jobs/{id}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://use.hoop.dev/api/dbroles/jobs/{id}")

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
{
  "completed_at": "2025-02-28T13:45:12Z",
  "created_at": "2025-02-28T12:34:56Z",
  "hook_status": {
    "execution_time_sec": 5,
    "exit_code": 0,
    "output": "output"
  },
  "id": "67D7D053-3CAF-430E-97BA-6D4933D3FD5B",
  "org_id": "37EEBC20-D8DF-416B-8AC2-01B6EB456318",
  "spec": {
    "account_arn": "arn:aws:iam:123456789012",
    "db_arn": "arn:aws:rds:us-west-2:123456789012:db:my-instance",
    "db_engine": "postgres",
    "db_name": "customers",
    "db_tags": [
      {
        "key": "squad",
        "value": "banking"
      }
    ]
  },
  "status": {
    "message": "All user roles have been successfully provisioned",
    "phase": "running",
    "result": [
      {
        "completed_at": "2025-02-28T12:34:56Z",
        "credentials_info": {
          "secret_id": "dbsecrets/data/pgprod",
          "secret_keys": [
            "HOST",
            "PORT",
            "USER",
            "PASSWORD",
            "DB"
          ],
          "secrets_manager_provider": "database"
        },
        "message": "process already being executed, resource_id=arn:aws:rds:us-west-2:123456789012:db:my-postgres-db",
        "status": "failed",
        "user_role": "hoop_ro"
      }
    ]
  }
}
{
"message": "the error description"
}
{
"message": "the error description"
}
{
"message": "the error description"
}

Path Parameters

id
string
required

The unique identifier of the resource

Response

OK

completed_at
string

Timestamp when this job finished execution (null if still in progress)

Example:

"2025-02-28T13:45:12Z"

created_at
string

Timestamp when this job was initially created

Example:

"2025-02-28T12:34:56Z"

hook_status
object

The Runbook execution status

id
string

Unique identifier for this database role job

Example:

"67D7D053-3CAF-430E-97BA-6D4933D3FD5B"

org_id
string

Unique identifier of the organization that owns this job

Example:

"37EEBC20-D8DF-416B-8AC2-01B6EB456318"

spec
object

AWS-specific configuration details for the database role provisioning

status
object

Current status and results of the job execution (null if not started)