> ## Documentation Index
> Fetch the complete documentation index at: https://forest-chore-open-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List admin logs

> Returns admin logs for a specific project, sorted by `createdAt` in descending order (most recent first). Use the `createdAt` filter for pagination.

<Warning>
  If your project uses SSO, the application token must be generated while logged in with SSO.
</Warning>


## OpenAPI

````yaml reference/api/openapi.json GET /v1/project/{projectName}/admin-logs
openapi: 3.0.0
info:
  title: Forest Admin public API
  version: 1.38.0
servers:
  - url: https://public-api.forestadmin.com
security: []
tags: []
paths:
  /v1/project/{projectName}/admin-logs:
    get:
      summary: List admin logs
      description: >-
        Returns admin logs for a specific project, sorted by `createdAt` in
        descending order (most recent first). Use the `createdAt` filter for
        pagination.
      operationId: listAdminLogs
      parameters:
        - schema:
            type: string
            minLength: 1
            description: The **case sensitive** project name
          required: true
          name: projectName
          in: path
        - schema:
            type: integer
            minimum: 1
            exclusiveMinimum: true
            maximum: 100
            default: 10
            description: >-
              This specifies a limit on the number of objects to return, ranging
              between 1 and 100. Limit is set to 10 by default
          required: false
          name: limit
          in: query
        - schema:
            type: string
            format: email
            description: The administrator email
          required: false
          name: userEmail
          in: query
        - schema:
            type: integer
            minimum: 1
            description: The administrator id
          required: false
          name: userId
          in: query
        - schema:
            type: string
            enum:
              - add
              - remove
              - update
              - initial
            description: The type of action performed
          required: false
          name: type
          in: query
        - schema:
            type: string
            enum:
              - administrator
              - identityProvider
              - forestAdmin
            description: The entity that initiated the action
          required: false
          name: initiator
          in: query
        - schema:
            type: string
            enum:
              - user-project
              - role
              - team
              - environment
            description: The resource affected by the action
          required: false
          name: resource
          in: query
        - schema:
            type: string
            format: date-time
            description: Value to filter by
          required: false
          name: createdAt.eq
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Maximum value to filter by (exclusive). This filter supports
              date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g.,
              2024-06-04T09:21:26.159Z.
          required: false
          name: createdAt.lt
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Minimum value to filter by (inclusive). This filter supports
              date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g.,
              2024-06-04T09:21:26.159Z.
          required: false
          name: createdAt.lte
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Minimum value to filter by (exclusive). This filter supports
              date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g.,
              2024-06-04T09:21:26.159Z.
          required: false
          name: createdAt.gt
          in: query
        - schema:
            type: string
            format: date-time
            description: >-
              Maximum value to filter by (inclusive). This filter supports
              date-time values in ISO 8601 format (YYYY-MM-DDTHH:MM), e.g.,
              2024-06-04T09:21:26.159Z.
          required: false
          name: createdAt.gte
          in: query
      responses:
        '200':
          description: List of admin logs
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    type: boolean
                    description: >-
                      Whether or not there are more elements available after
                      this set. If false, this set comprises the end of the
                      list.
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          enum:
                            - adminLog
                        id:
                          type: string
                          description: ID of the admin log
                        type:
                          type: string
                          enum:
                            - add
                            - remove
                            - update
                            - initial
                          description: The type of action performed
                        resource:
                          type: string
                          enum:
                            - user-project
                            - role
                            - team
                            - environment
                          description: The resource affected by the action
                        initiator:
                          type: string
                          enum:
                            - administrator
                            - identityProvider
                            - forestAdmin
                          description: The entity that initiated the action
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the admin log was created
                        user:
                          type: object
                          properties:
                            object:
                              type: string
                              enum:
                                - user
                            email:
                              type: string
                              format: email
                              description: The user email
                            id:
                              type: integer
                              minimum: 0
                            username:
                              type: string
                              minLength: 1
                          required:
                            - object
                            - email
                            - id
                            - username
                          additionalProperties: false
                          description: The administrator who performed the action
                        newValue:
                          $ref: '#/components/schemas/resource'
                        previousValue:
                          $ref: '#/components/schemas/resource'
                      required:
                        - object
                        - id
                        - type
                        - resource
                        - initiator
                        - createdAt
                      additionalProperties: false
                  parameters:
                    type: object
                    properties:
                      projectName:
                        type: string
                        minLength: 1
                        description: The **case sensitive** project name
                      limit:
                        type: integer
                        minimum: 1
                        exclusiveMinimum: true
                        maximum: 100
                        default: 10
                        description: >-
                          This specifies a limit on the number of objects to
                          return, ranging between 1 and 100. Limit is set to 10
                          by default
                      userEmail:
                        type: string
                        format: email
                        description: The administrator email
                      userId:
                        type: integer
                        minimum: 1
                        description: The administrator id
                      type:
                        type: string
                        enum:
                          - add
                          - remove
                          - update
                          - initial
                        description: The type of action performed
                      initiator:
                        type: string
                        enum:
                          - administrator
                          - identityProvider
                          - forestAdmin
                        description: The entity that initiated the action
                      resource:
                        type: string
                        enum:
                          - user-project
                          - role
                          - team
                          - environment
                        description: The resource affected by the action
                      createdAt.eq:
                        type: string
                        format: date-time
                        description: Value to filter by
                      createdAt.lt:
                        type: string
                        format: date-time
                        description: >-
                          Maximum value to filter by (exclusive). This filter
                          supports date-time values in ISO 8601 format
                          (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
                      createdAt.lte:
                        type: string
                        format: date-time
                        description: >-
                          Minimum value to filter by (inclusive). This filter
                          supports date-time values in ISO 8601 format
                          (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
                      createdAt.gt:
                        type: string
                        format: date-time
                        description: >-
                          Minimum value to filter by (exclusive). This filter
                          supports date-time values in ISO 8601 format
                          (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
                      createdAt.gte:
                        type: string
                        format: date-time
                        description: >-
                          Maximum value to filter by (inclusive). This filter
                          supports date-time values in ISO 8601 format
                          (YYYY-MM-DDTHH:MM), e.g., 2024-06-04T09:21:26.159Z.
                    required:
                      - projectName
                    additionalProperties: false
                    description: The parameters used to fetch the admin logs
                required:
                  - hasMore
                  - data
                  - parameters
              example:
                hasMore: false
                parameters:
                  projectName: Forest
                data:
                  - object: adminLog
                    id: rbCb98wCZ1y-_zv4wrXz
                    type: update
                    initiator: administrator
                    createdAt: '2024-03-14T15:09:26.535Z'
                    resource: team
                    newValue:
                      name: Managers UK
                    user:
                      object: user
                      id: 40
                      username: Alice
                      email: alice@forestadmin.com
                    previousValue:
                      name: Managers
                  - object: adminLog
                    id: fHCb9IXCZ1y_Pzv4wrXz
                    type: add
                    initiator: administrator
                    createdAt: '2024-03-14T15:11:28.148Z'
                    resource: user-project
                    newValue:
                      user:
                        object: user
                        id: 45
                        username: John
                        email: john@forestadmin.com
                      role:
                        object: role
                        name: everything allowed
                      teams:
                        - object: team
                          name: Managers UK
                      permissionLevel: editor
                    user:
                      object: user
                      id: 40
                      username: Alice
                      email: alice@forestadmin.com
        '429':
          description: Too many requests
          headers:
            Retry-After:
              schema:
                type: string
                description: >-
                  The time in seconds after which the client can retry the
                  request
              required: true
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - message
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - message
        5XX:
          description: Unexpected error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - message
      security:
        - bearerAuth: []
components:
  schemas:
    resource:
      anyOf:
        - $ref: '#/components/schemas/user-project'
        - $ref: '#/components/schemas/role'
        - $ref: '#/components/schemas/team'
        - $ref: '#/components/schemas/environment'
    user-project:
      type: object
      properties:
        user:
          type: object
          properties:
            object:
              type: string
              enum:
                - user
            email:
              type: string
              format: email
              description: The user email
            id:
              type: integer
              minimum: 0
            username:
              type: string
              minLength: 1
          required:
            - object
            - email
            - id
            - username
          additionalProperties: false
          description: The user affected by the action
        permissionLevel:
          type: string
          enum:
            - admin
            - editor
            - user
            - developer
            - manager
          description: Permission level of the user
        tags:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              value:
                type: string
            required:
              - key
              - value
            additionalProperties: false
          description: Tags defined for the user
        role:
          type: object
          properties:
            object:
              type: string
              enum:
                - role
            name:
              type: string
              minLength: 1
              description: The name of the role
          required:
            - object
            - name
          additionalProperties: false
          description: The role of the user
        teams:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                enum:
                  - team
              name:
                type: string
                minLength: 1
                description: The name of the team
            required:
              - object
              - name
            additionalProperties: false
            description: The team associated to the user
          description: The list of teams of the user
      required:
        - user
      additionalProperties: false
    role:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: The name of the role
      required:
        - name
      additionalProperties: false
    team:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: The name of the team
      required:
        - name
      additionalProperties: false
    environment:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: The name of the environment
        codeCustomizationVersion:
          type: number
      required:
        - name
        - codeCustomizationVersion
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http
      description: Bearer authentication

````