API returns deviceTypes and fileTypes, which is required for uploading and downloading valid files based on deviceType and fileType.

  1. Parse the response from the API to extract the relevant information -

    deviceTypes - An array of objects, each containing information like ID, name, and associated fileTypes.

    fileTypes - An array of objects nested within each deviceType object, containing details like ID, name, platform values, inputFields, fileInheritable, downloadable, and fileMetaType.

  2. Validating FileMeta requirements before Upload -

    For each file you want to upload, identify its deviceType and fileType.

    Look up the corresponding fileType object within the relevant deviceType based on the deviceType and fileType IDs.

    Extract the fileMeta validationMetaData information from the fileType object.

    Compare the fileMeta validationMetaData information of the file you want to upload with the requirements present in the API response.

    Ensure the file format, type, and any other validation criteria defined in the inputFields and fileMeta information are met.

    If any validation fails, the file will be marked as invalid or even fails to upload it.

By following these steps and considering the additional points, you can effectively upload and download files based on the device types and file types provided by the API, ensuring file validity and successful processing.

Required permission: none

Click Try It! to start a request and see the response here!