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

# Get trash

> Get trash list for spaces or bases



## OpenAPI

````yaml /swagger.json get /trash
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
paths:
  /trash:
    get:
      tags:
        - trash
      description: Get trash list for spaces or bases
      parameters:
        - schema:
            type: string
          required: false
          name: spaceId
          in: query
        - schema:
            type: string
            enum:
              - space
              - base
          required: true
          name: resourceType
          in: query
      responses:
        '200':
          description: Get trash successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  trashItems:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            resourceId:
                              type: string
                            resourceType:
                              type: string
                              enum:
                                - space
                                - base
                                - table
                                - app
                                - workflow
                            deletedTime:
                              type: string
                            deletedBy:
                              type: string
                          required:
                            - id
                            - resourceId
                            - resourceType
                            - deletedTime
                            - deletedBy
                        - type: object
                          properties:
                            id:
                              type: string
                            resourceIds:
                              type: array
                              items:
                                type: string
                            resourceType:
                              type: string
                              enum:
                                - view
                                - field
                                - record
                            deletedTime:
                              type: string
                            deletedBy:
                              type: string
                          required:
                            - id
                            - resourceIds
                            - resourceType
                            - deletedTime
                            - deletedBy
                  userMap:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        email:
                          type: string
                        avatar:
                          type: string
                          nullable: true
                        id:
                          type: string
                        name:
                          type: string
                      required:
                        - email
                        - avatar
                        - id
                        - name
                  resourceMap:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                        - type: object
                          properties:
                            id:
                              type: string
                            spaceId:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - spaceId
                            - name
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            type:
                              type: string
                              enum:
                                - grid
                                - calendar
                                - kanban
                                - form
                                - gallery
                                - plugin
                          required:
                            - id
                            - name
                            - type
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            type:
                              type: string
                              enum:
                                - singleLineText
                                - longText
                                - user
                                - attachment
                                - checkbox
                                - multipleSelect
                                - singleSelect
                                - date
                                - number
                                - rating
                                - formula
                                - rollup
                                - conditionalRollup
                                - link
                                - createdTime
                                - lastModifiedTime
                                - createdBy
                                - lastModifiedBy
                                - autoNumber
                                - button
                            isLookup:
                              type: boolean
                              nullable: true
                            isConditionalLookup:
                              type: boolean
                              nullable: true
                            options:
                              type: array
                              nullable: true
                              items:
                                type: string
                          required:
                            - id
                            - name
                            - type
                            - isLookup
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - trashItems
                  - userMap
                  - resourceMap
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url 'https://app.teable.ai/api/trash?spaceId=SOME_STRING_VALUE&resourceType=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/trash?spaceId=SOME_STRING_VALUE&resourceType=SOME_STRING_VALUE';

            const options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/trash?spaceId=SOME_STRING_VALUE&resourceType=SOME_STRING_VALUE',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/trash?spaceId=SOME_STRING_VALUE&resourceType=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````