xebia-apyhub-file-manipulation
Service icon

Xebia_APYHub - File Manipulation

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded on 7 Aug (yesterday) by 
Rupesh Wani (https://www.outsystems.com/profile/18btdm3t1f/)
0.0
 (0 ratings)
xebia-apyhub-file-manipulation

Xebia_APYHub - File Manipulation

Documentation
1.0.0

Overview

The APYHub API Connector for OutSystems integrates a wide range of file manipulation services from APYHub into your OutSystems applications. This connector provides powerful tools for image and video processing, allowing developers to enhance their applications with advanced file manipulation capabilities.

Key Features

This connector supports the following server actions from the File Manipulation category:

  1. Apply Watermark on Images: Add a watermark to images.
  2. Change Background of Images: Change the background of images.
  3. Compress Image: Reduce the file size of images.
  4. Crop Image: Crop images to specified dimensions.
  5. Extract Audio from Video: Extract audio tracks from video files.
  6. Extract Video Metadata: Retrieve metadata information from video files.
  7. Image Filters: Apply various filters to images.
  8. Remove Background from Image: Remove the background from images.
  9. Resize Image: Resize images to specified dimensions.

Prerequisites

  • An active APYHub account.
  • Obtain an APY Token from the APYHub official site.


Installation

  1. Download the APYHub API Connector from the OutSystems Forge.
  2. Install the component in your OutSystems environment.
  3. Configure the component by setting the APY Token in the API Connector settings.

Configuration

  1. Navigate to the Service Center in your OutSystems environment.
  2. Go to Applications and select the APYHub API Connector.
  3. Open the APYHub API Connector configuration screen.
  4. Enter your APY Token obtained from the APYHub official site.
  5. Save the configuration.

Using the APYHub API Connector

Server Actions

Apply Watermark on Images

Add a watermark to images.

Parameters:

  • imageFile (Binary): The image file to which the watermark will be applied.
  • watermarkImage (Binary): The watermarked image.
  • position (Text): The position of the watermark on the image (e.g., "top-left", "center").


Change Background of Images

Change the background of images.

Parameters:

  • imageFile (Binary): The image file whose background will be changed.
  • backgroundImageFile (Binary): The new background image file.


Compress Image

Reduce the file size of images.

Parameters:

  • imageFile (Binary): The image file to be compressed.
  • compressionPercentage (Integer): The level of compression to apply (e.g., 1-100).


Crop Image

Crop images to specified dimensions.

Parameters:

  • imageFile (Binary): The image file to be cropped.
  • Top (Integer): The desired top margin for cropping can be specified either in pixels.
  • Bottom (Integer): The desired bottom margin for cropping can be specified either in pixels.
  • left (Integer): The desired left margin for cropping can be specified either in pixels.
  • Right (Integer): The desired right margin for cropping can be specified either in pixels.


Extract Audio from Video

Extract audio tracks from video files.

Parameters:

  • videoFile (Binary): The video file from which audio will be extracted.


Extract Video Metadata

Retrieve metadata information from video files.

Parameters:

  • videoFile (Binary): The video file from which metadata will be extracted.


Image Filters

Apply various filters to images.

Parameters:

  • imageFile (Binary): The image file to which the filter will be applied.
  • filter (Text): The type of filter to apply (e.g., "grayscale", "sepia").


Remove Background from Image

Remove the background from images.

Parameters:

  • imageFile (Binary): The image file from which the background will be removed.


Resize Image

Resize images to specified dimensions.

Parameters:

  • imageFile (Binary): The image file to be resized.
  • width (Integer): The new width of the image.
  • height (Integer): The new height of the image.


Error Handling

  • Invalid Token: Ensure that the APY Token is correctly configured. If invalid, request a new token from APYHub.
  • API Limits: Keep track of your daily API usage to avoid exceeding the limit of 5 calls per day on the free version. Consider upgrading your APYHub plan if more calls are needed.
  • Invalid Input: Ensure that the input data is correctly formatted and valid for the respective server action.


Best Practices

  • Token Security: Store the APY Token securely and avoid exposing it in client-side code to prevent unauthorized use.
  • Error Logging: Implement logging for API responses to monitor usage and handle errors effectively. Capture response codes and error messages for debugging.
  • Optimize Calls: Minimize the number of API calls by caching results where possible to stay within usage limits. Use appropriate data structures and algorithms to reduce redundant calls.
  • Input Validation: Validate and preprocess input data to ensure it is well-formed and suitable for processing.


Support

For any issues or further assistance, please refer to the APYHub documentation or contact their support team.


Conclusion

The APYHub API Connector for OutSystems is a versatile tool for integrating advanced file manipulation capabilities into your applications. By leveraging APYHub's comprehensive file manipulation APIs, you can enhance your applications with functionalities such as image watermarking, background changing, compression, cropping, audio extraction from videos, video metadata extraction, image filtering, background removal, and resizing. With straightforward setup and configuration, this connector is an essential addition to your OutSystems development toolkit.