Credo AI Audit Logs & Shadow AI API

OpenAPI 3.0.0 contract covering the audit-log and Shadow AI slice of the Credo AI v2 API — listing, filtering, exporting and retrieving audit log entries, and ingesting, listing, bulk-loading and deleting Shadow AI events plus registering and unregistering discovered AI tools. Declares four servers (local, QA, production, on-premise), each templated on the customer tenant identifier, and a BearerAuth JWT security scheme obtained from POST /auth/exchange.

OpenAPI Specification

credo-ai-audit-logs-shadow-ai-openapi.json Raw ↑
{"components":{"parameters":{"PageAfter":{"description":"Cursor for pagination - get items after this cursor","in":"query","name":"page[after]","schema":{"type":"string"}},"PageBefore":{"description":"Cursor for pagination - get items before this cursor","in":"query","name":"page[before]","schema":{"type":"string"}},"PageLimit":{"description":"Number of items per page","in":"query","name":"page[limit]","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},"Tenant":{"description":"The tenant identifier (pre-configured as 'credoai')","in":"path","name":"tenant","required":true,"schema":{"type":"string"}}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"description":"Error response when the request is malformed or invalid","example":{"errors":[{"code":1004,"detail":"The request could not be understood or was missing required parameters","title":"Bad Request"}]},"properties":{"errors":{"items":{"properties":{"code":{"description":"Domain-specific error code. Ranges: 404 (not found), 1000-1999 (auth), 2000-2999 (validation), 9000-9999 (internal)","example":1004,"type":"integer"},"detail":{"description":"Detailed error message","example":"The request could not be understood or was missing required parameters","type":"string"},"title":{"description":"Short error title","example":"Bad Request","type":"string"}},"required":["code","title","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"BadRequestError","type":"object"}}},"description":"Bad request - malformed or invalid parameters"},"Forbidden":{"content":{"application/json":{"schema":{"description":"Error response when the user lacks permission to perform the action","example":{"errors":[{"code":1003,"detail":"You do not have permission to perform this action","title":"Forbidden"}]},"properties":{"errors":{"items":{"properties":{"code":{"description":"Domain-specific error code. Ranges: 404 (not found), 1000-1999 (auth), 2000-2999 (validation), 9000-9999 (internal)","example":1003,"type":"integer"},"detail":{"description":"Detailed error message","example":"You do not have permission to perform this action","type":"string"},"title":{"description":"Short error title","example":"Forbidden","type":"string"}},"required":["code","title","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"ForbiddenError","type":"object"}}},"description":"Permission denied - authenticated but lacking required permissions"},"NotFound":{"content":{"application/json":{"schema":{"description":"Error response when the requested resource does not exist","example":{"errors":[{"code":404,"detail":"not found","title":"Not found"}]},"properties":{"errors":{"items":{"properties":{"code":{"description":"Domain-specific error code. Ranges: 404 (not found), 1000-1999 (auth), 2000-2999 (validation), 9000-9999 (internal)","example":404,"type":"integer"},"detail":{"description":"Detailed error message","example":"not found","type":"string"},"title":{"description":"Short error title","example":"Not found","type":"string"}},"required":["code","title","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"ResourceNotFoundError","type":"object"}}},"description":"Resource not found"},"Unauthorized":{"content":{"application/json":{"schema":{"description":"Error response when authentication is required but missing or invalid","example":{"errors":[{"code":1100,"detail":"Authentication required","title":"Unauthorized"}]},"properties":{"errors":{"items":{"properties":{"code":{"description":"Domain-specific error code. Ranges: 404 (not found), 1000-1999 (auth), 2000-2999 (validation), 9000-9999 (internal)","example":1100,"type":"integer"},"detail":{"description":"Detailed error message","example":"Authentication required","type":"string"},"title":{"description":"Short error title","example":"Unauthorized","type":"string"}},"required":["code","title","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"UnauthorizedError","type":"object"}}},"description":"Authentication required - missing or invalid token"},"UnprocessableEntity":{"content":{"application/json":{"schema":{"description":"Error response when the request cannot be processed due to validation errors","example":{"errors":[{"code":2000,"detail":"unprocessable_entity","title":"Unprocessable entity"}]},"properties":{"errors":{"items":{"properties":{"code":{"description":"Domain-specific error code. Ranges: 404 (not found), 1000-1999 (auth), 2000-2999 (validation), 9000-9999 (internal)","example":2000,"type":"integer"},"detail":{"description":"Detailed error message","example":"unprocessable_entity","type":"string"},"title":{"description":"Short error title","example":"Unprocessable entity","type":"string"}},"required":["code","title","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"UnprocessableEntityError","type":"object"}}},"description":"Validation error"}},"schemas":{"AIEvent":{"description":"An AI event in the system","properties":{"attributes":{"description":"AI event attributes","properties":{"action":{"description":"Action that was performed","nullable":true,"type":"string"},"app_name":{"description":"Name of the application where the event occurred","nullable":true,"type":"string"},"category":{"description":"Category classification of the event","nullable":true,"type":"string"},"department":{"description":"Department of the user","nullable":true,"type":"string"},"device_hostname":{"description":"Hostname of the device where the event occurred","nullable":true,"type":"string"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"referrer_url":{"description":"Referrer URL for the event","nullable":true,"type":"string"},"risk_score":{"description":"Risk score for the event (0-100)","maximum":100,"minimum":0,"nullable":true,"type":"integer"},"timestamp":{"description":"Timestamp of the AI event","format":"date-time","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"url":{"description":"URL associated with the event","nullable":true,"type":"string"},"user_email":{"description":"Email address of the user associated with the event","nullable":true,"type":"string"}},"required":["timestamp","inserted_at","updated_at"],"type":"object"},"id":{"description":"Unique identifier for the AI event","type":"string"},"type":{"description":"Resource type identifier","example":"ai_event","type":"string"}},"required":["id","type","attributes"],"title":"AIEvent","type":"object"},"AIEventBulkCreateRequest":{"description":"Request schema for creating multiple AI events in bulk. Accepts either JSONAPI format with a 'data' array or simple format with an 'events' array.","properties":{"data":{"description":"Array of AI event data objects in JSONAPI format. Each object should have 'attributes' containing the event data.","items":{"properties":{"attributes":{"properties":{"action":{"nullable":true,"type":"string"},"app_name":{"nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"department":{"nullable":true,"type":"string"},"device_hostname":{"nullable":true,"type":"string"},"referrer_url":{"nullable":true,"type":"string"},"risk_score":{"maximum":100,"minimum":0,"nullable":true,"type":"integer"},"timestamp":{"description":"Timestamp of the AI event in ISO-8601 format","format":"date-time","type":"string"},"url":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["timestamp"],"type":"object"},"type":{"example":"ai_event","type":"string"}},"required":["type","attributes"],"type":"object"},"type":"array"},"events":{"description":"Array of AI event objects in simple format","items":{"properties":{"action":{"nullable":true,"type":"string"},"app_name":{"nullable":true,"type":"string"},"category":{"nullable":true,"type":"string"},"department":{"nullable":true,"type":"string"},"device_hostname":{"nullable":true,"type":"string"},"referrer_url":{"nullable":true,"type":"string"},"risk_score":{"maximum":100,"minimum":0,"nullable":true,"type":"integer"},"timestamp":{"description":"Timestamp of the AI event in ISO-8601 format","format":"date-time","type":"string"},"url":{"nullable":true,"type":"string"},"user_email":{"nullable":true,"type":"string"}},"required":["timestamp"],"type":"object"},"type":"array"}},"title":"AIEventBulkCreateRequest","type":"object"},"AIEventCreateRequest":{"description":"Request schema for creating an AI event","properties":{"data":{"description":"AI event data","properties":{"attributes":{"description":"AI event attributes","properties":{"action":{"description":"Action that was performed","nullable":true,"type":"string"},"app_name":{"description":"Name of the application where the event occurred","nullable":true,"type":"string"},"category":{"description":"Category classification of the event","nullable":true,"type":"string"},"department":{"description":"Department of the user","nullable":true,"type":"string"},"device_hostname":{"description":"Hostname of the device where the event occurred","nullable":true,"type":"string"},"referrer_url":{"description":"Referrer URL for the event","nullable":true,"type":"string"},"risk_score":{"description":"Risk score for the event (0-100)","maximum":100,"minimum":0,"nullable":true,"type":"integer"},"timestamp":{"description":"Timestamp of the AI event in ISO-8601 format","format":"date-time","type":"string"},"url":{"description":"URL associated with the event","nullable":true,"type":"string"},"user_email":{"description":"Email address of the user associated with the event","nullable":true,"type":"string"}},"required":["timestamp"],"type":"object"},"type":{"description":"The JSON-API resource type","example":"ai_event","type":"string"}},"required":["type","attributes"],"type":"object"}},"required":["data"],"title":"AIEventCreateRequest","type":"object"},"AIEventResponse":{"description":"Response containing a single AI event","properties":{"data":{"description":"An AI event in the system","properties":{"attributes":{"description":"AI event attributes","properties":{"action":{"description":"Action that was performed","nullable":true,"type":"string"},"app_name":{"description":"Name of the application where the event occurred","nullable":true,"type":"string"},"category":{"description":"Category classification of the event","nullable":true,"type":"string"},"department":{"description":"Department of the user","nullable":true,"type":"string"},"device_hostname":{"description":"Hostname of the device where the event occurred","nullable":true,"type":"string"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"referrer_url":{"description":"Referrer URL for the event","nullable":true,"type":"string"},"risk_score":{"description":"Risk score for the event (0-100)","maximum":100,"minimum":0,"nullable":true,"type":"integer"},"timestamp":{"description":"Timestamp of the AI event","format":"date-time","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"url":{"description":"URL associated with the event","nullable":true,"type":"string"},"user_email":{"description":"Email address of the user associated with the event","nullable":true,"type":"string"}},"required":["timestamp","inserted_at","updated_at"],"type":"object"},"id":{"description":"Unique identifier for the AI event","type":"string"},"type":{"description":"Resource type identifier","example":"ai_event","type":"string"}},"required":["id","type","attributes"],"title":"AIEvent","type":"object"},"included":{"description":"Included related resources when the 'include' parameter is used","items":{"properties":{"attributes":{"description":"The JSON-API resource attributes","type":"object"},"id":{"description":"The JSON-API resource ID","type":"string"},"type":{"description":"The JSON-API resource type","type":"string"}},"type":"object"},"nullable":true,"type":"array"}},"required":["data"],"title":"AIEventResponse","type":"object"},"AIEventsResponse":{"description":"Response containing a collection of AI events","properties":{"data":{"description":"Array of AI event resources","items":{"description":"An AI event in the system","properties":{"attributes":{"description":"AI event attributes","properties":{"action":{"description":"Action that was performed","nullable":true,"type":"string"},"app_name":{"description":"Name of the application where the event occurred","nullable":true,"type":"string"},"category":{"description":"Category classification of the event","nullable":true,"type":"string"},"department":{"description":"Department of the user","nullable":true,"type":"string"},"device_hostname":{"description":"Hostname of the device where the event occurred","nullable":true,"type":"string"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"referrer_url":{"description":"Referrer URL for the event","nullable":true,"type":"string"},"risk_score":{"description":"Risk score for the event (0-100)","maximum":100,"minimum":0,"nullable":true,"type":"integer"},"timestamp":{"description":"Timestamp of the AI event","format":"date-time","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"url":{"description":"URL associated with the event","nullable":true,"type":"string"},"user_email":{"description":"Email address of the user associated with the event","nullable":true,"type":"string"}},"required":["timestamp","inserted_at","updated_at"],"type":"object"},"id":{"description":"Unique identifier for the AI event","type":"string"},"type":{"description":"Resource type identifier","example":"ai_event","type":"string"}},"required":["id","type","attributes"],"title":"AIEvent","type":"object"},"type":"array"},"included":{"description":"Included related resources when the 'include' parameter is used","items":{"properties":{"attributes":{"description":"The JSON-API resource attributes","type":"object"},"id":{"description":"The JSON-API resource ID","type":"string"},"type":{"description":"The JSON-API resource type","type":"string"}},"type":"object"},"nullable":true,"type":"array"}},"required":["data"],"title":"AIEventsResponse","type":"object"},"AITool":{"description":"An AI tool in the system","properties":{"attributes":{"description":"AI tool attributes","properties":{"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"name":{"description":"Name of the AI tool","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"use_case_id":{"description":"ID of the associated use case","nullable":true,"type":"string"}},"required":["name","inserted_at","updated_at"],"type":"object"},"id":{"description":"Unique identifier for the AI tool","type":"string"},"type":{"description":"Resource type identifier","example":"ai_tool","type":"string"}},"required":["id","type","attributes"],"title":"AITool","type":"object"},"AIToolResponse":{"description":"Response containing a single AI tool","properties":{"data":{"description":"An AI tool in the system","properties":{"attributes":{"description":"AI tool attributes","properties":{"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"name":{"description":"Name of the AI tool","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"use_case_id":{"description":"ID of the associated use case","nullable":true,"type":"string"}},"required":["name","inserted_at","updated_at"],"type":"object"},"id":{"description":"Unique identifier for the AI tool","type":"string"},"type":{"description":"Resource type identifier","example":"ai_tool","type":"string"}},"required":["id","type","attributes"],"title":"AITool","type":"object"},"included":{"description":"Included related resources when the 'include' parameter is used","items":{"properties":{"attributes":{"description":"The JSON-API resource attributes","type":"object"},"id":{"description":"The JSON-API resource ID","type":"string"},"type":{"description":"The JSON-API resource type","type":"string"}},"type":"object"},"nullable":true,"type":"array"}},"required":["data"],"title":"AIToolResponse","type":"object"},"AIToolsResponse":{"description":"Response containing a collection of AI tools","properties":{"data":{"description":"Array of AI tool resources","items":{"description":"An AI tool in the system","properties":{"attributes":{"description":"AI tool attributes","properties":{"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"name":{"description":"Name of the AI tool","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"use_case_id":{"description":"ID of the associated use case","nullable":true,"type":"string"}},"required":["name","inserted_at","updated_at"],"type":"object"},"id":{"description":"Unique identifier for the AI tool","type":"string"},"type":{"description":"Resource type identifier","example":"ai_tool","type":"string"}},"required":["id","type","attributes"],"title":"AITool","type":"object"},"type":"array"},"included":{"description":"Included related resources when the 'include' parameter is used","items":{"properties":{"attributes":{"description":"The JSON-API resource attributes","type":"object"},"id":{"description":"The JSON-API resource ID","type":"string"},"type":{"description":"The JSON-API resource type","type":"string"}},"type":"object"},"nullable":true,"type":"array"}},"required":["data"],"title":"AIToolsResponse","type":"object"},"Audit Log Filter Options Response":{"description":"Enumerates the valid values for audit log filters. Use this to populate\nfilter dropdowns (event name, resource type) on the client. The values\nmirror what `GET /audit_logs?filter[name]=...` and\n`filter[resource_type]=...` accept.\n\n`resource_types` applies to both the `resource_type` and `sub_object_type`\nfilters — they draw from the same enum server-side.\n","properties":{"events":{"description":"All valid audit log event names (snake_case).","items":{"type":"string"},"type":"array"},"resource_types":{"description":"All valid resource type names (also valid for sub_object_type).","items":{"type":"string"},"type":"array"}},"required":["events","resource_types"],"title":"Audit Log Filter Options Response","type":"object"},"Audit Log Response":{"description":"Response containing a single audit log","properties":{"data":{"description":"An audit log entry in the system","example":{"attributes":{"action":{"data":{},"id":"22222222-2222-2222-2222-222222222222","type":"attach"},"action_id":"22222222-2222-2222-2222-222222222222","inserted_at":"2024-01-01T12:00:00Z","message":"Policy pack GDPR was added to use case","metadata":{"policy_pack_key":"gdpr","version":"1.0"},"name":"policy_pack_added","resource_id":"33333333-3333-3333-3333-333333333333","resource_name":"Fraud Detection Model","resource_type":"use_case","source":"platform","sub_object_id":"gdpr","sub_object_name":"GDPR Compliance Pack","sub_object_type":"policy_pack","team_id":null,"use_case_id":"33333333-3333-3333-3333-333333333333","user":{"email":"john@example.com","family_name":"Doe","given_name":"John","id":"11111111-1111-1111-1111-111111111111","role":"admin"},"user_id":"11111111-1111-1111-1111-111111111111"},"id":"12345678-1234-5678-9abc-123456789012","type":"audit_logs"},"properties":{"attributes":{"properties":{"action":{"description":"Action information","nullable":true,"type":"object"},"action_id":{"description":"Action ID","format":"uuid","nullable":true,"type":"string"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"message":{"description":"Human-readable audit log message","nullable":true,"type":"string"},"metadata":{"description":"Additional metadata specific to the event","nullable":true,"type":"object"},"name":{"description":"Audit log event name","type":"string"},"resource_id":{"description":"ID of the primary resource affected","nullable":true,"type":"string"},"resource_name":{"description":"Name of the primary resource affected","nullable":true,"type":"string"},"resource_type":{"description":"Type of the primary resource affected","nullable":true,"type":"string"},"source":{"description":"Originating client source (e.g. 'platform', 'sdk:pycredoai@0.3.1', 'mcp:provide_ai_suggestion', 'api', 'trigger', 'unknown')","type":"string"},"sub_object_id":{"description":"ID of the sub-object affected","nullable":true,"type":"string"},"sub_object_name":{"description":"Name of the sub-object affected","nullable":true,"type":"string"},"sub_object_type":{"description":"Type of the sub-object affected","nullable":true,"type":"string"},"team_id":{"description":"Team ID","format":"uuid","nullable":true,"type":"string"},"use_case_id":{"description":"Use case ID","format":"uuid","nullable":true,"type":"string"},"user":{"description":"User information (id, email, name, role, etc.)","nullable":true,"type":"object"},"user_id":{"description":"User ID who performed the action","format":"uuid","nullable":true,"type":"string"}},"required":["name","inserted_at"],"type":"object"},"id":{"description":"Audit log ID","format":"uuid","type":"string"},"type":{"description":"Resource type","enum":["audit_logs"],"type":"string"}},"required":["id","type","attributes"],"title":"AuditLog","type":"object"}},"required":["data"],"title":"Audit Log Response","type":"object"},"Audit Logs Response":{"description":"Response containing a collection of audit logs","properties":{"data":{"items":{"description":"An audit log entry in the system","example":{"attributes":{"action":{"data":{},"id":"22222222-2222-2222-2222-222222222222","type":"attach"},"action_id":"22222222-2222-2222-2222-222222222222","inserted_at":"2024-01-01T12:00:00Z","message":"Policy pack GDPR was added to use case","metadata":{"policy_pack_key":"gdpr","version":"1.0"},"name":"policy_pack_added","resource_id":"33333333-3333-3333-3333-333333333333","resource_name":"Fraud Detection Model","resource_type":"use_case","source":"platform","sub_object_id":"gdpr","sub_object_name":"GDPR Compliance Pack","sub_object_type":"policy_pack","team_id":null,"use_case_id":"33333333-3333-3333-3333-333333333333","user":{"email":"john@example.com","family_name":"Doe","given_name":"John","id":"11111111-1111-1111-1111-111111111111","role":"admin"},"user_id":"11111111-1111-1111-1111-111111111111"},"id":"12345678-1234-5678-9abc-123456789012","type":"audit_logs"},"properties":{"attributes":{"properties":{"action":{"description":"Action information","nullable":true,"type":"object"},"action_id":{"description":"Action ID","format":"uuid","nullable":true,"type":"string"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"message":{"description":"Human-readable audit log message","nullable":true,"type":"string"},"metadata":{"description":"Additional metadata specific to the event","nullable":true,"type":"object"},"name":{"description":"Audit log event name","type":"string"},"resource_id":{"description":"ID of the primary resource affected","nullable":true,"type":"string"},"resource_name":{"description":"Name of the primary resource affected","nullable":true,"type":"string"},"resource_type":{"description":"Type of the primary resource affected","nullable":true,"type":"string"},"source":{"description":"Originating client source (e.g. 'platform', 'sdk:pycredoai@0.3.1', 'mcp:provide_ai_suggestion', 'api', 'trigger', 'unknown')","type":"string"},"sub_object_id":{"description":"ID of the sub-object affected","nullable":true,"type":"string"},"sub_object_name":{"description":"Name of the sub-object affected","nullable":true,"type":"string"},"sub_object_type":{"description":"Type of the sub-object affected","nullable":true,"type":"string"},"team_id":{"description":"Team ID","format":"uuid","nullable":true,"type":"string"},"use_case_id":{"description":"Use case ID","format":"uuid","nullable":true,"type":"string"},"user":{"description":"User information (id, email, name, role, etc.)","nullable":true,"type":"object"},"user_id":{"description":"User ID who performed the action","format":"uuid","nullable":true,"type":"string"}},"required":["name","inserted_at"],"type":"object"},"id":{"description":"Audit log ID","format":"uuid","type":"string"},"type":{"description":"Resource type","enum":["audit_logs"],"type":"string"}},"required":["id","type","attributes"],"title":"AuditLog","type":"object"},"type":"array"},"meta":{"description":"Pagination metadata","properties":{"page":{"description":"Current page number","type":"integer"},"per_page":{"description":"Items per page","type":"integer"},"total_count":{"description":"Total number of items","type":"integer"},"total_pages":{"description":"Total number of pages","type":"integer"}},"type":"object"}},"required":["data"],"title":"Audit Logs Response","type":"object"},"AuditLog":{"description":"An audit log entry in the system","example":{"attributes":{"action":{"data":{},"id":"22222222-2222-2222-2222-222222222222","type":"attach"},"action_id":"22222222-2222-2222-2222-222222222222","inserted_at":"2024-01-01T12:00:00Z","message":"Policy pack GDPR was added to use case","metadata":{"policy_pack_key":"gdpr","version":"1.0"},"name":"policy_pack_added","resource_id":"33333333-3333-3333-3333-333333333333","resource_name":"Fraud Detection Model","resource_type":"use_case","source":"platform","sub_object_id":"gdpr","sub_object_name":"GDPR Compliance Pack","sub_object_type":"policy_pack","team_id":null,"use_case_id":"33333333-3333-3333-3333-333333333333","user":{"email":"john@example.com","family_name":"Doe","given_name":"John","id":"11111111-1111-1111-1111-111111111111","role":"admin"},"user_id":"11111111-1111-1111-1111-111111111111"},"id":"12345678-1234-5678-9abc-123456789012","type":"audit_logs"},"properties":{"attributes":{"properties":{"action":{"description":"Action information","nullable":true,"type":"object"},"action_id":{"description":"Action ID","format":"uuid","nullable":true,"type":"string"},"inserted_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"message":{"description":"Human-readable audit log message","nullable":true,"type":"string"},"metadata":{"description":"Additional metadata specific to the event","nullable":true,"type":"object"},"name":{"description":"Audit log event name","type":"string"},"resource_id":{"description":"ID of the primary resource affected","nullable":true,"type":"string"},"resource_name":{"description":"Name of the primary resource affected","nullable":true,"type":"string"},"resource_type":{"description":"Type of the primary resource affected","nullable":true,"type":"string"},"source":{"description":"Originating client source (e.g. 'platform', 'sdk:pycredoai@0.3.1', 'mcp:provide_ai_suggestion', 'api', 'trigger', 'unknown')","type":"string"},"sub_object_id":{"description":"ID of the sub-object affected","nullable":true,"type":"string"},"sub_object_name":{"description":"Name of the sub-object affected","nullable":true,"type":"string"},"sub_object_type":{"description":"Type of the sub-object affected","nullable":true,"type":"string"},"team_id":{"description":"Team ID","format":"uuid","nullable":true,"type":"string"},"use_case_id":{"description":"Use case ID","format":"uuid","nullable":true,"type":"string"},"user":{"description":"User information (id, email, name, role, etc.)","nullable":true,"type":"object"},"user_id":{"description":"User ID who performed the action","format":"uuid","nullable":true,"type":"string"}},"required":["name","inserted_at"],"type":"object"},"id":{"description":"Audit log ID","format":"uuid","type":"string"},"type":{"description":"Resource type","enum":["audit_logs"],"type":"string"}},"required":["id","type","attributes"],"title":"AuditLog","type":"object"},"Error":{"description":"Error response schema","example":{"errors":[{"code":2217,"detail":"This model cannot be deleted because it is part of an Use Case.","title":"Model in use"}]},"properties":{"errors":{"items":{"properties":{"code":{"description":"Domain-specific error code. Ranges: 404 (not found), 1000-1999 (auth), 2000-2999 (validation), 9000-9999 (internal)","example":2217,"type":"integer"},"detail":{"description":"Detailed error message","example":"This model cannot be deleted because it is part of an Use Case.","type":"string"},"title":{"description":"Short error title","example":"Model in use","type":"string"}},"required":["code","title","detail"],"type":"object"},"type":"array"}},"required":["errors"],"title":"Error","type":"object"}},"securitySchemes":{"BearerAuth":{"bearerFormat":"JWT","description":"JWT access token obtained from [`POST /auth/exchange`](#tag/Auth/operation/CredoAIWeb.Auth.TokenController.exchange).\n\nInclude in the Authorization header: `Authorization: Bearer <token>`\n","scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"support@credo.ai","name":"Credo AI Support","url":"https://credo.ai/contact"},"description":"The Credo AI API provides endpoints for managing AI models, use cases, and policy controls.\n\n## Authentication\nAll API requests must include a valid Bearer token in the Authorization header.\nTo obtain a token, use the [`POST /auth/exchange`](#tag/Auth/operation/CredoAIWeb.Auth.TokenController.exchange) endpoint with your API token and tenant.\n\n## Rate Limiting\nAPI requests are limited based on your subscription plan. Contact support for specific limits.\n\n## Versioning\nThis is version 2.0 of the API. All endpoints are prefixed with `/api/v2/`.\n","license":{"name":"Proprietary","url":"https://credo.ai/terms"},"title":"Credo AI API","version":"2.0.0"},"openapi":"3.0.0","paths":{"/audit_logs":{"get":{"callbacks":{},"description":"Retrieve a paginated list of all audit logs for the tenant.\n\nString filters behave differently per field:\n- `resource_name` and `sub_object_name` perform case-insensitive partial matching\n  (SQL `ILIKE '%value%'`) when given a plain string. To force an exact match,\n  use the object form `filter[<field>][type]=match&filter[<field>][value]=<value>`.\n- All other string filters (IDs, enums) remain exact match.\n","operationId":"CredoAIWeb.API.V2.AuditLogsController.index","parameters":[{"description":"Filter by name","in":"query","name":"filter[name]","required":false,"schema":{"type":"string"}},{"description":"Filter by user id","in":"query","name":"filter[user_id]","required":false,"schema":{"type":"string"}},{"description":"Filter by use case id","in":"query","name":"filter[use_case_id]","required":false,"schema":{"type":"string"}},{"description":"Filter by resource type","in":"query","name":"filter[resource_type]","required":false,"schema":{"type":"string"}},{"description":"Filter by resource id","in":"query","name":"filter[resource_id]","required":false,"schema":{"type":"string"}},{"description":"Filter by resource name","in":"query","name":"filter[resource_name]","required":false,"schema":{"type":"string"}},{"description":"Filter by sub object id","in":"query","name":"filter[sub_object_id]","required":false,"schema":{"type":"string"}},{"description":"Filter by sub object type","in":"query","name":"filter[sub_object_type]","required":false,"schema":{"type":"string"}},{"description":"Filter by sub object name","in":"query","name":"filter[sub_object_name]","required":false,"schema":{"type":"string"}},{"description":"Filter by start time","in":"query","name":"filter[start_time]","required":false,"schema":{"type":"string"}},{"description":"Filter by end time","in":"query","name":"filter[end_time]","required":false,"schema":{"type":"string"}},{"description":"Sort results by one or more fields. Use ascending order by default, or prefix with '-' for descending order.\\\nMultiple fields can be specified as comma-separated values.","explode":false,"in":"query","name":"sort","required":false,"schema":{"items":{"enum":["inserted_at","-inserted_at"],"type":"string"},"type":"array"},"style":"form"},{"description":"Number of items per page","in":"query","name":"page[limit]","required":false,"schema":{"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Cursor for pagination - get items after this cursor","in":"query","name":"page[after]","required":false,"schema":{"type":"string"}},{"description":"Cursor for pagination - get items before this cursor","in":"query","name":"page[before]","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/Audit Logs Response"}}},"description":"Success"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/sche

# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/credo-ai/refs/heads/main/openapi/credo-ai-audit-logs-shadow-ai-openapi.json