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

# Add Lark files to dataset by appid, app secret and share urls



## OpenAPI

````yaml https://api.gbase.ai/openapi-redoc.json post /v1/datasets/{dataset_id}/integrations/lark
openapi: 3.1.0
info:
  title: GBase
  description: >
    # Introduce

    This API document can help you understand GBase more deeply. 

    You can train your own AI directly through the interface of this document.



    ##  Authentication


    Home page: [https://gbase.ai](https://gbase.ai)


    Huggingface:
    [https://huggingface.co/gptbase](https://huggingface.co/gptbase)


    The GBase API uses API keys for authentication. Visit your API Keys page to
    retrieve the API key you'll use in your requests.


    Remember that your API key is a secret! Do not share it with others or
    expose it in any client-side code (browsers, apps). 

    Production requests must be routed through your own backend server where
    your API key can be securely loaded from an environment variable or key
    management service.


    All API requests should include your API key in an Authorization HTTP header
    as follows:


    Parameter name: Authorization


    Value: Bearer [YOUR_API_KEY](https://admin.gbase.ai/keys)


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    ## Use steps

    1.Fill in your API keys.


    2.You can create an AI by using either the API interface or the
    administrative backend. Once created, the AI will generate an ID which will
    be required for the subsequent steps.


    3.Use the generated ID to call the file upload interface.


    4.After uploading the file, you can use the question interface to inquire
    about it.
  version: 0.0.1
servers:
  - url: https://api.gbase.ai
security: []
paths:
  /v1/datasets/{dataset_id}/integrations/lark:
    post:
      tags:
        - Datasets
      summary: Add Lark files to dataset by appid, app secret and share urls
      operationId: add_lark_file_to_dataset_v1_datasets__dataset_id__integrations_lark_post
      parameters:
        - required: true
          schema:
            type: string
            format: uuid
            title: Dataset Id
          name: dataset_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LarkIntegrationRuleInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Auth0ImplicitBearer: []
        - Auth0HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    LarkIntegrationRuleInput:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          strip_whitespace: true
        app_id:
          type: string
          minLength: 1
          title: App Id
          strip_whitespace: true
        app_secret:
          type: string
          minLength: 1
          title: App Secret
          strip_whitespace: true
        share_urls:
          items:
            $ref: '#/components/schemas/LarkShareUrlInput'
          type: array
          minItems: 1
          title: Share Urls
        notification_emails:
          items:
            type: string
            format: email
          type: array
          title: Notification Emails
        sync_interval:
          type: integer
          exclusiveMinimum: 600
          title: Sync Interval
          description: Interval in seconds to sync the Lark integration, 0 means no sync
      type: object
      required:
        - name
        - app_id
        - app_secret
        - share_urls
        - sync_interval
      title: LarkIntegrationRuleInput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LarkShareUrlInput:
      properties:
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
          description: Lark file sharing link
        recursive:
          type: boolean
          title: Recursive
          description: Whether to recursively fetch contents of subfolders
        token:
          type: string
          title: Token
      type: object
      required:
        - url
        - recursive
      title: LarkShareUrlInput
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````