List Service Accounts
curl --request GET \
--url https://use.hoop.dev/api/serviceaccountsimport requests
url = "https://use.hoop.dev/api/serviceaccounts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/serviceaccounts', 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/serviceaccounts",
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/serviceaccounts"
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/serviceaccounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/serviceaccounts")
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[
{
"status": "active",
"subject": "bJ8xV3ASWGTi7L9Z6zvHKqxJlnZM5TxV1bRdc0706vW",
"groups": [
"engineering"
],
"id": "BF997324-5A27-4778-806A-41EE83598494",
"name": "system-automation",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]{
"message": "the error description"
}User Management
List Service Accounts
List all service accounts
GET
/
serviceaccounts
List Service Accounts
curl --request GET \
--url https://use.hoop.dev/api/serviceaccountsimport requests
url = "https://use.hoop.dev/api/serviceaccounts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/serviceaccounts', 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/serviceaccounts",
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/serviceaccounts"
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/serviceaccounts")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/serviceaccounts")
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[
{
"status": "active",
"subject": "bJ8xV3ASWGTi7L9Z6zvHKqxJlnZM5TxV1bRdc0706vW",
"groups": [
"engineering"
],
"id": "BF997324-5A27-4778-806A-41EE83598494",
"name": "system-automation",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]{
"message": "the error description"
}Response
OK
Inactive service account will not be able to access the api
Available options:
active, inactive Subject is the external identifier that maps the user from the identity provider. This field is immutable after creation
Example:
"bJ8xV3ASWGTi7L9Z6zvHKqxJlnZM5TxV1bRdc0706vW"
The groups in which this service account belongs to
Example:
["engineering"]
The unique identifier of this resource
Example:
"BF997324-5A27-4778-806A-41EE83598494"
The display name of this service account
Example:
"system-automation"
Organization ID
Was this page helpful?