Kentik Audit Log API (v6)

Query the account audit log of configuration and access events.

OpenAPI Specification

kentik-audit-openapi.json Raw ↑
{
    "openapi": "3.0.0",
    "info": {
        "title": "Audit API",
        "version": "v202601",
        "contact": {
            "name": "Kentik API Engineering",
            "url": "https://github.com/kentik/api"
        }
    },
    "tags": [
        {
            "name": "AuditService"
        }
    ],
    "paths": {
        "/audit/v202601/events": {
            "get": {
                "summary": "List Audit Events.",
                "description": "Returns a list of audit events.",
                "operationId": "ListAuditEvents",
                "responses": {
                    "200": {
                        "description": "A successful response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/v202601ListAuditEventsResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "An unexpected error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/rpcStatus"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "startTime",
                        "description": "Date time in UTC. Defaults to 30 days before end_time if not provided.",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "endTime",
                        "description": "Date time in UTC. Defaults to current date/time if not provided.",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "uint64",
                            "default": "0"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "uint64",
                            "default": "100"
                        }
                    }
                ],
                "tags": [
                    "AuditService"
                ]
            }
        },
        "/audit/v202601/events/{id}": {
            "get": {
                "summary": "Get an Audit Event",
                "description": "Return a specific audit event.",
                "operationId": "GetAuditEvent",
                "responses": {
                    "200": {
                        "description": "A successful response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/v202601GetAuditEventResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "An unexpected error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/rpcStatus"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "ctime",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    }
                ],
                "tags": [
                    "AuditService"
                ]
            }
        },
        "/audit/v202601/events/{id}/{ctime}": {
            "get": {
                "summary": "Get an Audit Event",
                "description": "Return a specific audit event.",
                "operationId": "GetAuditEvent",
                "responses": {
                    "200": {
                        "description": "A successful response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/v202601GetAuditEventResponse"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "An unexpected error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/rpcStatus"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "int64"
                        }
                    },
                    {
                        "name": "ctime",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date-time"
                        }
                    }
                ],
                "tags": [
                    "AuditService"
                ]
            }
        }
    },
    "security": [
        {
            "email": [],
            "token": []
        }
    ],
    "externalDocs": {
        "description": "More about Kentik APIs",
        "url": "https://docs.kentik.com/api"
    },
    "components": {
        "securitySchemes": {
            "email": {
                "type": "apiKey",
                "name": "X-CH-Auth-Email",
                "in": "header"
            },
            "token": {
                "type": "apiKey",
                "name": "X-CH-Auth-API-Token",
                "in": "header"
            }
        },
        "schemas": {
            "protobufAny": {
                "type": "object",
                "properties": {
                    "@type": {
                        "type": "string"
                    }
                },
                "additionalProperties": {}
            },
            "rpcStatus": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "integer",
                        "format": "int32"
                    },
                    "message": {
                        "type": "string"
                    },
                    "details": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/protobufAny"
                        }
                    }
                }
            },
            "v202601AuditEvent": {
                "type": "object",
                "properties": {
                    "userId": {
                        "type": "string",
                        "title": "ID of the user that produced the event"
                    },
                    "id": {
                        "type": "string",
                        "format": "uint64",
                        "title": "Unique identifier of the event"
                    },
                    "ctime": {
                        "type": "string",
                        "format": "date-time",
                        "title": "Timestamp when the event was produced"
                    },
                    "apiMethod": {
                        "type": "string",
                        "title": "HTTP method of the request (GET, POST, PUT, PATCH, DELETE)"
                    },
                    "apiPath": {
                        "type": "string",
                        "title": "URL path of the request"
                    },
                    "ipAddress": {
                        "type": "string",
                        "title": "Client IP Address"
                    },
                    "authority": {
                        "type": "string",
                        "title": "Authority header from the request"
                    },
                    "kentikUserId": {
                        "type": "string",
                        "title": "Kentik user ID extracted from request metadata"
                    },
                    "kentikUserEmail": {
                        "type": "string",
                        "title": "Kentik user email extracted from request metadata"
                    },
                    "objectType": {
                        "type": "string",
                        "title": "The type of object that was affected"
                    },
                    "objectName": {
                        "type": "string",
                        "title": "Human-readable name of the affected object"
                    },
                    "apiAction": {
                        "type": "string",
                        "title": "The action performed on the object"
                    },
                    "source": {
                        "type": "string",
                        "title": "The source of the request"
                    },
                    "objectId": {
                        "type": "string",
                        "title": "The ID of the affected object"
                    },
                    "parentId": {
                        "type": "string",
                        "title": "The ID of the parent object"
                    },
                    "portalPath": {
                        "type": "string",
                        "title": "Path to view the affected object"
                    },
                    "generic": {
                        "$ref": "#/components/schemas/v202601GenericEvent"
                    },
                    "titleField": {
                        "type": "string",
                        "title": "Non Generic route title field"
                    },
                    "eventPayload": {
                        "type": "string",
                        "title": "Request Payload"
                    },
                    "userAgent": {
                        "type": "string",
                        "title": "User agent"
                    }
                },
                "description": "AuditEvent represents an audit event with request and enriched contextual information."
            },
            "v202601GenericEvent": {
                "type": "object",
                "properties": {
                    "eventSource": {
                        "type": "string",
                        "title": "Attribute Source of Audit log"
                    },
                    "action": {
                        "type": "string",
                        "title": "Attribute Action of Audit log"
                    },
                    "eventType": {
                        "type": "string",
                        "title": "Attribute Type of Audit log"
                    },
                    "owner": {
                        "type": "string",
                        "title": "Attribute User of Audit log"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        },
                        "title": "generic bag of metadata about the event"
                    }
                }
            },
            "v202601GetAuditEventResponse": {
                "type": "object",
                "properties": {
                    "event": {
                        "$ref": "#/components/schemas/v202601AuditEvent"
                    }
                }
            },
            "v202601ListAuditEventsResponse": {
                "type": "object",
                "properties": {
                    "events": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/v202601AuditEvent"
                        }
                    }
                }
            }
        }
    }
}