> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Resource Audit Logs

> List audit log entries for one resource the caller can manage, newest first. Use this when the caller is not a tenant admin, or when tenant-wide audit logs are not enabled: access follows the resource. Pass resourceType and the id from that resource's get or list tool. For an application or deployment, pass that id; manage permission on its workspace is enough. A cluster returns every entry in that cluster. A workspace returns the workspace and activity inside it. Other types return the resource and its children. Set start and end, and keep limit small, because each entry includes the manifest before and after the change.



## OpenAPI

````yaml /openapi.json get /api/svc/v1/audit-logs/resources
openapi: 3.1.0
info:
  title: TrueFoundry API
  description: API for TrueFoundry
  version: 0.1.0
  contact: {}
servers:
  - url: https://{controlPlaneURL}
    variables:
      controlPlaneURL:
        default: app.truefoundry.com
        description: Control Plane URL
security: []
tags:
  - name: Agent
  - name: Agent Skills
  - name: Applications
  - name: Metrics
  - name: Apply
  - name: Artifacts
  - name: Audit Logs
  - name: Clusters
  - name: Jobs
  - name: LLM Gateway Budgets
  - name: Logs
  - name: MCP Registry
  - name: MCP Servers V2
  - name: MLRepos
  - name: Model Deployments
  - name: Models
  - name: Personal Access Tokens
  - name: Prompts
  - name: Provider Integrations
  - name: SCIM v2
  - name: Secret Groups
  - name: Secrets
  - name: Teams
  - name: Traces
  - name: Users
  - name: Virtual Accounts
  - name: Role Bindings
  - name: Workspaces
  - name: Provider Accounts
paths:
  /api/svc/v1/audit-logs/resources:
    get:
      tags:
        - Audit Logs
        - public
      summary: Get Resource Audit Logs
      description: >-
        List audit log entries for one resource the caller can manage, newest
        first. Use this when the caller is not a tenant admin, or when
        tenant-wide audit logs are not enabled: access follows the resource.
        Pass resourceType and the id from that resource's get or list tool. For
        an application or deployment, pass that id; manage permission on its
        workspace is enough. A cluster returns every entry in that cluster. A
        workspace returns the workspace and activity inside it. Other types
        return the resource and its children. Set start and end, and keep limit
        small, because each entry includes the manifest before and after the
        change.
      operationId: ActivityLog.getResourceActivityLogs
      parameters:
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            minimum: 1
            maximum: 1000
            nullable: true
            default: 100
            example: 10
            type: integer
        - name: offset
          required: false
          in: query
          description: Number of items to skip
          schema:
            minimum: 0
            nullable: true
            default: 0
            example: 0
            type: integer
        - name: resourceId
          required: false
          in: query
          description: >-
            Resource Id. Required unless resourceType is gateway-config,
            gateway-budget or gateway-rate-limit.
          schema:
            type: string
            nullable: true
        - name: resourceType
          required: true
          in: query
          description: Type of the resource whose audit log to read.
          schema:
            $ref: '#/components/schemas/ResourceType'
        - name: resourceName
          required: false
          in: query
          description: Resource Name. Required when resourceType is gateway-config.
          schema:
            type: string
            nullable: true
        - name: action
          required: false
          in: query
          description: >-
            Optional comma-separated action names. Omit to include every action
            on the resource.
          schema:
            type: string
            nullable: true
        - name: search
          required: false
          in: query
          description: Search query for message, action, resource name, and resource FQN
          schema:
            type: string
            nullable: true
        - name: start
          required: false
          in: query
          description: Start Time (ISO 8601)
          schema:
            type: string
            nullable: true
        - name: end
          required: false
          in: query
          description: End Time (ISO 8601)
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: Returns list of audit logs for the resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListActivityLogResponse'
      security:
        - jwt: []
