SAP Business Technology Platform File API

The File API from SAP Business Technology Platform — 1 operation(s) for file.

GitHub OpenAPI

Operations 3

PUT /lm/dataset/files/{path} Upload file (size <= 100Mb) #
DELETE /lm/dataset/files/{path} Delete file #
GET /lm/dataset/files/{path} Download file #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sap-btp:sap-btp-file-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sap-btp-file-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sap Btp File API
  version: 2.42.0
  description: 'Operations tagged File across 2 of this provider''s published API definitions: ai-core.yaml, sap-btp-ai-core-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.ai.{region}.ml.hana.ondemand.com/v2
  description: Production endpoint for SAP AI Core
  variables:
    region:
      enum:
      - prod.eu-central-1.aws
      - prodeuonly.eu-central-1.aws
      - prod.us-east-1.aws
      - prod.ap-northeast-1.aws
      - prod-ap11.ap-southeast-1.aws
      - prod-ap20.australiaeast.azure
      - prod.ap-southeast-2.aws
      - prod-eu20.westeurope.azure
      - prod-ap30.australia-southeast1.gcp
      - prod-in30.asia-south1.gcp
      - prod-sa30.me-central2.gcp
      - prod-us21.eastus.azure
      - prod-eu30.europe-west3.gcp
      - prod-us30.us-central1.gcp
      - prod-br10.sa-east-1.aws
      default: prod.eu-central-1.aws
security:
- Oauth2: []
tags:
- name: File
paths:
  /lm/dataset/files/{path}:
    parameters:
    - $ref: '#/components/parameters/DSetpath'
    - $ref: '#/components/parameters/DSetresourceGroupHeader'
    put:
      tags:
      - File
      summary: Upload file (size <= 100Mb)
      operationId: file.upload
      description: 'Endpoint for uploading file. The maximum file size depends on the actual implementation

        but must not exceed 100MB. The actual file size limit can be obtained by querying

        the AI API Runtime Capabilities Endpoint and checking the limits in the section of the `fileUpload` extension.


        Path cannot be a prefix, it must be a path to an object.

        Clients may group the objects in any manner they choose by specifying path prefixes.


        Allowed mime-types will be decided by the implementation.

        Content-Type header can be set to "application/octet-stream" but the implementation is responsible

        for detecting the actual mime type and checking against the allowed list of mime types.

        For security reasons, implementations cannot trust the mime type sent by the client.


        Example URLs:

        /files/dar/schemas/schema.json

        /files/icr/datasets/training/20201001/20201001-01.csv

        /files/icr/datasets/training/20201001/20201001-02.csv

        /files/mask-detection/training/mask-detection-20210301.tar.gz'
      parameters:
      - $ref: '#/components/parameters/DSetoverwrite'
      requestBody:
        description: Body of the file upload request
        content:
          '*/*':
            schema: {}
      responses:
        '201':
          $ref: '#/components/responses/DSetFileCreated'
        '400':
          $ref: '#/components/responses/DSetBadRequest'
        '409':
          $ref: '#/components/responses/DSetConflict'
        '413':
          $ref: '#/components/responses/DSetRequestTooLarge'
    delete:
      tags:
      - File
      summary: Delete file
      operationId: file.delete
      description: Delete the file specified by the path parameter.
      responses:
        '204':
          $ref: '#/components/responses/DSetSuccess'
        '400':
          $ref: '#/components/responses/DSetBadRequest'
        '404':
          $ref: '#/components/responses/DSetNotFound'
    get:
      tags:
      - File
      summary: Download file
      operationId: file.download
      description: Endpoint for downloading file. The path must point to an individual file.
      responses:
        '200':
          $ref: '#/components/responses/DSetFileContent'
        '400':
          $ref: '#/components/responses/DSetBadRequest'
        '404':
          $ref: '#/components/responses/DSetNotFound'
    servers:
    - url: https://api.ai.{region}.ml.hana.ondemand.com/v2
      description: Production endpoint for SAP AI Core
      variables:
        region:
          enum:
          - prod.eu-central-1.aws
          - prodeuonly.eu-central-1.aws
          - prod.us-east-1.aws
          - prod.ap-northeast-1.aws
          - prod-ap11.ap-southeast-1.aws
          - prod-ap20.australiaeast.azure
          - prod.ap-southeast-2.aws
          - prod-eu20.westeurope.azure
          - prod-ap30.australia-southeast1.gcp
          - prod-in30.asia-south1.gcp
          - prod-sa30.me-central2.gcp
          - prod-us21.eastus.azure
          - prod-eu30.europe-west3.gcp
          - prod-us30.us-central1.gcp
          - prod-br10.sa-east-1.aws
          default: prod.eu-central-1.aws
