Retrieve a list of all onboarded projects with this API.
GET /root/list
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | The root-key of the project. |
curl --request GET \
--url http://{{you-endpoint}}:{{your-port}}/root/list \
--header 'Authorization: {{root-key}}
const request = require('request');
const options = {
method: 'GET',
url: 'http://{{you-endpoint}}:{{your-port}}/root/list',
headers: {Authorization: '{{root-key}}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "http://{{you-endpoint}}:{{your-port}}/root/list"
headers = {"Authorization": "{{root-key}}"}
response = requests.get(url, headers=headers)
print(response.json())
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'http://{{you-endpoint}}:{{your-port}}/root/list', [
'headers' => [
'Authorization' => '{{root-key}}',
],
]);
echo $response->getBody();
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{{you-endpoint}}:{{your-port}}/root/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "{{root-key}}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "http://{{you-endpoint}}:{{your-port}}/root/list")
.setHeader("Authorization", "{{root-key}}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
{
"apps": [
{
"id": "01JMQGZKJ6752H096HJ9T57X1Z",
"name": "app_1",
"description": "description",
"token_expiry": 3600,
"token_notbefore": 0,
"refresh_expiry": 3600,
"refresh_notbefore": 3000,
"key_type": "ECDSA",
"algo": "ES256",
"rotation_period": 31536000,
"add_time": 1740251319,
"update_time": 0,
"last_key_rotate": 0
}
]
}
The response contains a list of onboarded applications under the "apps" array. Each application has the following details:
| Field | Type | Description |
|---|---|---|
| id | string (ULID) | A unique identifier for the application |
| name | string | The name of the application. |
| description | string | A brief description of the application. |
| token_expiry | int | The time (in seconds) after an issued token expires. |
| token_notbefore | int | The wait time (in seconds) before a auth token can be used after it's issued. |
| refresh_expiry | int | The expiration time (in seconds) for refresh tokens. |
| refresh_notbefore | int | The wait time (in seconds) before a refresh token can be used after it's issued. |
| key_type | string enum (RSA,ECDSA) | The cryptographic key type used (e.g., ECDSA). |
| algo | string enum (RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512) | The signing algorithm used (e.g., ES256). |
| rotation_period | int | The period (in seconds) after which cryptographic keys should be rotated. |
| add_time | int | The timestamp (Unix epoch) when the application was added. |
| update_time | int | The timestamp (Unix epoch) of the last update (0 if never updated). |
| last_key_rotate | int | The timestamp (Unix epoch) of the last key rotation (0 if never rotated). |
| Status Code | Description |
|---|---|
| 200 Ok | Success |
| 403 Access Denied | When the provided root key in Authorization header is invalid. |
| 500 Internal Server Error | Mostly because of the database error. Check the log for root cause details. |