Topic
  • 5 replies
  • Latest Post - ‏2012-10-22T16:08:18Z by melahn
melahn
melahn
7 Posts

Pinned topic QuickFile API's

‏2012-10-18T21:27:29Z |
 
IBM QuickFile includes RESTful API's for user management and file transfers.   For example, you can add a user or send a file using simple REST services.   
 
I wanted to highlight that I've posted updated documentation about these API's, including quite a bit of sample code, to the B2B  and Commerce Developers Community.
 
Feedback welcome! 
 

Updated on 2012-10-22T16:08:18Z at 2012-10-22T16:08:18Z by melahn
  • KJYOO
    KJYOO
    4 Posts

    Re: QuickFile API's

    ‏2012-10-22T12:57:31Z  
    First of all, I appreciate your job regarding RESTful API sample code for QuickFile.
     
    I'm testing your QuickFileSendPackage sample and I've got below error message.
    Could you please give me some advice for that?
     
    FYI, Of course, QuickFile server is QuickFile Open Beta version.
    Thanks in advance.
    --------------------------
    D:\QuickfileAPI>"C:\Program Files\Java\jdk1.6.0_14\bin\java" QuickFileSendPackag
    e 192.168.211.128 9080 dmisawa@demos.ibm.com Password1234 "Javelin 100 Design" "
    Here are the latest specifications" "bzechman@demos.ibm.com,sdaryn@demos.ibm.com
    ,lshin@demos.ibm.com"  "D:\QuickfileAPI\Test"
    Create Package ...
    Exception: Error creating package Javelin 100 Design (rc = 404) 
    ------------------------
  • melahn
    melahn
    7 Posts

    Re: QuickFile API's

    ‏2012-10-22T14:18:05Z  
    • KJYOO
    • ‏2012-10-22T12:57:31Z
    First of all, I appreciate your job regarding RESTful API sample code for QuickFile.
     
    I'm testing your QuickFileSendPackage sample and I've got below error message.
    Could you please give me some advice for that?
     
    FYI, Of course, QuickFile server is QuickFile Open Beta version.
    Thanks in advance.
    --------------------------
    D:\QuickfileAPI>"C:\Program Files\Java\jdk1.6.0_14\bin\java" QuickFileSendPackag
    e 192.168.211.128 9080 dmisawa@demos.ibm.com Password1234 "Javelin 100 Design" "
    Here are the latest specifications" "bzechman@demos.ibm.com,sdaryn@demos.ibm.com
    ,lshin@demos.ibm.com"  "D:\QuickfileAPI\Test"
    Create Package ...
    Exception: Error creating package Javelin 100 Design (rc = 404) 
    ------------------------
      Hope you find the examples useful.  
     
    A 404 could mean ...
    - that there is no such user as dmisawa@demos.ibm.com (the sender in the example)  - make sure the referenced users exist 
    - the root url does not exist (in the open beta we are still using the root url /host:port/mftadhoc whereas the examples use the url /host:port/quickfile)
     
    One thing to look at is to dump the content of the package entry string (the variable 'pe' in my example) and then just try to use a REST client like curl or the Advanced REST client Chrome extension to HTTP POST that and  iterate until you see rc of 20x (success)
    Updated on 2012-10-22T14:18:05Z at 2012-10-22T14:18:05Z by melahn
  • KJYOO
    KJYOO
    4 Posts

    Re: QuickFile API's

    ‏2012-10-22T14:43:56Z  
    • melahn
    • ‏2012-10-22T14:17:32Z
      Hope you find the examples useful.  
     
    A 404 could mean ...
    - that there is no such user as dmisawa@demos.ibm.com (the sender in the example)  - make sure the referenced users exist 
    - the root url does not exist (in the open beta we are still using the root url /host:port/mftadhoc whereas the examples use the url /host:port/quickfile)
     
    One thing to look at is to dump the content of the package entry string (the variable 'pe' in my example) and then just try to use a REST client like curl or the Advanced REST client Chrome extension to HTTP POST that and  iterate until you see rc of 20x (success)
    I've modified root url as /host:port/mftadhoc.
    And It works fine with below messages.
    Thank you very much..
    ----------------------------------------------
    D:\QuickfileAPI>"C:\Program Files\Java\jdk1.6.0_14\bin\java" QuickFileSendPackag
    e 192.168.211.128 9080 dmisawa@demos.ibm.com Password1234 "Javelin 100 Design" "
    Here are the latest specifications" "bzechman@demos.ibm.com,sdaryn@demos.ibm.com
    ,lshin@demos.ibm.com"  "D:\QuickfileAPI\Test"
    Create Package ...
    Package created
     name: Javelin 100 Design
     id: pkg_0ca1aea0-0833-4f7a-93ab-cdea0cb12042
    Add Files to Package pkg_0ca1aea0-0833-4f7a-93ab-cdea0cb12042 ...
    Send File commons-codec-1.7.jar ...
    File uploaded
     name: commons-codec-1.7.jar
     bytes: 259600
    File commons-codec-1.7.jar marked complete
    Send File QuickFileSendPackage.class ...
    File uploaded
     name: QuickFileSendPackage.class
     bytes: 12155
    File QuickFileSendPackage.class marked complete
    Send File QuickFileSendPackage.java ...
    File uploaded
     name: QuickFileSendPackage.java
     bytes: 16751
    File QuickFileSendPackage.java marked complete
    Finalize Package ...
    Package pkg_0ca1aea0-0833-4f7a-93ab-cdea0cb12042 marked complete
    Done
    -----------  
     
  • KJYOO
    KJYOO
    4 Posts

    Re: QuickFile API's

    ‏2012-10-22T15:01:27Z  
    • KJYOO
    • ‏2012-10-22T14:43:56Z
    I've modified root url as /host:port/mftadhoc.
    And It works fine with below messages.
    Thank you very much..
    ----------------------------------------------
    D:\QuickfileAPI>"C:\Program Files\Java\jdk1.6.0_14\bin\java" QuickFileSendPackag
    e 192.168.211.128 9080 dmisawa@demos.ibm.com Password1234 "Javelin 100 Design" "
    Here are the latest specifications" "bzechman@demos.ibm.com,sdaryn@demos.ibm.com
    ,lshin@demos.ibm.com"  "D:\QuickfileAPI\Test"
    Create Package ...
    Package created
     name: Javelin 100 Design
     id: pkg_0ca1aea0-0833-4f7a-93ab-cdea0cb12042
    Add Files to Package pkg_0ca1aea0-0833-4f7a-93ab-cdea0cb12042 ...
    Send File commons-codec-1.7.jar ...
    File uploaded
     name: commons-codec-1.7.jar
     bytes: 259600
    File commons-codec-1.7.jar marked complete
    Send File QuickFileSendPackage.class ...
    File uploaded
     name: QuickFileSendPackage.class
     bytes: 12155
    File QuickFileSendPackage.class marked complete
    Send File QuickFileSendPackage.java ...
    File uploaded
     name: QuickFileSendPackage.java
     bytes: 16751
    File QuickFileSendPackage.java marked complete
    Finalize Package ...
    Package pkg_0ca1aea0-0833-4f7a-93ab-cdea0cb12042 marked complete
    Done
    -----------  
     
     
    I put the Korean characters in title and body field. and I've got 500 error?
    Do I should wait for eGA for this testing? or ??
    Thanks.
    --------------------------------------------------------------------------------------------------
    D:\QuickfileAPI>"C:\Program Files\Java\jdk1.6.0_14\bin\java" QuickFileSendPackag
    e 192.168.211.128 9080 dmisawa@demos.ibm.com Password1234 "제목Javelin 100 Desig
    n" "본문Hereare the latest specifications" "bzechman@demos.ibm.com,sdaryn@demos.
    ibm.com,lshin@demos.ibm.com"  "D:\QuickfileAPI\Test"
    Create Package ...
    Exception: Error creating package 제목Javelin 100 Design (rc = 500)
    --------------------------------------------------------------------------------------------------
     
     
  • melahn
    melahn
    7 Posts

    Re: QuickFile API's

    ‏2012-10-22T16:08:18Z  
    • KJYOO
    • ‏2012-10-22T15:01:27Z
     
    I put the Korean characters in title and body field. and I've got 500 error?
    Do I should wait for eGA for this testing? or ??
    Thanks.
    --------------------------------------------------------------------------------------------------
    D:\QuickfileAPI>"C:\Program Files\Java\jdk1.6.0_14\bin\java" QuickFileSendPackag
    e 192.168.211.128 9080 dmisawa@demos.ibm.com Password1234 "제목Javelin 100 Desig
    n" "본문Hereare the latest specifications" "bzechman@demos.ibm.com,sdaryn@demos.
    ibm.com,lshin@demos.ibm.com"  "D:\QuickfileAPI\Test"
    Create Package ...
    Exception: Error creating package 제목Javelin 100 Design (rc = 500)
    --------------------------------------------------------------------------------------------------
     
     
     
    I was able to create a QuickFile package with that name, though I am using a code drop that is about 6 weeks later than the Open Beta.   What I did was just modify the name to prepend the characters as illustrated below using Eclipse.