List Machine Identities
curl --request GET \
--url https://use.hoop.dev/api/machineidentitiesimport requests
url = "https://use.hoop.dev/api/machineidentities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/machineidentities', 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/machineidentities",
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/machineidentities"
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/machineidentities")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/machineidentities")
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[
{
"name": "backend-prod",
"attributes": [
"env:prod",
"team:backend"
],
"connection_names": [
"prod-postgres",
"api-proxy"
],
"created_at": "2024-07-25T15:56:35.317601Z",
"description": "Production backend service identity",
"id": "BF997324-5A27-4778-806A-41EE83598494",
"updated_at": "2024-07-25T15:56:35.317601Z"
}
]{
"message": "the error description"
}Machine Identities
List Machine Identities
List all machine identities (non-human identities)
GET
/
machineidentities
List Machine Identities
curl --request GET \
--url https://use.hoop.dev/api/machineidentitiesimport requests
url = "https://use.hoop.dev/api/machineidentities"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/machineidentities', 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/machineidentities",
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/machineidentities"
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/machineidentities")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/machineidentities")
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[
{
"name": "backend-prod",
"attributes": [
"env:prod",
"team:backend"
],
"connection_names": [
"prod-postgres",
"api-proxy"
],
"created_at": "2024-07-25T15:56:35.317601Z",
"description": "Production backend service identity",
"id": "BF997324-5A27-4778-806A-41EE83598494",
"updated_at": "2024-07-25T15:56:35.317601Z"
}
]{
"message": "the error description"
}Response
OK
Example:
"backend-prod"
Example:
["env:prod", "team:backend"]Example:
["prod-postgres", "api-proxy"]Example:
"2024-07-25T15:56:35.317601Z"
Example:
"Production backend service identity"
Example:
"BF997324-5A27-4778-806A-41EE83598494"
Example:
"2024-07-25T15:56:35.317601Z"
Was this page helpful?
⌘I