REST API + inline images

Hi,
I am trying to display (in my C# app) messages received via REST API with inline images (image in body html with src="cid:[email protected]").
I can see no image/attachments in message.
Can u pls advise?
tnx
MK

thanks,
I get a JSON array of messages from the REST API.
One of the messages has a BODY with ContentType HTML and within the HTML an image with src="cid:[email protected]"
How can I retrieve this image?
(I am trying to create a new message based on this one. I need to obtain this image in order to add it inline to the new message).

Similar Messages

  • 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.

  • Capture Image rest API deletes Virtual machine

    Hi,
    When we capture an image of a virtual machine, then it deletes the virtual machine in the azure portal itself.This is the same behavior through REST API as well.
    Is there any way we can keep the Virtual machine after a capture on the image is done through REST API?
    Thanks

    Hi,
    You could refer the following link for details on how to capture an Azure virtual machine running Windows and it clearly mentions that "When you capture an image of a generalized virtual machine, the virtual
    machine is deleted."
    http://azure.microsoft.com/en-in/documentation/articles/virtual-machines-capture-image-windows-server/
    Instead, you could try taking a snapshot of the VM using "Export-AzureVM" and "Import-AzureVM".
    You could refer the following link for details:
    http://blogs.technet.com/b/heyscriptingguy/archive/2014/01/24/create-backups-of-virtual-machines-in-windows-azure-by-using-powershell.aspx
    Also you could consider cloning your VM (https://github.com/dsdinter/Azure-VM-clone).
    Regards,
    Malar.

  • REST API, multiple places for one text in Emails JSON

    Hi,
    I am using REST API to operate on Emails object. Now I am having a question which confuses me. As you can see, from the returned JSON there are three places stored the email content text "this is test h...." which locate at "htmlContent", "root" and "plainText". So a problem is which is the real text which affects the update back to Eloqua by put/post method.  Or what did I miss?
    Another major problem besides the aboe problem, I found there are also other diferences like format.
    "htmlBody":
    this is test h<\/span><\/td><\/tr><\/table><\/div><\/div><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"37\" id=\"empty7\"><\/td><\/tr><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"19\" id=\"empty8\"><\/td>\r\n<td align=\"left\" valign=\"top\" width=\"6\" height=\"19\" id=\"empty9\"><\/td><td align=\"left\" valign=\"top\" width=\"292\" height=\"19\" id=\"empty10\"><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"19\" id=\"empty11\"><\/td><\/tr><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"51\" id=\"empty12\"><\/td><td align=\"left\" valign=\"top\" width=\"6\" height=\"51\" id=\"empty13\"><\/td><td valign=\"top\" align=\"left\" rowspan=\"1\" colspan=\"1\" width=\"292\" height=\"51\" id=\"view14\" style=\"color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px\"><div id=\"sc3432\" class=\"sc-view hidden-border inline-styled-view editor-outline\" style=\"left: 57px; width: 292px; top: 76px; height: 51px; color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px; overflow: hidden\"><div class=\"co-border-style\" style=\"\">\r\n<table width=\"292\" height=\"51\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bordercollapse=\"collapse\" class=\"co-style-table\" style=\"color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px; margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px\"><tr><td valign=\"top\" class=\"valign-able\"><span class=\"remove-absolute\">IE11 seems<a href=\"http://s1134754694.t.en25.com/e/er?s=1134754694&lid=5&elq=<span class="eloquaemail">recipientid<\/span>\" title=\"link test\"> does not suppor<\/a>t text mo<a href=\"http://www.example.com/?elq=~~eloqua..type--emailfield..syntax--recipientid~~&elqCampaignId=~~eloqua..type--campaign..campaignid--0..fieldname--id~~\">de. T<\/a>his is <b><font style=\"font-size:22px;\">create<\/font><\/b>d from Chrome.
    "root:
    "IE11 seems<a href=\\\"http://www.example.com/?elqTrack=true\\\" title=\\\"link test\\\"> does not suppor<\/a>t text mo<a href=\\\"http://www.example.com/\\\">de. T<\/a>his is <b><font style=\\\"font-size:22px;\\\">create<\/font><\/b>d from Chrome.\"
    "plainText":
    this is test h    \r\n\r\nIE11 seems does not suppor <http://<elqdomain type=1/>/e/er?s=1134754694&lid=5&elq=<span class=eloquaemail>recipientid<\/span>>t text mode. T <http://www.example.com/?elq=~~eloqua..type--emailfield..syntax--recipientid~~&elqCampaignId=~~eloqua..type--campaign..campaignid--0..fieldname--id~~>his is created from Chrome.
    So the problem is how do I differentiate them?
    "bounceBackEmail": "[email protected]",
    "contentSections": [],
    "createdAt": "1409394422",
    "createdBy": "12",
    "currentStatus": "Draft",
    "depth": "complete",
    "dynamicContents": [],
    "emailFooterId": "1",
    "emailGroupId": "1",
    "emailHeaderId": "1",
    "encodingId": "3",
    "fieldMerges": [],
    "folderId": "42",
    "forms": [],
    "htmlContent": {
      "docType": "<!DOCTYPE html>",
      "htmlBody": "<body style=\"\"> <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td align=\"center\" height=\"0\"><\/td><\/tr><tr><td><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bordercollapse=\"collapse\" align=\"center\" width=\"600\" id=\"sc3170\" style=\"table-layout: auto\"><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"20\" id=\"empty0\"><\/td><td align=\"left\" valign=\"top\" width=\"6\" height=\"20\" id=\"empty1\"><\/td><td align=\"left\" valign=\"top\" width=\"292\" height=\"20\" id=\"empty2\"><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"20\" id=\"empty3\"><\/td><\/tr><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"37\" id=\"empty4\"><\/td><td valign=\"top\" align=\"left\" rowspan=\"1\" colspan=\"2\" width=\"298\" height=\"37\" id=\"view5\" style=\"color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px\">\r\n<div id=\"sc3447\" class=\"sc-view hidden-border inline-styled-view editor-outline\" style=\"left: 51px; width: 298px; top: 20px; height: 37px; color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px; overflow: hidden\"><div class=\"co-border-style\" style=\"\"><table width=\"298\" height=\"37\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bordercollapse=\"collapse\" class=\"co-style-table\" style=\"color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px; margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px\"><tr><td valign=\"top\" class=\"valign-able\"><span class=\"remove-absolute\">this is test h<\/span><\/td><\/tr><\/table><\/div><\/div><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"37\" id=\"empty7\"><\/td><\/tr><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"19\" id=\"empty8\"><\/td>\r\n<td align=\"left\" valign=\"top\" width=\"6\" height=\"19\" id=\"empty9\"><\/td><td align=\"left\" valign=\"top\" width=\"292\" height=\"19\" id=\"empty10\"><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"19\" id=\"empty11\"><\/td><\/tr><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"51\" id=\"empty12\"><\/td><td align=\"left\" valign=\"top\" width=\"6\" height=\"51\" id=\"empty13\"><\/td><td valign=\"top\" align=\"left\" rowspan=\"1\" colspan=\"1\" width=\"292\" height=\"51\" id=\"view14\" style=\"color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px\"><div id=\"sc3432\" class=\"sc-view hidden-border inline-styled-view editor-outline\" style=\"left: 57px; width: 292px; top: 76px; height: 51px; color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px; overflow: hidden\"><div class=\"co-border-style\" style=\"\">\r\n<table width=\"292\" height=\"51\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bordercollapse=\"collapse\" class=\"co-style-table\" style=\"color: #000000; font-family: Arial; font-size: 12px; line-height: 18px; letter-spacing: 0px; margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px\"><tr><td valign=\"top\" class=\"valign-able\"><span class=\"remove-absolute\">IE11 seems<a href=\"http://s1134754694.t.en25.com/e/er?s=1134754694&lid=5&elq=<span class="eloquaemail">recipientid<\/span>\" title=\"link test\"> does not suppor<\/a>t text mo<a href=\"http://www.example.com/?elq=~~eloqua..type--emailfield..syntax--recipientid~~&elqCampaignId=~~eloqua..type--campaign..campaignid--0..fieldname--id~~\">de. T<\/a>his is <b><font style=\"font-size:22px;\">create<\/font><\/b>d from Chrome.<\/span><\/td><\/tr><\/table><\/div><\/div><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"51\" id=\"empty15\"><\/td><\/tr><tr><td align=\"left\" valign=\"top\" width=\"51\" height=\"473\" id=\"empty16\"><\/td><td align=\"left\" valign=\"top\" width=\"6\" height=\"473\" id=\"empty17\"><\/td>\r\n<td align=\"left\" valign=\"top\" width=\"292\" height=\"473\" id=\"empty18\"><\/td><td align=\"left\" valign=\"top\" width=\"251\" height=\"473\" id=\"empty19\"><\/td><\/tr><\/table><\/td><\/tr><tr><td align=\"center\" height=\"0\"><\/td><\/tr><\/table> <\/body>",
      "metaTags": [],
      "root": "SC.Page.design({mainView: CoreOrion.DropView.design({inlineStyles: {\"borderWidth\": \"2\",\"borderStyle\": \"none\"},childViews: [CoreOrion.TextBoxView.design({layout: {\"left\": 57,\"top\": 76,\"height\": 51,\"width\": 292},value: \"IE11 seems<a href=\\\"http://www.example.com/?elqTrack=true\\\" title=\\\"link test\\\"> does not suppor<\/a>t text mo<a href=\\\"http://www.example.com/\\\">de. T<\/a>his is <b><font style=\\\"font-size:22px;\\\">create<\/font><\/b>d from Chrome.\",inlineStyles: {\"borderWidth\": \"2\",\"borderStyle\": \"none\",\"color\": \"#000000\",\"fontFamily\": \"Arial\",\"fontSize\": \"12px\",\"lineHeight\": \"18px\",\"borderColor\": \"#000\",\"letterSpacing\": \"0px\"}}),CoreOrion.TextBoxView.design({layout: {\"left\": 51,\"top\": 20,\"height\": 37,\"width\": 298},value: \"this is test h\",inlineStyles: {\"borderWidth\": \"2\",\"borderStyle\": \"none\",\"color\": \"#000000\",\"fontFamily\": \"Arial\",\"fontSize\": \"12px\",\"lineHeight\": \"18px\",\"borderColor\": \"#000\",\"letterSpacing\": \"0px\"}})]})})",
      "systemHeader": "<style>body{   } a img{border: none;}.ReadMsgBody { width: 100%;}.ExternalClass {width: 100%;}div.sc-view.hidden-border.inline-styled-view.editor-outline {height: 100% !important;}<\/style>",
      "type": "StructuredHtmlContent"
    "hyperlinks": [
       "href": "http://s1134754694.t.en25.com/e/er?s=1134754694&lid=5&elq=<span class="eloquaemail">recipientid<\/span>",
       "id": "-1",
       "name": " does not suppor",
       "type": "Hyperlink"
       "href": "http://www.example.com/",
       "id": "-2",
       "name": "de. T",
       "type": "Hyperlink"
    "id": "71",
    "images": [],
    "isPlainTextEditable": "false",
    "isTracked": "false",
    "landingPages": [],
    "layout": "{\"body\":{\"width\":600,\"height\":600}}",
    "name": "Erica Email 2",
    "permissions": "fullControl",
    "plainText": "\r\n\r\nthis is test h    \r\n\r\nIE11 seems does not suppor <http://<elqdomain type=1/>/e/er?s=1134754694&lid=5&elq=<span class="eloquaemail">recipientid<\/span>>t text mode. T <http://www.example.com/?elq=~~eloqua..type--emailfield..syntax--recipientid~~&elqCampaignId=~~eloqua..type--campaign..campaignid--0..fieldname--id~~>his is created from Chrome.    \r\n\r\n",
    "replyToEmail": "[email protected]",
    "replyToName": "Technology Partner – Welocalize",
    "sendPlainTextOnly": "false",
    "senderEmail": "[email protected]",
    "senderName": "Technology Partner – Welocalize",
    "style": "{}",
    "subject": "Erica",
    "type": "Email",
    "updatedAt": "1409547402",
    "updatedBy": "12"

    hi leo,
    if you're looking to update the contents of the email then:
    * change htmlBody to update the html version of the email
    * change plainText to update the plain text version of the email
    you can safely ignore the root property.
    ~ alex

  • Extracting Raw Data Using Excel Services REST API

    I am trying to create a home page in SharePoint 2013 that shows quick stats based on an Excel workbook stored in a document library. Through my research I found that I could leverage the Excel Services REST API to pull the information I need from the workbook
    via URIs and display it on a SharePoint page in a seamless manner.
    The problem I am having is pulling the data I need as raw text.
    For example, I can create a page in HTML that says "Our sales for the month grew by [X%]" and use an img src tag that points to
    http://sample.com/_vti_bin/ExcelRest.aspx/Documents/workbook.xlsx/Model/Ranges('Sheet1!A1')?$format=image to show a picture of cell A1 which contains the data I want to show inline on my page.
    I want a way to pull the data in cell A1 as raw text so that I can format it as part of the HTML page. I tried using
    $format=html, but that just takes me to a separate page where the cell is formatted exactly as it is in the workbook.
    Is there a way to do what I am trying to do? The more detailed your response can be, the better as I am fairly new to these features. And also, is there a way to perform calculations of cells in HTML? Thanks in advance.

    Hi,
    According to your description, you might want to extract text value from a specific cell in an Excel file using Excel Services REST API.
    As there is no such predefined format can be used to return text value only, I would suggest you return the value as json format, then parse it and set to your HTML
    tag using jQuery.
    Here is a <p> tag with a script which can set the value of the <p> tag with the value gets from cell “A1”:
    <p id="cell1">test</p>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
    //replace the strings below with yours
    var libName = "Shared Documents";
    var fileName = "Book1.xlsx";
    var rangeName = "A1";
    $(function(){
    var s = getCellValue(libName, fileName, rangeName);
    $("#cell1").html(s);
    function getCellValue (libName, fileName, rangeName)
    var cell = "";
    $.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_vti_bin/ExcelRest.aspx/"+libName+"/"+fileName+"/model/Ranges('"+rangeName+"')?$format=json",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    dataType: "json",
    async: false,
    success: function (data) {
    console.log(data.rows[0][0].v);
    cell = data.rows[0][0].v;
    error: function (data) {
    console.log(data);
    return cell;
    </script>
    You can add it into your page via a Content Editor Web Part, it will take effect after the page loaded.
    Here are two links about how to add code into page via Content Editor Web Part:
    http://blogs.msdn.com/b/sharepointdev/archive/2011/04/14/using-the-javascript-object-model-in-a-content-editor-web-part.aspx
    http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Error while accessing SharePoint 2013 news feed REST api - "The server encountered an error processing the request. See server logs for more details."

    Hi Experts,
    I am facing an issue while accessing SharePoint 2013 news feed REST api URL <SiteCollectionURL>/_api/social.feed/my/news from browser giving error "The server encountered an
    error processing the request. See server logs for more details."
    This is happening after posting the image to news feed without entering any text or description with that. If i post an image with some text or description, then i can able to get the feeds. Or else if i delete the image post then also i can able to get
    the feeds.
    I can able to see below logs in log files.
    Exception occured in scope Microsoft.Office.Server.Social.SPSocialRestFeed._SerializeToOData. Exception=System.MissingMethodException: No parameterless constructor defined for this object.     at System.RuntimeTypeHandle.CreateInstance(RuntimeType
    type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache,
    StackCrawlMark& stackMark)     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)     at System.Activator.CreateInstance(Type type, Boolean nonPublic)
        at System.Activator.CreateInstance(Type type)     at Microsoft.SharePoint.C...
    ...lient.ValueTypeConverter.<GetODataProperties>d__2.MoveNext()     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 cachedProperties, Boolean isWritingCollection,
    Action beforePropertiesAction, Action afterPropertiesAction, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)    
    at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteComplexValue(ODataComplexValue complexValue, IEdmTypeReference metadataTypeReference, Boolean isOpenPropertyType, Boolean isWritingCollection, Action beforeValueAction, Action afterValueAction,
    DuplicatePropertyNamesChecker duplicatePropertyNa...
    ...mesChecker, CollectionWithoutExpectedTypeValidator collectionValidator, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperty(ODataProperty
    property, IEdmStructuredType owningType, Boolean isTopLevel, Boolean isWritingCollection, Action beforePropertyAction, EpmValueCache epmValueCache, EpmSourcePathSegment epmParentSourcePathSegment, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker,
    ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 cachedProperties, Boolean isWritingCollection, Action beforePropertie...
    ...sAction, Action afterPropertiesAction, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteComplexValue(ODataComplexValue
    complexValue, IEdmTypeReference metadataTypeReference, Boolean isOpenPropertyType, Boolean isWritingCollection, Action beforeValueAction, Action afterValueAction, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker, CollectionWithoutExpectedTypeValidator
    collectionValidator, EpmValueCache epmValueCache, EpmSourcePathSegment epmSourcePathSegment, ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSeriali...
    ...zer.WriteCollectionValue(ODataCollectionValue collectionValue, IEdmTypeReference propertyTypeReference, Boolean isOpenPropertyType, Boolean isWritingCollection)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperty(ODataProperty
    property, IEdmStructuredType owningType, Boolean isTopLevel, Boolean isWritingCollection, Action beforePropertyAction, EpmValueCache epmValueCache, EpmSourcePathSegment epmParentSourcePathSegment, DuplicatePropertyNamesChecker duplicatePropertyNamesChecker,
    ProjectedPropertiesAnnotation projectedProperties)     at Microsoft.Data.OData.Atom.ODataAtomPropertyAndValueSerializer.WriteProperties(IEdmStructuredType owningType, IEnumerable`1 cachedProperties, Boolean isWritingCollection, Action beforePropertiesAction,
    Action afterPropertiesAct...
    Can anyone please help me out.
    Thanks!
    dinesh

    O365,
    Is this still an issue?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API

    Hi All,
    In one of my tasks, I was struck with one issue, that is "While uploading multiple files into custom list with REST API".
    Iam trying to upload multiple files in library with REST calls for an APP development, my issue is if i wants to upload 4 image at once its storing only
    3 image file and further giving "Conflict" error". Below is the attached screenshot of exact error.
    Error within screenshot are : status Code : 409
    status Text :conflict
    For this operation i am uploading different files as an attachment to an list item, below is the code used for uploading multiple files.
    my code is
    function PerformUpload(listName, fileName, listItem, fileData)
        var urlOfAttachment="";
       // var itemId = listItem.get_id();
        urlOfAttachment = appWebUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items(" + listItem + ")/AttachmentFiles/add(FileName='" + fileName + "')"
        // use the request executor (cross domain library) to perform the upload
        var reqExecutor = new SP.RequestExecutor(appWebUrl);
        reqExecutor.executeAsync({
            url: urlOfAttachment,
            method: "POST",
            headers: {
                "Accept": "application/json; odata=verbose",
                "X-RequestDigest": digest              
            contentType: "application/json;odata=verbose",
            binaryStringRequestBody: true,
            body: fileData,
            success: function (x, y, z) {
                alert("Success!");
            error: function (x, y, z) {
                alert(z);

    Hi,
    THis is common issue if your file size exceeds 
     upload a document of size more than 1mb. worksss well for kb files.
    https://social.technet.microsoft.com/Forums/office/en-US/b888ac78-eb4e-4653-b69d-1917c84cc777/getting-error-while-uploading-multiple-files-in-sharepoint-hosted-app-in-2013-with-rest-api?forum=sharepointdevelopment
    or try the below method
    https://social.technet.microsoft.com/Forums/office/en-US/40b0cb04-1fbb-4639-96f3-a95fe3bdbd78/upload-files-using-rest-api-in-sharepoint-2013?forum=sharepointdevelopment
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Post/Create a poll using Yammer REST API

    Hi everybody,
    I have been working on a project where there is a requirement to develop a custom web part that displays the feeds from Yammer. Also, the logged in user should be able to post messages, attachments, polls from the web part.
    I was able to post messages and attachments using rest api and with yammer embed. But I couldn't find any information/documentation on how to post/create a poll via Yammer API using JavaScript. I've browsed through the documentation provided by Yammer( https://developer.yammer.com/documentation/ )
    and googled a lot, but couldn't get any help.
    Any suggestions regarding this would be highly appreciated.
    Regards,
    Srivikas Nallamilli.
    -- Thanks & Regards, Srivikas.

    Hi,
    Use the same API that you use to fetch messages from yammer i.e https://www.yammer.com/api/v1/messages.json
    When you post a poll, above api will return json respose something as below:
    "external_references":[
    "meta":{
    "requested_poll_interval":60,
    "realtime":{
    "uri":"https://7-791.rt.yammer.com/cometd/",
    "authentication_token":<TOKEN>
    "channel_id":<CHANNEL ID>
    "last_seen_message_id":null,
    "current_user_id":1530316230,
    "followed_references":[
    "ymodules":[
    "id":12147685,
    "inline_html":"<INLINE HTML>",
    "viewer_id":1530316230
    "newest_message_details":null,
    "feed_name":"Company Feed",
    "feed_desc":"",
    "direct_from_body":false
    you will get the poll message in inline html section highlighted in code above.
    Let me know if it works.
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

  • Can we upload any Content Assets using Rest API or Limited?

    Hi,
    Wanted to understand... based on Component Library, what type of Assets/Content we can upload in Eloqua (E10) before we plan for resources. (images, Hyperlinks, Field Merge, Shared Content, Dynamic Content, Signature Layout, Signature Rule)?
    I understand Email Headers and Footers are already included.
    Thank You
    Amit Pandya

    Hi rkrawat it would appear that you can only access images via the REST API using E10. See this chart for more info Eloqua API Chart

  • SharePoint REST API and Asset Library Problem

    Hi dear friends,
    Im having an issue about posting videos via rest to asset library and i couldnt solve yet.
    My main task is to migrate a content(according to the scenario its video) from one farm to another.For that i've planned to use Rest API using server side(c#).While
    any other kind of document types(images,texts) are migrated successfully,videos are giving me hard time.
    I think theres something special going on while creating videos in an asset library,right?
    When i post video as byte array it creates video as .mp4 file but the content type displayed as "Image".I followed this guide : https://msdn.microsoft.com/en-us/library/office/dn292553.aspx and
    couldnt find a way.
    Can someone give me a sample code or help me solve this issue? Looking forward help from SharePointers who worked with rest api :)
    Thanks

    You can look at this link to help you set the metadata using REST.
    http://sharepointfieldnotes.blogspot.com/2014/04/uploading-documents-and-setting.html
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Azure Rest API PUT Block Blob Returns "The specified resource does not exist" CORS

    I am trying to upload a file to Azure Blob storage. For some reason when I try to put a new block blob on in the storage it tells me the resource does not exist. I am sure it is something silly I am missing.
    According to the documentation:
    The Put Blob operation creates a new block blob or page blob, or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
    existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List (REST API) operation.
    CORS is setup and that seems okay.
    When I do a preflight and get this:
    Request URL:https://<account>.blob.core.windows.net/test/image.png
    Request Method:OPTIONS
    Status Code:200 OK
    Request Headers
    OPTIONS /test/image.png HTTP/1.1
    Host: <account>.blob.core.windows.net
    Connection: keep-alive
    Cache-Control: no-cache
    Pragma: no-cache
    Access-Control-Request-Method: PUT
    Origin: http://www.<site>.com
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
    Access-Control-Request-Headers: accept, content-type
    Accept: */*
    Referer: http://www.<site>.com/azure/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8
    Response Headers
    HTTP/1.1 200 OK
    Transfer-Encoding: chunked
    Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: 0d372e95-1524-460a-ab9c-7973d42a7070
    Access-Control-Allow-Origin: http://www.<site>.com
    Access-Control-Allow-Methods: PUT
    Access-Control-Allow-Headers: accept, content-type
    Access-Control-Max-Age: 36000
    Access-Control-Allow-Credentials: true
    Date: Thu, 27 Feb 2014 22:43:52 GMT
    But when I make the PUT request these are the results.
    Request URL:https://<account>.blob.core.windows.net/test/image.png
    Request Method:PUT
    Status Code:404 The specified resource does not exist.
    Request Headers
    PUT /test/image.png HTTP/1.1
    Host: <account>.blob.core.windows.net
    Connection: keep-alive
    Content-Length: 22787
    Cache-Control: no-cache
    Pragma: no-cache
    x-ms-blob-content-dis; filename = "image.png"
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
    Content-Type: image/png
    x-ms-blob-type: BlockBlob
    Accept: application/json, text/plain, */*
    x-ms-version: 2013-08-15
    Origin: http://www.<site>.com
    x-ms-date: Thu, 27 Feb 2014 23:19:19 GMT
    Referer: http://www.<site>.com/azure/
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8
    Response Headers
    HTTP/1.1 404 The specified resource does not exist.
    Content-Length: 223
    Content-Type: application/xml
    Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
    x-ms-request-id: d5a60c8b-356a-44ff-93af-0ea720b5591f
    x-ms-version: 2013-08-15
    Access-Control-Expose-Headers: x-ms-request-id,Server
    Access-Control-Allow-Origin: http://www.<site>.com
    Access-Control-Allow-Credentials: true
    Date: Thu, 27 Feb 2014 23:22:42 GMT

    Your request must be authenticated to be able to upload a blob. Please see our
    Windows Azure Storage: Introducing CORS blog post for more information on using Shared Access Signatures with CORS.

  • Problem when selecting PublishingRollupImage using REST API using Javascript ?

    Hii Guys,
    I am developing  a listing page of News using REST, the custom list contains Title, PublishingRollupImage, and other fields which is provided in the $select
    http://xyz/_api/web/lists/getbytitle('News')/Items?$select=Title,Link,PublishingRollupImage
    the column "PublishingRollupImage" is there and i can return the result by using normal JavaScript API with CAML query.
    but REST calling while specifying this column is failing with this error
    The field or property 'PublishingRollupImage' does not exist
    Microsoft.SharePoint.Client.InvalidClientQueryException
    please note that this is not the (hyperlink/image) field,
    its an existing site columns (publishing image)

    Hi,
    According to your post, my understanding is that you want to get Rollup Image data using REST API.
    Per my knowledge, we can’t get it using REST API.
    We can use Client Object Model to achieve it, the following code snippet for your reference:
    var ctx = new SP.ClientContext();
    var items = ctx.get_web().get_lists().getByTitle('Pages').getItems(new SP.CamlQuery());
    ctx.load(items);
    ctx.executeQueryAsync(function() {
    // Get the first items rollup image, just as an example
    var rollupImage = items.getItemAtIndex(0).get_item('PublishingRollupImage');
    console.log(rollupImage);
    If you still want to use the REST API, we can customize a We Service to achieve it.
    http://sharepointlearningcurve.blogspot.in/2013/08/creating-wcf-rest-service-for.html
    Here is a similar thread for you to take a look:
    http://sharepoint.stackexchange.com/questions/46844/how-to-get-publishingrollupimage-for-page-in-page-library-with-rest-and-jquery
    Best Regards
    Dennis Guo
    TechNet Community Support

  • REST API sync issue

    Hi expert,
      I created a Excel file into SharePoint 2013 Excel library and Post the URL into MS word quick parts of IncludePicture. in MS Word, I can get the Excel Chart. but when I update the chart and publish into SharePoint again, the word file does not change.
    does anybody knows how to sync both ?
    the URL like this,
    http://www.sharepointsite.com/_vti_bin/excelrest.aspx/Excel%20Library/TeamTasks_data.xlsx/model/
    charts('Task%20Status')?$format=image
    Thanks
    James Liang

    Hi,
    There’s a setting in your Trusted File Locations (in the configuration of the Excel Service Application) that you have to check, in order to have the REST API update the connections.
    http://www.sharepointblogs.be/blogs/vandest/archive/2014/02/20/excel-rest-api-not-refreshing-data.aspx
    If the issue still exists, please check whether you have select "Data not stored with document" in the "Field options".
    http://blogs.office.com/2009/11/09/excel-services-in-sharepoint-2010-rest-api-examples/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Return data is null while calling Exchange Online rest api using jquery on Chrome and Mozilla

    Hi,
         I am developing a SharePoint hosted app in which I am calling Exchange online rest api using basic authentication to get mail for the user. This works fine in IE but returns null data when opening in Chrome or Mozilla.
    Is there something I am missing while making rest call to api?
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. Thanks, Ajeet

    Hi,
    This forum is to discuss problems of Office development such as VBA, VSTO, Apps for Office .etc. But I think your question is related to app for SharePoint. I suggest you posting it in
    App for SharePoint forum for more efficient responses.
    Thanks.
    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.

  • SAP BO 4.1 Webi report sample with prompts to try Restful api

    I was not able to find, in the report demo samples available in the SAP BO 4.1 installation, a Webi report with prompts.
    I found many Webi reports samples but all are without prompts.
    I need at least one Webi report sample with prompts to try the Restful API http://localhost:6405/biprws/raylight/v1/documents/7090/parameters and http://localhost:6405/biprws/raylight/v1/documents/7090/schedules with parameters body.
    Where can I found such webi sample?
    Thanks,
    Riccardo

    As you have BI 4.1 installed, you could design a sample webi report using Webi Rich Client tool.
    Open Webi rich client, select the sample eFashion universe drag few objects in the query and a filter. Set the filter as a prompt and save the report to Enterprise.
    Now you could now use this sample report for your handson on REST SDK.
    -Bhushan

Maybe you are looking for

  • Help with Lumia 920 Exchange/Outlook sync email be...

    Hello, I am pretty proficient with Windows Phones. Have had a Focus, and Lumia 900. Now have the 920. Love it, except will NOT sync with my work email, which is Outlook/Exchange. Didn't have a problem with the Lumia 900 doing it. And the 920 will syn

  • Multiple Namespaces in XSD

    Dear SCN users, I have requirement where there are multiple XSDs that need to be clubbed.(XSDs are with different target namespaces) I succesfully clubbed them all,But when I use the same in message mapping I am getting only one target namespace(ns0)

  • MDL export and import in the same repository

    All- I am having a little trouble finding and understanding the exact rules of MDL exportings and importings? I have 1 repository. IN this repository I have say, 3 projects. I want to use and MDL export to selectively export 50 mappings from project

  • Behavior of silent installer not completely specified

    On page 3 of the "Adobe AIR 1.5 Runtime Redistribution Instructions" under "Silent installation" states in part: The AIR application installer installs the correct version of Adobe AIR on the target computer, as required by the AIR application to be

  • DBMS_JOBS fails inside a DDL trigger when granting permissions to roles

    Hi, I have a DDL Trigger through which I am granting SELECT on newly created tables to existing read-only roles CREATE OR REPLACE TRIGGER DBADMIN.grant_permission_trigger AFTER CREATE ON DATABASE DECLARE v_owner dba_tables.owner%TYPE; v_role dba_role