Programmatically bulk upload of files via restful API

Hi,
If I am building a custom client application and need to bulk upload say 10 files.. what restful API does sharepoint include to accomplish that.
A couple of more questions on the above:
1. Is there any limitation to the size of the file that I can upload via the restful call?
2. Is there any limitation to the number of files that I can upload via the restful call?
3. What are the performance characteristics of bulk upload of files?
4. Does the client side sharepoint 2013 javascript library support buld upload of files.
5. What happens if a there is a failure in uploading one of the files.. after a few have been during the bulk upload?
6. What about bulk upload of other (non-file) data?
Thanks
Naresh

Thanks for pointing out Dave. I will look into the link that you sent...
could you also tell me, if the javascript client library also support this (say I'm writing code to run on a non-windows platform). Also assume that I have the sharepoint hosted on-premise.
Naresh

Similar Messages

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

  • Unable to upload video files via iframe in safari version 3.0

    I m not able 2 upload video files via iframe in safari 3.0.
    i m facing this issue when i try 2 upload a video file via an iframe.
    file gets uploaded properly if i m not using iframe to upload the same.
    this issue is seen only in safari version 3.0 and not in the newer version i.e (3.2.1)
    do anyone has the asnwer for this problem.....???
    would be thankful to him/her...

    Are you using a BT Home Hub with the IP Phone attached. This holds onto the SIP port that iChat uses. There is no way to get the router to release this port.
    I had to return it all to BT as unfit for purpose and switched to Eclipse!

  • Newly created Image not listed via REST API

    Hi,
    I have created a image in azure console .Its created successfully and i could see the created image under "Image" tab in console.Also, the image created with the name appending current date, it was not before.But when I am trying to list images by
    using the below REST API its listing images except the newly created images that have the  name appended with current date.
    https://management.core.windows.net/5f2fe4c3-23b3-45c0-a70c-9560b79dcf56/services/images
    header values:
    x-ms-version : 2012-03-01
    Content-Type : application/xml
    Host: management.core.windows.net
    This makes me fail to launch new VM via REST api.I got the response as follows
    <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadRequest</Code><Message>The image vmyffdd-20140605-813455l does not exist.</Message></Error>
    Please look into this.

    hi,
    From the error, your request parameter was incorrect. I guess your image name may be wrong. How did you write your Image name and url? I suggest you don't forget the '.VHD'. Also,if you use the
    VMImageName element which is only available using version 2014-02-01 or higher
    And I suggest you could try this code sample about how to using REST api to create VM :Simple Windows Azure REST API Sample Tool
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create list items with multiple attachment files using rest api javascript

    In one of user form I am using javascript rest api to create a list item with multiple attachment files. So far I am able to create list item and once created uploading an attachment file. But this is two step process first create an item and then upload
    a file.
    It create an additional version of the item which is not desired. Also I am not able find a way to attach multiple files in a go. Following is the code I am using.
    createitem.executeAsync({
                    url: "/_api/web/lists/GetByTitle('UserForm')/items(1)/AttachmentFiles/add(FileName='" + aFile.name + "')",
                    method: "POST",
                    contentType: "application/json;odata=verbose",
                    headers: {
                        "Accept": "application/json;odata=verbose",
                        "X-RequestDigest": $("#__REQUESTDIGEST").val()
                    binaryStringRequestBody: true,
                    body: fileContent,
                    success: fnsuccess,
                    error: fnerror
    So somehow I need to combine item attributes along with attachment files in body: param. I visited https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItem but no success.
    Appreciate any help.

    Thanks Mahesh for the reply and post you share it was useful.
    But this does not solve the core of the issue. You are uploading attachments after creation of item and multiple files are being attached in loop. This is kind of iterative update to an existing item with attachments. This will end up creating multiple versions. 
    What I am trying to achieve is to create an item along with multiple attachments in a go. No item updates further to attach a file.
    Please suggest how this can be done in one go. SharePoint does it when one creates an item with multiple attachment.
    Thanks for your reply.

  • How can I access user permission for specific items in Sharepoint 2013 via REST API?

    I want to access user permissions for specific items like lists, documents, folders etc. via the REST API.
    Currently I am hitting the following endpoint:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/getUserEffectivePermissions('win-5a8pp4v402g\\Sharepoint User 2')
    However the response looks like this:
       "d":
           "GetUserEffectivePermissions":
               "__metadata":
                   "type": "SP.BasePermissions"
               "High": "0",
               "Low": "0"
    I cant understand why high and low are both 0? I have added the user to a specific group. Also this is the same result for each of the users. Another thing to note is that I havent added the "Guest" user in the sharepoint server. So when I hit the endpoint for the Guest user, it still shows the same response. So I know there is something I am doing wrong.I want to access permission of a user for a specific item, say a document using the REST API. Can someone tell me how? What would be the endpoint?

    Thanks for the reply. Although this works for Lists, I need to get permissions of documents too. Here is what I have tried:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/GetFileByServerRelativeUrl('/sharepoint_test/site_1/Documents/file1.txt')/GetUserEffectivePermissions(@user)?@user='i%3A0%23%2Ew%7Cwin-5a8pp4v402g%5Csharepoint%20user%201'
    And the response is:
       "error":
           "code": "-1, Microsoft.SharePoint.Client.ResourceNotFoundException",
           "message":
               "lang": "en-US",
               "value": "Cannot find resource for the request GetUserEffectivePermissions."
    Clearly this doesnt work for a file. Whats wrong?

  • Streaming basics - reading large file from RESTful API

    Hey all -
    My command of PowerShell is pretty rudimentary, though I have written a number of scripts.  In a recent example, I was trying to redirect the output of my firm's RESTful API - a small .txt file - into a file, using | out-file <path and
    file>.  THat worked 
    just fine.  However, when I tried to do this with a docx or pdf file, the result was that I ended up with a small file that was 
    unopenable.
    I gather what I need to do is stream the content to a file, but I can't quite see how that is done in Powershell.  The files might  be
    many MB in size and take upwards of 30 seconds to transfer.
    Any basic guidance on how to approach this would be appreciated.  Thanks -
    Paul
    Paul

    Oh so close!
    I'm getting hung up on how to create and pass the session object itself. 
    My first command,
    Invoke-RestMethod -Uri
    <apiKey>9588060291......</apiKey><email>...</email><password>...</password><endOtherSessions>T</endOtherSessions></createSession">https://test.lofco.com/v1/ILCGLServices/session?method=CREATE"&"client=DEV-TEST"&"xml=<createSession><apiKey>9588060291......</apiKey><email>...</email><password>...</password><endOtherSessions>T</endOtherSessions></createSession>
    -SessionVariable s -Outfile 'c:\LofCo\Demos\API Code Samples\XML\Output\createsession_response.xml'
    returns successfully; I can see in the output file the session ID. I was hoping this was captured in the variable s via the -SessionVariable approach, but when I run the second command:
    Invoke-RestMethod -Uri
    <acceptSplash>T</acceptSplash></workspaceEntryRequest">https://test.lofco.com/services/workspaces/entry?client=DEV-TEST"&"workspaceId=226691"&"method=CREATE"&"xml=<workspaceEntryRequest><acceptSplash>T</acceptSplash></workspaceEntryRequest>
    -WebSession $s -Method Post -Outfile 'C:\LofCo\Demos\API Code Samples\XML\Output\enterexchange_response.xml'
    I get a 403 error indicating the session has expired or is otherwise invalid. I'm clearly confused as to how to capture this session and pass it along...
    Any pointers on that piece?  And thanks for your previous assistance.
    Paul
    Paul

  • Error while uploading a file via GS_CM

    Dear experts,
    When we try to upload some files to CRM incident via GS_CM we gen a following error: "operation is not allowed (crm_p_ord)"
    We noticed that the error usually arrears when we upload files with long file names ( 30> chars)
    It's important to say that we can add files having a shorter file name( up to ~30 chars).
    Does anyone know the limitations about the file name (length, special characters, etc.) ?
    We are using CRM7 (ICM).
    Thank you

    Hi,
        Covert quantity to char and upload the data.
    Regards
    Amole

  • Is it possible to Activate / De Activate Campaign via REST API?

    Hi,
    Is it possible to Activate / De activate Campaigns via Eloqua REST API?
    I was checking out this site on Eloqua Rest API, but could not see the option http://secure.eloqua.com/api/docs/Static/Rest/2.0/index.htm
    Regards,
    Aditya

    Dear Kia111,
    It is possible. What you can do is, insert a radio button group and set the appearance as "checkbox". In this case, you radio button group will appear as if two checkboxes are placed. But, the behavior will be the way you wanted. Checking one radio button (checkbox) will uncheck the other and vice-versa.
    In this case, you  need to tweak your code based on the binding values set for each radio button in the radio button group. For eg., say if 1 and 2 are the binding values for two radio buttons:
    if(chkbox.rawValue == "1")
              section.presence = "visible";
         else
              section.presence = "hidden";
    Hope this helps.
    Thanks,
    VJ

  • Can not create Azure Scheduler Job Colloection correctly via rest API

    Hi Folks,
    I am trying to create a Azure Scheduler job collection via the rest API using Azure Ruby SDK
    I created the request following the API reference. Request body is as follow:
    <Resource xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/windowsazure">
    <IntrinsicSettings>
    <Plan>Standard</Plan>
    <Quota>
    <MaxJobCount>10</MaxJobCount>
    <MaxRecurrence>
    <Frequency>Second</Frequency>
    <Interval>1</Interval>
    </MaxRecurrence>
    </Quota>
    </IntrinsicSettings>
    </Resource>
    After sending the request, I can see the job collection created in the management portal, but the status of that job collection is "Unknown". I can not add add/update jobs under that job collection.
    Below is the log entry I got:
    RuntimeError (ESC[31mESC[1mInternalError: The server encountered an internal error. Please retry the request.ESC[0mESC[0m):
    Can someone shed me some lights on this?
    Thank you very in advance!
    Roy

    Hi Roy,
    I am not good at Ruby. But I didn't find any maintenance  information from azure dashboard. The issue is very weird,I will test it on my side and come back.
    Thanks & Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problems uploading big files via FTP and downloading files

    I've been having problems uploading big files like video files (.mov 12MB) via FTP to my website (small files like .html or .doc I can upload but it takes longer than usual). I'm using Fetch 4.0.3. as FTP. Same problems when downloading files via Bit Torrent. I recently moved to Spain, since then I seem to have the problem. But my roommate with a PC doesn't have that problem. Connecting to internet with Ethernet cable also didn't resolve the problem. I also tested it from a Starbucks coffee connecting to Internet from there but still couldn't upload that 12MB file to the FTP. The security settings for firewall are set to "allow all incoming connections". I didn't change any of my settings so I don't know what the problems could be. I have a MacBook Pro, Mac OS X (10.5.7) Any suggestions? Thanks!

    Welcome to Apple Discussions!
    Much of what is available on Bittorrent is not legal, beta, or improperly labelled versions. If you want public domain software, see my FAQ*:
    http://www.macmaps.com/macosxnative.html#NATIVE
    for search engines of legitimate public domain sites.
    http://www.rbrowser.com/ has a light mode that supports binary without SSH security.
    http://rsug.itd.umich.edu/software/fugu/ has ssh secure FTP.
    Both I find are quick and a lot more reliable than Fetch. I know Fetch used to be the staple FTP program, but it grew too big for my use.
    - * Links to my pages may give me compensation.

  • How do I get information about items in a collection via REST API?

    Hi There -
    I am trying to get information, specifically the last comment date, for each item in a collection. I am trying to do this with the REST API. I have tried the following approaches:
    /v1/activities/{activity id}/items - This API does not appear to return the items in the colleciton. I get the collection item in the returned XML, but not the items in the collection.
    /v1/items/{item id} - I tried using this API with the collection item id, but it does not provide details for the items contained in the collection.
    I would ideally like to be able to use an API to get a list of all of the items in a collection, then go over that list to get the most recent comment and comment date in the item.
    Any help is appreciated. Code examples are API descriptions would be great.
    Thanks and regards,
    Rob Stevenson

    Hi Robert,
    /v1/items/{item-id}/item_data with {item-id} being the ID of the collection item should return an XML containing the item IDs of the items in the collection.
    In a second step you can call /v1/items/ with the items IDs of the items in the collection. This should get you the meta data.
    Regards,
      Rüdiger

  • Upload / Save file via FileUpload UI Element under predefined path

    Hi,
    I am pretty new to this topic and need some help.
    I need a Web Dynpro App where I can select a file via FileUpload UI Element and save this file to a predefined path e.g. to a server. I already found [this help|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71?quicklink=index&overridelayout=true] but in this example the file is stored at the SAP Server!
    How can I achieve this? May you give me a sample code?
    I appreciate your help.
    Regards

    Hi Martni, Above answer was incomplete
    try{                         
         File fp = new File(relativePath+ fileName);
         fp.createNewFile();
         FileOutputStream fos = new FileOutputStream(fp);
         BufferedOutputStream bos = new BufferedOutputStream(fos);
         InputStream l_is_FileStream = elAttachmentsElement.getVa_Resource().read(false);
         int l_int_NoOfBytes = l_is_FileStream.available();
         byte[] byteArray = new byte[l_int_NoOfBytes];
         l_is_FileStream.read(byteArray, 0, l_int_NoOfBytes);
         bos.write(byteArray);
         bos.flush();
    catch (Exception e) {
         wdComponentAPI.getMessageManager().reportException("Cannot save the file: "+fileName);
    In the above snippet "relativePath" is the path to the folder in WAS and  "filename" is the name of the file along with its extn Ex. test.doc, or image.jpg
    InputStream l_is_FileStream = elAttachmentsElement.getVa_Resource().read(false)
    The above line of code is the sixth line in the snippet and here "elAttachmentsElement" is the element of the node having "Va_Resource" context attribute, which is bound to FileUpload UI element.
    Regards,
    Vishweshwara P.K.M
    Edited by: Vishweshwara P.K.M on Jun 28, 2010 1:31 PM

  • Upload PDF Files via Drag n Drop in OAWD

    Hi All,
    We have a requirement to Enable Financial Services OAWD workflow inboxes to accept PDF invoice files via u2018Drag & Dropu2019 functionality. The current configuration only allows TIFF and FAX invoice files to be loaded by u2018Drag & Dropu2019.
    So can anubody tell me the steps to modify these inboxes to accept PDF files , currently they accept only TIFF and FAX Files.
    Thanks & Regards,
    Loveena.

    1. The screen on the mini is less than an inch larger than the Nexus. Not sure if that's what you are looking for.
    2.  Transferring files is as it has always been: through iTunes.   Music files must be synced using iTunes and can only be played in the Music App.
    3. For transfer of other types of files you can use either iTunes Sharing or a 3rd party App that supports other means of sending files.
    iOS: About File Sharing
    http://support.apple.com/kb/ht4094
    You'll need an App that can handle the type of file you want to transfer.
    Due to the way the file system is on an iPad direct drag and drop is not possible.  The iPad unliike android OS has no file system that is user accessible, as such all files must be associated with an App, and recide within that app's closed off file area.
    This is the main reason there are no viruses on an iPad.

  • Uploading a File via Web Services

    We can't seem to find a way to upload a file without needing
    to POST it to a specific page on the web server. On top of that, it
    apparently also creates a new session in Asp.NET when we do the
    post. How do you guys work around this issue?

    I have solved the problem - for future references or for anybody else having the same problem read below:
    The JavaDoc for HttpOutputStream states the following:
    "There are two constructors for this class, one taking a length parameter, and one without any parameters. If the stream is created with a length then the request will be sent with the corresponding Content-length header and anything written to the stream will be written on the socket immediately. This is the preferred way. If the stream is created without a length then one of two things will happen: if, at the time of the request, the server is known to understand HTTP/1.1 then each write() will send the data immediately using the chunked encoding. If, however, either the server version is unknown (because this is first request to that server) or the server only understands HTTP/1.0 then all data will be written to a buffer first, and only when the stream is closed will the request be sent."
    Constructing the HttpOutputStream with the size of the content to upload solved the problem. I guess the HTTP version was unknown or Oracle only understands HTTP/1.0 (anybody that can clear this up?), causing everything to be buffered (in memory) only to be send when the streams was closed, which in the case of a big file caused OutOfMemeryError.

Maybe you are looking for