API gives 404 response on /message

Discussion in 'LiquidFiles General' started by Johannes, Nov 14, 2017.

  1. Johannes

    Johannes New Member

    Joined:
    Nov 14, 2017
    Messages:
    3
    Likes Received:
    0
    Hi Guys,

    Sorry if this has been asked before ...

    When I run the example shell script on https://man.liquidfiles.com/api/sending_files.html

    I get a 404 even though I do receive the files and can download them successfully.

    I have written a Python script to automate the sending of large reports and also get the 404. I can just ignore the exception raised but that does not feel like the right thing to do. ;)

    Any ideas?
     
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    806
    Likes Received:
    31
    Hi,

    you should list against which LF version are you trying the sending API. I was not able to reproduce it on the latest v3.1.10 when I used the send API example (JSON based file uploads method).
     
  3. Johannes

    Johannes New Member

    Joined:
    Nov 14, 2017
    Messages:
    3
    Likes Received:
    0
    Okay so it seems that if I use the XML API it does work without returning a 404...

    When I make the content type application/json I get the 404 (text/xml does work).

    Interesting that I were able to upload files with a JSON request.

    Anyways I will continue using the XML API.

    Thanks!
     
  4. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    806
    Likes Received:
    31
    Hi,

    Yes for the legacy LF v2.6.x there is supported XML format in APIs: https://man.liquidfiles.com/api/v2/
    https://man.liquidfiles.com/api/v2/sending_files.html

    Please note that LF appliance v2.x has been end of life and and end of support since Jun 2017. So if you are developing a long term application,
    then it's worth to migrate the LF server to v3.1.x and develop your application with API v4 which supports JSON from scratch: https://man.liquidfiles.com/api/introduction_and_authentication.html
    The XML based API will be removed soon in LiquidFiles v3.2.

    Migration to LF v3.x details are here: https://man.liquidfiles.com/install/update_v3.html
     
  5. Johannes

    Johannes New Member

    Joined:
    Nov 14, 2017
    Messages:
    3
    Likes Received:
    0
    Cool thanks for the information, I will contact our LF system owner and make sure that they are aware of the eol status.

    Here are the scripts I wrote as part of a reporting solution that uploads ~30MB spreadsheets daily ... https://github.com/dadecoza/liquidfiles-fileupload. The JSON version should work with the v4 API.

    Thanks again,
    Johannes le Roux
     
  6. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    806
    Likes Received:
    31
    yes, I had a look and the message has been sent properly from your Py script with the v4 JSON API.
     
  7. GrantR

    GrantR New Member

    Joined:
    Mar 16, 2018
    Messages:
    2
    Likes Received:
    0
    Hi, I'm having the 404 issue as well, however in my case the file is not sent nor is the notification email.
    My LF version is 3.1.13 but the api version is 3. Would it be best to upgrade?
     
  8. GrantR

    GrantR New Member

    Joined:
    Mar 16, 2018
    Messages:
    2
    Likes Received:
    0
    from the account GET:
    {"user":{"api_version":3,"version":"v3.1.13","version_numeric":30113,
     
  9. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    806
    Likes Received:
    31
  10. Abiral shakya

    Abiral shakya New Member

    Joined:
    May 29, 2018
    Messages:
    2
    Likes Received:
    0
    Hello David,
    I am trying to send file using the API
    My liquidfiles admin shows version 3.2.4

    My sample request is as follows

    curl -s -X POST $serverurl/messages --user '$api_key:x' -H 'content-type: application/json' -d '{ "message": { "recipients": ["aasdf@asdf.com"], "subject": "test subject", "message": "Please let me know what you think!", "expires_at": "2018-06-30", "send_email": true, "authorization": 3, "attachments": ["asdfqqwerqwerqdfasdfasdf"] } }'

    But I'm getting error response.
    {
    "error": {
    "path_not_found": "/messages"
    }
    }

    I have been struggling with the send message api for the past 2 days. Could you please help. Thank you.
     
  11. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    806
    Likes Received:
    31
    Thanks for info, we have fixed typo in the Send API example, my apologize inconvenience, can you please replace the "messages" with "message" in the url and the try it once again. curl -s -X POST $serverurl/message --user '$api_key:x' ........
     
  12. Abiral shakya

    Abiral shakya New Member

    Joined:
    May 29, 2018
    Messages:
    2
    Likes Received:
    0
    Thankx David,
    `/message` works
     

Share This Page