components:
  schemas:
    DSetUrl:
      type: string
      format: url
      example: https://download.example.com/test/file.bin
    DSetFileCreationResponse:
      description: Response for successful file creation
      type: object
      required:
      - message
      - url
      properties:
        message:
          type: string
          description: File creation response message
          example: File creation acknowledged
        url:
          $ref: '#/components/schemas/DSetUrl'
    DSetError:
      description: Error Response
      type: object
      properties:
        code:
          type: string
          minLength: 1
        message:
          type: string
          minLength: 1
        target:
          type: string
          minLength: 1
        requestId:
          type: string
        details:
          type: array
          uniqueItems: true
          minItems: 0
          items:
            required:
            - code
            - message
            properties:
              code:
                type: string
                minLength: 1
              message:
                type: string
                minLength: 1
      required:
      - code
      - message
      x-examples:
        example-1:
          code: '03021655'
          message: Bad request encountered. Please try again with possible-solution-here.
          target: /url/path
          requestId: 9832bf934f3743v3948v3
          details:
          - code: '01041211'
            message: Optional nested error message.
  responses:
    DSetConflict:
      description: The specified file already exists and cannot be overwritten.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                $ref: '#/components/schemas/DSetError'
          example:
            error:
              code: '03021655'
              message: The specified file already exists and cannot be overwritten. Please try again with possible-solution-here.
              target: /url/path
              requestId: 9832bf934f3743v3948v3
              details:
              - code: '01041211'
                message: Optional nested error message.
    DSetRequestTooLarge:
      description: The file size exceeds the supported limit.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                $ref: '#/components/schemas/DSetError'
          example:
            error:
              code: '03021655'
              message: The file size exceeds the supported limit.
              target: /url/path
              requestId: 9832bf934f3743v3948v3
              details:
              - code: '01041211'
                message: Optional nested error message.
    DSetFileContent:
      description: OK
      headers:
        X-Content-Type-Options:
          schema:
            type: string
          description: as per SEC-228 value should always be "nosniff"
          required: true
        Content-Security-Policy:
          schema:
            type: string
          description: as per SEC-228 value should always be "default-src 'none'; sandbox"
          required: true
        Content-Disposition:
          schema:
            type: string
          description: as per SEC-228 value should always be "attachment"
          required: true
      content:
        application/octet-stream:
          schema:
            type: string
            format: binary
    DSetNotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                $ref: '#/components/schemas/DSetError'
          example:
            error:
              code: '03021655'
              message: The resource you requested was not found. Please try again with possible-solution-here.
              target: /url/path
              requestId: 9832bf934f3743v3948v3
              details:
              - code: '01041211'
                message: Optional nested error message.
    DSetFileCreated:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DSetFileCreationResponse'
      headers:
        Location:
          description: URL of the newly created file. This URL can be passed on to the artifact API to register this file.
          schema:
            $ref: '#/components/schemas/DSetUrl'
    DSetSuccess:
      description: The request was processed successfully.
    DSetBadRequest:
      description: The specification of the resource was incorrect
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                $ref: '#/components/schemas/DSetError'
          example:
            error:
              code: '03021655'
              message: Bad request encountered. Please try again with possible-solution-here.
              target: /url/path
              requestId: 9832bf934f3743v3948v3
              details:
              - code: '01041211'
                message: Optional nested error message.
  parameters:
    DSetoverwrite:
      name: overwrite
      in: query
      required: false
      schema:
        type: boolean
      description: If true, then file is overwritten. Default is false.
    DSetpath:
      name: path
      in: path
      required: true
      schema:
        type: string
        format: path
        pattern: ^(([\w.-]+):([\w.-]+)|([\w.-]+))(/([\w./-]+[\w.-]+)?)?$
        maxLength: 1024
      description: path relative to the object store root URL in the secret
    DSetresourceGroupHeader:
      in: header
      name: AI-Resource-Group
      description: Specify a resource group id
      schema:
        type: string
      required: false
  securitySchemes:
    Oauth2:
      type: oauth2
      description: OAuth client credentials (client ID and secret) are required. These can be requested from SAP BTP cloud cockpit.
      flows:
        clientCredentials:
          tokenUrl: https://{subdomain_identity_zone}.authentication.{host}/oauth/token
          scopes: {}
externalDocs:
  description: Documentation for SAP AI Core
  url: https://help.sap.com/docs/AI_CORE?version=CLOUD
x-refined-from:
- ai-core.yaml
- sap-btp-ai-core-openapi.yml
x-sap-shortText: Create and manage AI scenarios, trainings, deployments, and artifacts in SAP AI Core.