components:
  schemas:
    ResourceType:
      type: string
      enum:
        - role
        - account
        - cluster
        - workspace
        - environment
        - secret-group
        - deployment
        - application
        - secret
        - docker-registry
        - tenant
        - vcs-integration
        - mlf-project
        - repository
        - provider-integration
        - team
        - service-account
        - llm-gateway
        - policy
        - role-binding
        - settings
        - provider-account
        - user
        - alert-config
        - alert-rule
        - gateway-config
        - gateway-controls
        - gateway-budget
        - gateway-rate-limit
        - gateway-policy
        - gateway-approval-request
        - tracing-project
        - tracing-application
        - agent
        - agent-channel
        - gateway-installation
        - virtual-account
        - mcp-server
        - external-identity-provider
        - agent-identity
        - oidc-client
      title: ResourceType
      x-fern-type-name: ResourceType
    ListActivityLogResponse:
      type: object
      properties:
        data:
          description: Array of ActivityLog
          type: array
          items:
            $ref: '#/components/schemas/ActivityLog'
        pagination:
          description: Pagination information
          allOf:
            - $ref: '#/components/schemas/Pagination'
      required:
        - data
        - pagination
      title: ListActivityLogResponse
      x-fern-type-name: ListActivityLogResponse
    ActivityLog:
      type: object
      properties:
        id:
          type: string
        action:
          type: string
          enum:
            - APPLY_ACCOUNT
            - DELETE_ACCOUNT
            - CREATE_DEPLOYMENT
            - CANCEL_DEPLOYMENT
            - DELETE_APPLICATION
            - PAUSE_APPLICATION
            - RESUME_APPLICATION
            - START_NOTEBOOK
            - STOP_NOTEBOOK
            - START_CODESERVER
            - STOP_CODESERVER
            - START_SSH_SERVER
            - STOP_SSH_SERVER
            - START_RSTUDIO
            - STOP_RSTUDIO
            - CREATE_CLUSTER
            - UPDATE_CLUSTER
            - DELETE_CLUSTER
            - CREATE_CLUSTER_INFRA
            - UPDATE_CLUSTER_INFRA
            - READ_CLUSTER_INFRA_DEPLOY_PAYLOAD
            - READ_CLUSTER_TOKEN
            - CORDON_NODE
            - UNCORDON_NODE
            - TOGGLE_AUTOPILOT
            - TRIGGER_JOB
            - TERMINATE_JOB
            - APPLY_RECOMMENDATION
            - UPGRADE_ADDON
            - APPLY_TEAM
            - DELETE_ROLE
            - APPLY_ROLE
            - DELETE_TEAM
            - ADD_TEAM_MANAGERS
            - REMOVE_TEAM_MANAGERS
            - ADD_TEAM_MEMBERS
            - REMOVE_TEAM_MEMBERS
            - APPLY_ML_REPO
            - DELETE_ML_REPO
            - APPLY_PROVIDER_ACCOUNT
            - DELETE_PROVIDER_ACCOUNT
            - APPLY_PROVIDER_INTEGRATION
            - DELETE_PROVIDER_INTEGRATION
            - CREATE_SECRET_GROUP
            - UPDATE_SECRET_GROUP
            - DELETE_SECRET_GROUP
            - CREATE_SECRET
            - UPDATE_SECRET
            - DELETE_SECRET
            - VIEW_SECRET
            - APPLY_OIDC_CLIENT
            - DELETE_OIDC_CLIENT
            - CREATE_OIDC_CLIENT_SECRET
            - DELETE_OIDC_CLIENT_SECRET
            - VIEW_OIDC_CLIENT_SECRET
            - EXECUTE_WORKFLOW
            - TERMINATE_WORKFLOW
            - RECOVER_WORKFLOW
            - APPROVE_WORKFLOW_SIGNAL
            - DENY_WORKFLOW_SIGNAL
            - SET_WORKFLOW_SIGNAL
            - APPLY_WORKSPACE
            - DELETE_WORKSPACE
            - APPLY_INTERCEPT
            - ADD_COLLABORATORS
            - UPDATE_COLLABORATORS_ROLE
            - REMOVE_COLLABORATORS
            - CREATE_ACCESS_GRANTS
            - REVOKE_GRANT
            - CREATE_ENVIRONMENT
            - UPDATE_ENVIRONMENT
            - DELETE_ENVIRONMENT
            - APPLY_ENVIRONMENT
            - CREATE_APPLICATION_SET
            - CREATE_PAT
            - DELETE_PAT
            - CREATE_VIRTUAL_ACCOUNT
            - APPLY_VIRTUAL_ACCOUNT
            - DELETE_VIRTUAL_ACCOUNT
            - REGENERATE_VIRTUAL_ACCOUNT_TOKEN
            - SYNC_VIRTUAL_ACCOUNT_TOKEN_TO_SECRET_STORE
            - GET_TOKEN
            - CLONE_APPLICATION
            - PROMOTE_APPLICATION
            - PROMOTE_APPLICATION_ROLLOUT
            - TOGGLE_AUTOPILOT_FOR_CLUSTER
            - CREATE_LLM_GATEWAY_RATE_LIMIT
            - UPDATE_LLM_GATEWAY_RATE_LIMIT
            - DELETE_LLM_GATEWAY_RATE_LIMIT
            - ADD_TRUEFOUNDRY_HOSTED_MODEL
            - DELETE_POD
            - APPLY_VCS_INTEGRATION
            - DELETE_VCS_INTEGRATION
            - DELETE_JOB_RUN
            - SYNC_METADATA_FOR_CLUSTER
            - APPLY_POLICY
            - DELETE_POLICY
            - APPLY_SETTINGS
            - DELETE_SETTINGS
            - UPDATE_USER_ROLES
            - INVITE_USER
            - REGISTER_USER
            - RESEND_USER_INVITE
            - PRE_REGISTER_USERS
            - ACTIVATE_USER
            - ADD_USERS_TO_ACCOUNT
            - DEACTIVATE_USER
            - REVOKE_USER_SESSIONS
            - DELETE_USER
            - SYNC_USERS_TO_AUTH_SERVER
            - CHANGE_PASSWORD
            - FORGOT_PASSWORD
            - APPLY_ALERT_CONFIG
            - DELETE_ALERT_CONFIG
            - APPLY_ALERT_RULE
            - DELETE_ALERT_RULE
            - CREATE_OR_UPDATE_GATEWAY_CONFIG
            - DELETE_GATEWAY_CONFIG
            - APPLY_CLAUDE_BOOTSTRAP_CONFIG
            - DELETE_CLAUDE_BOOTSTRAP_CONFIG
            - APPLY_GATEWAY_BUDGET
            - DELETE_GATEWAY_BUDGET
            - APPLY_GATEWAY_RATE_LIMIT
            - DELETE_GATEWAY_RATE_LIMIT
            - APPLY_GATEWAY_POLICY
            - DELETE_GATEWAY_POLICY
            - APPROVE_GATEWAY_APPROVAL_REQUEST
            - DENY_GATEWAY_APPROVAL_REQUEST
            - CREATE_TRACING_PROJECT
            - UPDATE_TRACING_PROJECT
            - DELETE_TRACING_PROJECT
            - CREATE_TRACING_APPLICATION
            - UPDATE_TRACING_APPLICATION
            - DELETE_TRACING_APPLICATION
            - DRAIN_NODE
            - DELETE_NODE
            - APPLY_AGENT
            - UPDATE_AGENT
            - DELETE_AGENT
            - APPLY_AGENT_CHANNEL
            - DELETE_AGENT_CHANNEL
            - CREATE_AGENT_SESSION
            - UPDATE_AGENT_SESSION
            - CREATE_OR_UPDATE_GATEWAY_INSTALLATION
            - DELETE_GATEWAY_INSTALLATION
            - SYNC_APPLICATION
            - SYNC_AGENT_REGISTRY
            - APPLY_AGENT_IDENTITY
            - DELETE_AGENT_IDENTITY
            - APPLY_EXTERNAL_IDENTITY_PROVIDER
            - DELETE_EXTERNAL_IDENTITY_PROVIDER
            - SHUTDOWN_CLUSTER
            - RESUME_CLUSTER
            - DELETE_TENANT
            - REQUEST_TENANT_DELETION
            - REVERT_TENANT_DELETION
            - APPLY_ROLE_BINDING
            - BULK_APPLY_ROLE_BINDING
            - DELETE_ROLE_BINDING
            - APPLY_MCP_SERVER
            - DELETE_MCP_SERVER
            - APPLY_MCP_USER_AUTH
            - DELETE_MCP_USER_AUTH
            - APPLY_OUTBOUND_AUTH_CONNECTION
            - DELETE_OUTBOUND_AUTH_CONNECTION
            - DELETE_ALL_MCP_AUTH_TOKENS
        requestPath:
          type: string
        resourceId:
          type: string
        resourceType:
          type: string
          enum:
            - role
            - account
            - cluster
            - workspace
            - environment
            - secret-group
            - deployment
            - application
            - secret
            - docker-registry
            - tenant
            - vcs-integration
            - mlf-project
            - repository
            - provider-integration
            - team
            - service-account
            - llm-gateway
            - policy
            - role-binding
            - settings
            - provider-account
            - user
            - alert-config
            - alert-rule
            - gateway-config
            - gateway-controls
            - gateway-budget
            - gateway-rate-limit
            - gateway-policy
            - gateway-approval-request
            - tracing-project
            - tracing-application
            - agent
            - agent-channel
            - gateway-installation
            - virtual-account
            - mcp-server
            - external-identity-provider
            - agent-identity
            - oidc-client
        resourceName:
          type: string
        resourceFqn:
          type: string
        parentResourceId:
          type: string
        parentResourceType:
          type: string
          enum:
            - role
            - account
            - cluster
            - workspace
            - environment
            - secret-group
            - deployment
            - application
            - secret
            - docker-registry
            - tenant
            - vcs-integration
            - mlf-project
            - repository
            - provider-integration
            - team
            - service-account
            - llm-gateway
            - policy
            - role-binding
            - settings
            - provider-account
            - user
            - alert-config
            - alert-rule
            - gateway-config
            - gateway-controls
            - gateway-budget
            - gateway-rate-limit
            - gateway-policy
            - gateway-approval-request
            - tracing-project
            - tracing-application
            - agent
            - agent-channel
            - gateway-installation
            - virtual-account
            - mcp-server
            - external-identity-provider
            - agent-identity
            - oidc-client
        tenantName:
          type: string
        clusterId:
          type: string
        workspaceId:
          type: string
        subject:
          $ref: '#/components/schemas/Subject'
        metaData:
          type: object
          description: Structured public/internal metadata for audit log rendering
        eventSourceMetadata:
          type: object
          description: >-
            Source of the request behind this entry, including the client IP and
            user agent when available.
        message:
          type: string
          description: Human-readable summary of what changed in this audit log entry
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - action
        - requestPath
        - resourceId
        - resourceType
        - resourceName
        - resourceFqn
        - parentResourceId
        - parentResourceType
        - tenantName
        - clusterId
        - workspaceId
        - subject
        - metaData
        - createdAt
        - updatedAt
      title: ActivityLog
      x-fern-type-name: ActivityLog
    Pagination:
      type: object
      properties:
        total:
          type: integer
          description: Total number of items
          example: 100
        offset:
          type: integer
          description: Number of items skipped
          example: 0
          nullable: true
        limit:
          type: integer
          description: Number of items per page
          example: 10
          nullable: true
      required:
        - total
      title: Pagination
      x-fern-type-name: Pagination
    Subject:
      type: object
      properties:
        subjectId:
          type: string
          description: Subject ID
        subjectType:
          type: string
          description: Subject type
          enum:
            - user
            - team
            - serviceaccount
            - virtualaccount
            - agent-identity
            - agent
            - agent-channel-identity
            - role
        subjectSlug:
          type: string
          description: Subject slug
          nullable: true
        subjectDisplayName:
          type: string
          description: Subject display name
          nullable: true
        subjectPatName:
          type: string
          description: Subject PAT name
          nullable: true
        subjectControllerName:
          type: string
          nullable: true
        subjectExternalIdentitySlug:
          type: string
          description: External identity slug (external_identity_id:sub:email)
          nullable: true
      required:
        - subjectId
        - subjectType
      title: Subject
      x-fern-type-name: Subject
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.