SAP AI SDK for JavaScript - v2.8.0
    Preparing search index...

    Variable FileApiConst

    FileApi: {
        _defaultBasePath: undefined;
        fileDelete: (
            path: string,
            headerParameters?: { "AI-Resource-Group"?: string },
        ) => OpenApiRequestBuilder<any>;
        fileDownload: (
            path: string,
            headerParameters?: { "AI-Resource-Group"?: string },
        ) => OpenApiRequestBuilder<Blob>;
        fileUpload: (
            path: string,
            body: any | undefined,
            queryParameters?: { overwrite?: boolean },
            headerParameters?: { "AI-Resource-Group"?: string },
        ) => OpenApiRequestBuilder<DSetFileCreationResponse>;
    }

    Representation of the 'FileApi'. This API is part of the 'AI_CORE_API' service.

    Type Declaration

    • _defaultBasePath: undefined
    • fileDelete: (
          path: string,
          headerParameters?: { "AI-Resource-Group"?: string },
      ) => OpenApiRequestBuilder<any>

      Delete the file specified by the path parameter.

    • fileDownload: (
          path: string,
          headerParameters?: { "AI-Resource-Group"?: string },
      ) => OpenApiRequestBuilder<Blob>

      Endpoint for downloading file. The path must point to an individual file.

    • fileUpload: (
          path: string,
          body: any | undefined,
          queryParameters?: { overwrite?: boolean },
          headerParameters?: { "AI-Resource-Group"?: string },
      ) => OpenApiRequestBuilder<DSetFileCreationResponse>

      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

      Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.