> ## 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.

# List routines of a base

> Required token scopes: `routine|read`



## OpenAPI

````yaml /swagger.json get /base/{baseId}/routine
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: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /base/{baseId}/routine:
    get:
      tags:
        - routine
      summary: List routines of a base
      description: 'Required token scopes: `routine|read`'
      parameters:
        - schema:
            type: string
          required: true
          name: baseId
          in: path
      responses:
        '200':
          description: All non-deleted routines of the base
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    baseId:
                      type: string
                    name:
                      type: string
                    status:
                      type: string
                      enum:
                        - draft
                        - active
                        - inactive
                    currentSnapshotId:
                      type: string
                      nullable: true
                    config:
                      type: object
                      nullable: true
                      properties:
                        prompt:
                          type: string
                          minLength: 1
                        model:
                          type: string
                        effort:
                          type: string
                          enum:
                            - low
                            - medium
                            - high
                            - xhigh
                        trigger:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - schedule
                            rrule:
                              type: string
                              minLength: 1
                              description: >-
                                RFC 5545 RRULE parts, e.g.
                                'FREQ=DAILY;BYHOUR=9;BYMINUTE=0'
                            timezone:
                              type: string
                              description: IANA timezone, e.g. Asia/Shanghai
                            starting:
                              type: string
                              format: date-time
                              description: >-
                                No runs before this moment; the DTSTART anchor
                                for COUNT / INTERVAL
                            ending:
                              type: string
                              format: date-time
                          required:
                            - type
                            - rrule
                            - timezone
                            - starting
                        maxRunMinutes:
                          type: integer
                          minimum: 5
                          maximum: 120
                          description: >-
                            Wall-clock limit for one run in minutes; a run past
                            it is aborted and marked failed(timeout). Default
                            30.
                        chatMode:
                          type: string
                          enum:
                            - new
                            - continue
                          description: >-
                            Where each run's conversation goes: 'new' (default)
                            opens a fresh chat per run; 'continue' sends the run
                            into the previous run's chat, so the agent sees what
                            it did last time.
                      required:
                        - prompt
                        - trigger
                    hasDraft:
                      type: boolean
                    createdBy:
                      type: string
                    createdTime:
                      type: string
                    lastModifiedBy:
                      type: string
                      nullable: true
                    lastModifiedTime:
                      type: string
                      nullable: true
                    nextRunAt:
                      type: string
                      nullable: true
                    alertContact:
                      type: object
                      nullable: true
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        email:
                          type: string
                          nullable: true
                        avatar:
                          type: string
                          nullable: true
                      required:
                        - id
                        - name
                  required:
                    - id
                    - baseId
                    - name
                    - status
                    - currentSnapshotId
                    - config
                    - hasDraft
                    - createdBy
                    - createdTime
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://app.teable.ai/api/base/%7BbaseId%7D/routine \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: JavaScript
          source: >-
            const url = 'https://app.teable.ai/api/base/%7BbaseId%7D/routine';

            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/base/%7BbaseId%7D/routine',
              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/base/%7BbaseId%7D/routine",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


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

````