import { Authlete } from "@authlete/typescript-sdk";
const authlete = new Authlete({
bearer: process.env["AUTHLETE_BEARER"] ?? "",
});
async function run() {
const result = await authlete.audit.getTypes();
console.log(result);
}
run();require 'uri'
require 'net/http'
url = URI("https://login.authlete.com/api/audit/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://login.authlete.com/api/audit/types"
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))
}curl --request GET \
--url https://login.authlete.com/api/audit/types \
--header 'Authorization: Bearer <token>'[
"organization.create",
"security.login",
"service.create",
"service.delete"
]{
"error": "Unknown user or invalid access token"
}{
"error": "<string>",
"errors": [
"<string>"
]
}{
"error": "No access to organization for this user"
}{
"error": "An internal error occurred. Please try again later."
}Get Audit Log Event Types
Returns the list of available audit log event types for this environment.
Accessible with a user access token or an organization token that has the
view_audit_log permission (e.g. a token created with the admin or
audit_reader preset).
This endpoint is hosted on the Authlete IdP server (https://login.authlete.com),
not on the regional API clusters.
import { Authlete } from "@authlete/typescript-sdk";
const authlete = new Authlete({
bearer: process.env["AUTHLETE_BEARER"] ?? "",
});
async function run() {
const result = await authlete.audit.getTypes();
console.log(result);
}
run();require 'uri'
require 'net/http'
url = URI("https://login.authlete.com/api/audit/types")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://login.authlete.com/api/audit/types"
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))
}curl --request GET \
--url https://login.authlete.com/api/audit/types \
--header 'Authorization: Bearer <token>'[
"organization.create",
"security.login",
"service.create",
"service.delete"
]{
"error": "Unknown user or invalid access token"
}{
"error": "<string>",
"errors": [
"<string>"
]
}{
"error": "No access to organization for this user"
}{
"error": "An internal error occurred. Please try again later."
}Authorizations
Authenticate every request with a Service Access Token or Organization Token.
Set the token value in the Authorization: Bearer <token> header.
Service Access Token: Scoped to a single service. Use when automating service-level configuration or runtime flows.
Organization Token: Scoped to the organization; inherits permissions across services. Use for org-wide automation or when managing multiple services programmatically.
Both token types are issued by the Authlete console or provisioning APIs.
Response
List of available audit event type strings.