cURL
curl --request GET \
--url https://api.tirdad.ai/v1/secrets/api/keys \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.secrets.list_api_keys()
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.secrets.listApiKeys();
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Secrets.ListAPIKeys(ctx, nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.ListSecretsResponse != nil {
// handle response
}
}{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"display_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"provider": "tirdad",
"roles": [
"<string>"
],
"service_account_name": "<string>",
"status": "published",
"type": "private_key",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"user_type": "user"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Secrets
List API keys
Use when listing API keys (e.g. admin view or rotating keys). Returns a paginated list.
GET
/
secrets
/
api
/
keys
cURL
curl --request GET \
--url https://api.tirdad.ai/v1/secrets/api/keys \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.secrets.list_api_keys()
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.secrets.listApiKeys();
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Secrets.ListAPIKeys(ctx, nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.ListSecretsResponse != nil {
// handle response
}
}{
"items": [
{
"created_at": "2023-11-07T05:31:56Z",
"display_id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"provider": "tirdad",
"roles": [
"<string>"
],
"service_account_name": "<string>",
"status": "published",
"type": "private_key",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"user_type": "user"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}