API Guide - AuditLogs

This article describes features that are only available in the Banyan Business edition and Banyan Enterprise edition.

Get Audit Logs

Banyan records system activity related to your organization to provide an audit trail. This endpoint returns admin audit logs according to your specific filters and parameters.

HTTP Request

GET /audit_logs

URL Parameters


Query Parameters

Parameter Format Description Default
action String Filters by action (such as create, update, delete, soft_delete,enable, and disable) n/a
admin_email String Filters by Admin email address n/a
end_time Int Filters records that occurred before a specific epoch timestamp (in nanoseconds) n/a
limit Int Used in Pagination. Specifies the maximum number of records to return 25
skip Int Used in Pagination. Specifies the number of records to skip 0
start_time Int Filters records that occurred after a specific epoch timestamp (in nanoseconds) n/a
type String Filters by type of Admin activity type (such as admin_sign-on, security_attach_policy, idp_settings, et al.) n/a

Supported Admin Activity Types

The table below lists possible Admin activity types.

Type Related to
admin_sign-on Admin Sign-on method settings (such as Banyan-local or SAML)
idp_settings Identity Provider settings (such as Okta, Cognito, OneLogin, or Other)
mdm_settings Enterprise Device Manager settings
policy Banyan Policies
registered_service Managed Services
role Banyan Roles
security_attach_policy Policies attached to or removed from a service
trustscore_factors Device Scoring settings
unknown_device Unregistered Devices settings (such as access to services and/or HTTP responses)

Supported Actions

The table below lists possible actions for each Admin activity type.

type create update delete enable disable
admin_sign-on   Yes      
idp_settings   Yes      
mdm_settings   Yes      
policy Yes Yes Yes    
role Yes Yes Yes Yes Yes
security_attach_policy Yes   Yes    
service Yes Yes Yes Yes Yes
trustscore_factors   Yes      
unknown_device   Yes      

Request Headers

Authorization: Bearer $AUTHTOKEN

Request Body


Status Codes and Errors

Value Description
200 OK
400 Bad request
401 Unauthorized
404 Not found
500 Internal Server Error

Response Headers


HTTP Response Body

Example audit log from IDP settings update

        "id": "6t5g4eee-g3t3-gt14-a347-1f6t439d9t51",
        "org_id": "96554eee-a3a1-468f-a347-1f61039d9be7",
        "created_at": 276532323232,
        "message": "IDP settings updated",
        "type": "idp_settings",
        "action": "update",
        "admin_email": "jack@test-org.com",
        "changes_new": {
            "protocol": "OIDC",
            "name": "OKTA",
            "config": {
                "IssuerURL": "http://new-idp.com",
                "ClientID": "b86cf0a02e05d6bae8e9cdd9b9f90ffd",
                "ClientSecret": "********************************",
                "RedirectURL": "http://new.trust.com/callback"
        "changes_old": {
            "protocol": "OIDC",
            "name": "OKTA",
            "config": {
                "IssuerURL": "http://old-idp.com",
                "ClientID": "33f850fd2c6a9a8161fdede1eb41def9",
                "ClientSecret": "********************************",
                "RedirectURL": "http://old.trust.com/callback"

Last modified: Jul 08, 2021