List service accounts
List organization-scoped service accounts and non-secret token metadata.
GET
/
api
/
headless
/
v1
/
organizations
/
{organizationId}
/
service-accounts
List service accounts
curl --request GET \
--url https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"serviceAccounts": [
{
"id": "<string>",
"organizationId": "<string>",
"name": "<string>",
"description": "<string>",
"scopes": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"ownerConsoleUserId": "<string>",
"disabledAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"tokens": [
{
"id": "<string>",
"name": "<string>",
"tokenPrefix": "<string>",
"scopes": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Enter a Forge service-account token or delegated OAuth access token. Mintlify adds the Bearer prefix.
Path Parameters
Query Parameters
Available options:
active, disabled Required range:
1 <= x <= 100Required range:
x >= 0Response
Organization service accounts and non-secret token metadata.
Show child attributes
Show child attributes
⌘I
List service accounts
curl --request GET \
--url https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/service-accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"serviceAccounts": [
{
"id": "<string>",
"organizationId": "<string>",
"name": "<string>",
"description": "<string>",
"scopes": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"ownerConsoleUserId": "<string>",
"disabledAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"tokens": [
{
"id": "<string>",
"name": "<string>",
"tokenPrefix": "<string>",
"scopes": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z"
}
]
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}