Lists resources
curl --request GET \
--url https://use.hoop.dev/api/resourcesimport requests
url = "https://use.hoop.dev/api/resources"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/resources', 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/resources",
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/resources"
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/resources")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/resources")
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{
"data": [
{
"agent_id": "1837453e-01fc-46f3-9e4c-dcf22d395393",
"created_at": "2024-07-25T15:56:35.317601Z",
"env_vars": {},
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"name": "my-resource",
"subtype": "mysql",
"type": "database",
"updated_at": "2024-07-25T15:56:35.317601Z"
}
],
"pages": {
"page": 123,
"size": 123,
"total": 123
}
}{
"message": "the error description"
}{
"message": "the error description"
}Resources
Lists resources
Lists all resources for the organization.
GET
/
resources
Lists resources
curl --request GET \
--url https://use.hoop.dev/api/resourcesimport requests
url = "https://use.hoop.dev/api/resources"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/resources', 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/resources",
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/resources"
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/resources")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/resources")
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{
"data": [
{
"agent_id": "1837453e-01fc-46f3-9e4c-dcf22d395393",
"created_at": "2024-07-25T15:56:35.317601Z",
"env_vars": {},
"id": "15B5A2FD-0706-4A47-B1CF-B93CCFC5B3D7",
"name": "my-resource",
"subtype": "mysql",
"type": "database",
"updated_at": "2024-07-25T15:56:35.317601Z"
}
],
"pages": {
"page": 123,
"size": 123,
"total": 123
}
}{
"message": "the error description"
}{
"message": "the error description"
}Was this page helpful?
⌘I