• 0 Vote(s) - 0 Average
  • 5
  • 4
  • 3
  • 2
  • 1
Thread Modes

REST API file upload
#1
How can I upload files from my computer to EasyVista incident using REST?

I have read https://wiki.easyvista.com/xwiki/bin/vie...nt-request but it really lacks information about the format of POST method and really everything else.

From what I understand is that I need to convert file to base64 (I have been using this: https://www.motobit.com/util/base64-decoder-encoder.asp)

Where should I put my encoded text when using REST? What is the overall format of this?

Im using URL like:

Code:
http://srv-ev-dev.int.radiolinja.ee/api/v1/50004/requests/I180518_0005/documents


And my POST body at this moment:
Code:
{
 "requests": [
   {
       "rfc_number":"I180518_0005",
        "Documents": [
       {
           "HREF": "/9j/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlh
Y3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAAB
XAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAAABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFla
AAABuAAAABRyVFJDAAABzAAAAEBnVFJDAAABzAAAAEBiVFJDAAABzAAAAEBkZXNjAAAAAAAAAANj
MgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0ZXh0AAAAAEZCAABYWVogAAAAAAAA9tYAAQAAAADT
LVhZWiAAAAAAAAADFgAAAzMAAAKkWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeF
AAAY2lhZWiAAAAAAAAAkoAAAD4QAALbPY3VydgAAAAAAAAAaAAAAywHJA2MFkghrC/YQPxVRGzQh
8SmQMhg7kkYFUXdd7WtwegWJsZp8rGm/fdPD6TD////gABBKRklGAAECAAABAAEAAP/tAJxQaG90
b3Nob3AgMy4wADhCSU0EBAAAAAAAgBwCZwAUb0wtQlpYa3NjT0RxRjlDMURIQmUcAigAYkZCTUQw
MTAwMGFiZDAzMDAwMDYzMWQwMDAwOGIzNzAwMDA4NDM5MDAwMDA0M2IwMDAwNWI0NjAwMDA4MzY0
MDAwMGFjNmMwMDAwMDk3MDAwMDAyYjczMDAwMGZmYmEwMDAw/9sAQwAJBgcIBwYJCAgICgoJCw4X
Dw4NDQ4cFBURFyIeIyMhHiAgJSo1LSUnMiggIC4/LzI3OTw8PCQtQkZBOkY1Ozw5/9sAQwEKCgoO
DA4bDw8bOSYgJjk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5
OTk5/8IAEQgDwALKAwAiAAERAQIRAf/EABoAAQEAAwEBAAAAAAAAAAAAAAABAgMEBQb/xAAYAQEB
AQEBAAAAAAAAAAAAAAAAAQIDBP/aAAwDAAABEAIQAAABtXluUQUkyVFCWFlCzIjIYsoY2oi2oolA
qJlMqgACiKIoFAIoLBQsoi0xZU1bLDTltGq7Kc7oHNvyoAKcV6IaMOmGXN2ahqyxOzm6OaMmrM2b//2Q=="
       }
   ]
   }
   ]
}


Can anyone give me the correct format of this body?

Thanks
Kaspark, proud to be a member of EV CONNECT FORUM since Nov 2017.

#2
(05-18-2018, 04:52 AM)Kaspark Wrote: How can I upload files from my computer to EasyVista incident using REST?

I have read https://wiki.easyvista.com/xwiki/bin/vie...nt-request but it really lacks information about the format of POST method and really everything else.

From what I understand is that I need to convert file to base64 (I have been using this: https://www.motobit.com/util/base64-decoder-encoder.asp)

Where should I put my encoded text when using REST? What is the overall format of this?

Im using URL like:

Code:
http://srv-ev-dev.int.radiolinja.ee/api/v1/50004/requests/I180518_0005/documents


And my POST body at this moment:
Code:
{
 "requests": [
   {
       "rfc_number":"I180518_0005",
        "Documents": [
       {
           "HREF": "/9j/4gIcSUNDX1B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w8bOSYgJjk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5
OTk5/8IAEQgDwALKAwAiAAERAQIRAf/EABoAAQEAAwEBAAAAAAAAAAAAAAABAgMEBQb/xAAYAQEB
AQEBAAAAAAAAAAAAAAAAAQIDBP/aAAwDAAABEAIQAAABtXluUQUkyVFCWFlCzIjIYsoY2oi2oolA
qJlMqgACiKIoFAIoLBQsoi0xZU1bLDTltGq7Kc7oHNvyoAKcV6IaMOmGXN2ahqyxOzm6OaMmrM2b//2Q=="
       }
   ]
   }
   ]
}


Can anyone give me the correct format of this body?

Thanks

Hello,
See that thread : http://www.global.easyvista.com/evconnec...d-830.html

Don't know why E.Gomez have always "Bad Request", it's work for me.

P.ABBE
ABBE Philippe, proud to be a member of EV CONNECT FORUM since Nov 2015.

#3
Hi Philippe
My last post at other thread was about versions.. perhaps we have different and this is the reason for my problem?
Please, can you check what version do you have?

thanks

#4
(05-21-2018, 03:43 AM)egomez Wrote: Hi Philippe
My last post at other thread was about versions.. perhaps we have different and this is the reason for my problem?
Please, can you check what version do you have?

thanks

Hello,
My versions are in the related post
Code:
http://www.global.easyvista.com/evconnect/thread-830-post-2757.html#pid2757
ABBE Philippe, proud to be a member of EV CONNECT FORUM since Nov 2015.






Users browsing this thread: 1 Guest(s)