Package com.atlan.api

Class FilesEndpoint


public class FilesEndpoint extends HeraclesEndpoint
API endpoints for managing files that can be uploaded to Atlan.
  • Constructor Details

    • FilesEndpoint

      public FilesEndpoint(AtlanClient client)
  • Method Details

    • upload

      Upload a file from a given URL.
      Parameters:
      fromUrl - URL from which to retrieve the file (must be network-accessible from client running the code)
      Returns:
      details of the uploaded file
      Throws:
      AtlanException - on any API communication issues
      MalformedURLException - if the provided URL is invalid
      IOException - on any issues accessing or reading from the provided URL
    • upload

      public AtlanFile upload(String fromUrl, RequestOptions options) throws AtlanException, MalformedURLException, IOException
      Upload a file from a given URL.
      Parameters:
      fromUrl - URL from which to retrieve the file (must be network-accessible from client running the code)
      options - to override default client settings
      Returns:
      details of the uploaded file
      Throws:
      AtlanException - on any API communication issues
      MalformedURLException - if the provided URL is invalid
      IOException - on any issues accessing or reading from the provided URL
    • upload

      public AtlanFile upload(File file) throws AtlanException, IOException
      Upload a file from a local file.
      Parameters:
      file - local file containing the file
      Returns:
      details of the uploaded file
      Throws:
      AtlanException - on any API communication issues
      IOException - on any issues accessing or reading from the provided file
    • upload

      public AtlanFile upload(File file, RequestOptions options) throws AtlanException, IOException
      Upload a file from a local file.
      Parameters:
      file - local file containing the file
      options - to override default client settings
      Returns:
      details of the uploaded file
      Throws:
      AtlanException - on any API communication issues
      IOException - on any issues accessing or reading from the provided file
    • upload

      public AtlanFile upload(InputStream fileSrc, String filename) throws AtlanException
      Upload a file from a given input stream.
      Parameters:
      fileSrc - source of the file, as an input stream
      filename - name of the file the InputStream is reading (must include an extension that accurately represents the type of the file)
      Returns:
      details of the uploaded file
      Throws:
      AtlanException - on any API communication issues
    • upload

      public AtlanFile upload(InputStream fileSrc, String filename, RequestOptions options) throws AtlanException
      Upload a file from a given input stream.
      Parameters:
      fileSrc - source of the file, as an input stream
      filename - name of the file the InputStream is reading (must include an extension that accurately represents the type of the file)
      options - to override default client settings
      Returns:
      details of the uploaded file
      Throws:
      AtlanException - on any API communication issues