Aspera

 View Only
  • 1.  Send a Package Metadata

    Posted Fri January 17, 2025 05:04 AM

    Hi,

    We are currently trying to automate the process of sending a package out to someone. The current process from what I understand is a package is created, the files are uploaded to that package, and then the package is sent out. We want to, instead of uploading the files, copy the files into the package that is created using the package id. However, from testing this we can see that the metadata doesn't reflect the correct package size or file count. Is there anyway to update the metadata after copying the files over or another process that might solve this problem?

    Thanks,



    ------------------------------
    Kam
    ------------------------------


  • 2.  RE: Send a Package Metadata

    Posted Fri January 17, 2025 08:24 AM

    Hi Kam,

    In order to be more precise, you should tell which application you are using: Aspera Faspex version 5 or Aspera on Cloud.

    I'll assume it is Faspex version 5 since you're talking about "on prem" storage. (but that's also supported by AoC).

    In either cases anyway, there are 2 ways to place the files in the package after creation:

    • effectively, the most common one is to upload the file (using the transfer spec created by API)
    • but another way, in the case files are already present on the storage is to let the transfer server copy (transfer) the files from a local folder to the package folder (and this can either be a real copy (local transfer), or soft links can be created



    ------------------------------
    Laurent Martin
    ------------------------------



  • 3.  RE: Send a Package Metadata

    Posted Fri January 17, 2025 11:17 AM

    Hi Laurent,

    Apologies, we are using Aspera on Cloud and the Node apis to send the packages. The problem with the 

    • but another way, in the case files are already present on the storage is to let the transfer server copy (transfer) the files from a local folder to the package folder (and this can either be a real copy (local transfer), or soft links can be created

    is the metadata attached to the package doesn't include the files that were copied into the package folder from the local folder. Is there a way to reload the database so it encapsulates the new information/metadata. The metadata we need to ensure accurately reflects what was copied into the folder is file count and package size.

    Thanks,



    ------------------------------
    Kam Dudwal
    ------------------------------



  • 4.  RE: Send a Package Metadata

    Posted Fri January 17, 2025 11:40 AM
    Edited by Laurent Martin Fri January 17, 2025 11:43 AM

    I see...

    BTW "soft link" capability is only in Faspex, not AoC AFAIK. But it does not matter in your case.

    In AoC, it is possible to build a package from multiple sources.

    Send some files using "Connect", and other files using an automated transfer in AoC... etc...

    But it is possible to send the files using any way that involves a transfer (that's the trigger for package data) even local.

    If I understand well your way, is (just to be sure):

    1- create package by API: POST packages
    2- let AoC know how many transfers are expected: PUT packages/:id
    3- transfers the files between two Aspera servers ? (POST /ops/transfers) ??? 

    Note that you can find an example here:

    https://github.com/laurent-martin/aspera-api-examples/blob/main/app/python/src/examples/aoc.py
    Although this one does not step 3, but it is very similar: it uses the transfer daemon instead of node api.

    If this is your scenario, you can do the same, as illustration (and a way to peek into how apis are called) , with ascli:

    ascli aoc packages send @json:'{"name":"title here","recipients":["john@example.com"]}' files_to_send --transfer=node --transfer-info=@json:'{"url":"https://....","username":"node_user","password":"passhere"}'

    (before that, configure with ascli conf wiz)

    The key to have metadata is step 2 (tell transfers expected) and 3- with appropriate transfer spec.



    ------------------------------
    Laurent Martin
    ------------------------------



  • 5.  RE: Send a Package Metadata

    Posted 29 days ago

    Hi,

    I have the copying of the files into the package all working,, however the problem is the metadata associated with the package that is being sent out. I want to change the file names and size using a PUT request. Is this possible or are these values that can't be changed through a PUT request? 

    Thanks,

    Kam



    ------------------------------
    Kam Dudwal
    ------------------------------



  • 6.  RE: Send a Package Metadata

    Posted 28 days ago

    Files can be renamed with the Node API using PUT.

    Sizes come from storage and can't be changed.

    API Hub - IBM Developer

    Ibm remove preview
    API Hub - IBM Developer
    On API Hub, try out and shop for certified APIs from finance, weather, marketing and more on developer playground .
    View this on Ibm >



    ------------------------------
    BEN FORSYTH
    ------------------------------