Configure Coherence REST api to return JSON by default?

I am using the Coherence REST API  against Coherence 3.7.1 as detailed here: Introducing Coherence Rest and Building Your First Coherence REST Application
Whenever I attempt to access a URL with a key I get a 404 back unless I append .json to the URL e.g.
http://localhost:9998/dist-cache/0120250663
returns a 404. But
http://localhost:9998/dist-cache/0120250663.json
Returns the object in JSON format.
Is there any way to configure the REST api to return JSON by default so that the .json does not need to be appended to the URL?

I guess what I am looking for is the ContainsAnyMatchFilter as described in the thread below, but accessible through the Coherence REST API. Any ideas? Thanks
Need example for custom ContainsAnyFilter that performs wildcard matches

Similar Messages

  • CSOM/REST API not returning Resource Custom Fields

    Can anyone verify that you can access resource custom fields using CSOM or the REST API? I'm finding that even though I have 6 fields that aren't visible. Anyone have any ideas?

    I determined that the custom fields need to be set first before they are returned by the API. Is it even possible to set a custom field on a ProjectResource or EnterpriseResource using CSOM or JSOM?

  • 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

  • REST API Does not return JSON

    Hi,
    Currently I am Writing a Console Application Which should return JSON but It is not. instead it is returning me XML.
    System.Net.Http.HttpClient _Client = new System.Net.Http.HttpClient();
    _Client.BaseAddress = new Uri("http://test/sites/abc");
    _Client.DefaultRequestHeaders.Add("accept", "application/json; odata=verbose");
    any idea what is wrong ?
    Thanks, Parth

    Hi Parth,
    The following code for your reference:
    string jsonRequest = "http://sharepoint/sites/ts/_api/web/lists";
    CredentialCache credCache = new CredentialCache();
    credCache.Add(new Uri(jsonRequest), "NTLM",CredentialCache.DefaultNetworkCredentials);
    HttpWebRequest spRequest =(HttpWebRequest)HttpWebRequest.Create(jsonRequest);
    spRequest.Credentials = credCache;
    spRequest.UserAgent ="Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
    spRequest.Method = "GET";
    spRequest.Accept = "application/json; odata=verbose";
    HttpWebResponse endpointResponse =(HttpWebResponse)spRequest.GetResponse();
    More information:
    REST Calls to SharePoint 2013 In a Console Application
    http://www.c-sharpcorner.com/UploadFile/d2ee01/rest-calls-to-sharepoint-2013-through-console-application/
    Sharepoint 2013 REST API: The C# Connection: Part 1 Using System.Net.Http.HttpClient
    https://dlr2008.wordpress.com/2013/10/31/sharepoint-2013-rest-api-the-c-connection-part-1-using-system-net-http-httpclient/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • REST API: Create Deployment throwing error BadRequest (The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.)

    Hi All,
    We are trying to access the Create Deployment method stated below
    http://msdn.microsoft.com/en-us/library/windowsazure/ee460813
    We have uploaded the Package in the blob and browsing the configuration file. We have checked trying to upload manually the package and config file in Azure portal and its working
    fine.
    Below is the code we have written for creating deployment where "AzureEcoystemCloudService" is our cloud service name where we want to deploy our package. I have also highlighted the XML creation
    part.
    byte[] bytes =
    new byte[fupldConfig.PostedFile.ContentLength + 1];
                fupldConfig.PostedFile.InputStream.Read(bytes, 0, bytes.Length);
    string a = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
    string base64ConfigurationFile = a.ToBase64();
    X509Certificate2 certificate =
    CertificateUtility.GetStoreCertificate(ConfigurationManager.AppSettings["thumbprint"].ToString());
    HostedService.CreateNewDeployment(certificate,
    ConfigurationManager.AppSettings["SubscriptionId"].ToString(),
    "2012-03-01", "AzureEcoystemCloudService", Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot.staging,
    "AzureEcoystemDeployment",
    "http://shubhendustorage.blob.core.windows.net/shubhendustorage/Infosys.AzureEcoystem.Web.cspkg",
    "AzureEcoystemDeployment", base64ConfigurationFile,
    true, false);   
    <summary>
    /// </summary>
    /// <param name="certificate"></param>
    /// <param name="subscriptionId"></param>
    /// <param name="version"></param>
    /// <param name="serviceName"></param>
    /// <param name="deploymentSlot"></param>
    /// <param name="name"></param>
    /// <param name="packageUrl"></param>
    /// <param name="label"></param>
    /// <param name="base64Configuration"></param>
    /// <param name="startDeployment"></param>
    /// <param name="treatWarningsAsError"></param>
    public static
    void CreateNewDeployment(X509Certificate2 certificate,
    string subscriptionId,
    string version, string serviceName, Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot deploymentSlot,
    string name, string packageUrl,
    string label, string base64Configuration,
    bool startDeployment, bool treatWarningsAsError)
    Uri uri = new
    Uri(String.Format(Constants.CreateDeploymentUrlTemplate, subscriptionId, serviceName, deploymentSlot.ToString()));
    XNamespace wa = Constants.xmlNamespace;
    XDocument requestBody =
    new XDocument();
    String base64ConfigurationFile = base64Configuration;
    String base64Label = label.ToBase64();
    XElement xName = new
    XElement(wa + "Name", name);
    XElement xPackageUrl =
    new XElement(wa +
    "PackageUrl", packageUrl);
    XElement xLabel = new
    XElement(wa + "Label", base64Label);
    XElement xConfiguration =
    new XElement(wa +
    "Configuration", base64ConfigurationFile);
    XElement xStartDeployment =
    new XElement(wa +
    "StartDeployment", startDeployment.ToString().ToLower());
    XElement xTreatWarningsAsError =
    new XElement(wa +
    "TreatWarningsAsError", treatWarningsAsError.ToString().ToLower());
    XElement createDeployment =
    new XElement(wa +
    "CreateDeployment");
                createDeployment.Add(xName);
                createDeployment.Add(xPackageUrl);
                createDeployment.Add(xLabel);
                createDeployment.Add(xConfiguration);
                createDeployment.Add(xStartDeployment);
                createDeployment.Add(xTreatWarningsAsError);
                requestBody.Add(createDeployment);
                requestBody.Declaration =
    new XDeclaration("1.0",
    "UTF-8", "no");
    XDocument responseBody;
    RestApiUtility.InvokeRequest(
                    uri, Infosys.AzureEcosystem.Entities.Enums.RequestMethod.POST.ToString(),
    HttpStatusCode.Accepted, requestBody, certificate, version,
    out responseBody);
    <summary>
    /// A helper function to invoke a Service Management REST API operation.
    /// Throws an ApplicationException on unexpected status code results.
    /// </summary>
    /// <param name="uri">The URI of the operation to invoke using a web request.</param>
    /// <param name="method">The method of the web request, GET, PUT, POST, or DELETE.</param>
    /// <param name="expectedCode">The expected status code.</param>
    /// <param name="requestBody">The XML body to send with the web request. Use null to send no request body.</param>
    /// <param name="responseBody">The XML body returned by the request, if any.</param>
    /// <returns>The requestId returned by the operation.</returns>
    public static
    string InvokeRequest(
    Uri uri,
    string method,
    HttpStatusCode expectedCode,
    XDocument requestBody,
    X509Certificate2 certificate,
    string version,
    out XDocument responseBody)
                responseBody =
    null;
    string requestId = String.Empty;
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
                request.Method = method;
                request.Headers.Add("x-ms-Version", version);
                request.ClientCertificates.Add(certificate);
                request.ContentType =
    "application/xml";
    if (requestBody != null)
    using (Stream requestStream = request.GetRequestStream())
    using (StreamWriter streamWriter =
    new StreamWriter(
                            requestStream, System.Text.UTF8Encoding.UTF8))
                            requestBody.Save(streamWriter,
    SaveOptions.DisableFormatting);
    HttpWebResponse response;
    HttpStatusCode statusCode =
    HttpStatusCode.Unused;
    try
    response = (HttpWebResponse)request.GetResponse();
    catch (WebException ex)
    // GetResponse throws a WebException for 4XX and 5XX status codes
                    response = (HttpWebResponse)ex.Response;
    try
                    statusCode = response.StatusCode;
    if (response.ContentLength > 0)
    using (XmlReader reader =
    XmlReader.Create(response.GetResponseStream()))
                            responseBody =
    XDocument.Load(reader);
    if (response.Headers !=
    null)
                        requestId = response.Headers["x-ms-request-id"];
    finally
                    response.Close();
    if (!statusCode.Equals(expectedCode))
    throw new
    ApplicationException(string.Format(
    "Call to {0} returned an error:{1}Status Code: {2} ({3}):{1}{4}",
                        uri.ToString(),
    Environment.NewLine,
                        (int)statusCode,
                        statusCode,
                        responseBody.ToString(SaveOptions.OmitDuplicateNamespaces)));
    return requestId;
    But every time we are getting the below error from the line
     response = (HttpWebResponse)request.GetResponse();
    <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Code>BadRequest</Code>
      <Message>The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.</Message>
    </Error>
     Any help is appreciated.
    Thanks,
    Shubhendu

    Please find the request XML I have found it in debug mode
    <CreateDeployment xmlns="http://schemas.microsoft.com/windowsazure">
      <Name>742d0a5e-2a5d-4bd0-b4ac-dc9fa0d69610</Name>
      <PackageUrl>http://shubhendustorage.blob.core.windows.net/shubhendustorage/WindowsAzure1.cspkg</PackageUrl>
      <Label>QXp1cmVFY295c3RlbURlcGxveW1lbnQ=</Label>
      <Configuration>77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0NCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KDQogIFRoaXMgZmlsZSB3YXMgZ2VuZXJhdGVkIGJ5IGEgdG9vbCBmcm9tIHRoZSBwcm9qZWN0IGZpbGU6IFNlcnZpY2VDb25maWd1cmF0aW9uLkNsb3VkLmNzY2ZnDQoNCiAgQ2hhbmdlcyB0byB0aGlzIGZpbGUgbWF5IGNhdXNlIGluY29ycmVjdCBiZWhhdmlvciBhbmQgd2lsbCBiZSBsb3N0IGlmIHRoZSBmaWxlIGlzIHJlZ2VuZXJhdGVkLg0KDQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCi0tPg0KPFNlcnZpY2VDb25maWd1cmF0aW9uIHNlcnZpY2VOYW1lPSJXaW5kb3dzQXp1cmUxIiB4bWxucz0iaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS9TZXJ2aWNlSG9zdGluZy8yMDA4LzEwL1NlcnZpY2VDb25maWd1cmF0aW9uIiBvc0ZhbWlseT0iMSIgb3NWZXJzaW9uPSIqIiBzY2hlbWFWZXJzaW9uPSIyMDEyLTA1LjEuNyI+DQogIDxSb2xlIG5hbWU9IldlYlJvbGUxIj4NCiAgICA8SW5zdGFuY2VzIGNvdW50PSIyIiAvPg0KICAgIDxDb25maWd1cmF0aW9uU2V0dGluZ3M+DQogICAgICA8U2V0dGluZyBuYW1lPSJNaWNyb3NvZnQuV2luZG93c0F6dXJlLlBsdWdpbnMuRGlhZ25vc3RpY3MuQ29ubmVjdGlvblN0cmluZyIgdmFsdWU9IkRlZmF1bHRFbmRwb2ludHNQcm90b2NvbD1odHRwcztBY2NvdW50TmFtZT1zaHViaGVuZHVzdG9yYWdlO0FjY291bnRLZXk9WHIzZ3o2aUxFSkdMRHJBd1dTV3VIaUt3UklXbkFrYWo0MkFEcU5saGRKTTJwUnhnSzl4TWZEcTQ1ZHI3aDJXWUYvYUxObENnZ0FiZnhONWVBZ2lTWGc9PSIgLz4NCiAgICA8L0NvbmZpZ3VyYXRpb25TZXR0aW5ncz4NCiAgPC9Sb2xlPg0KPC9TZXJ2aWNlQ29uZmlndXJhdGlvbj4=</Configuration>
      <StartDeployment>true</StartDeployment>
      <TreatWarningsAsError>false</TreatWarningsAsError>
    </CreateDeployment>
    Shubhendu G

  • 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

  • How to import the JSON data that comes from REST API into Excel 2013?

    HI,
    Is there a way to import the JSON data that REST API returns into Excel 2013? If so how?
    Could you please let me know this?
    If you need to know any more info please let me know.
    Thanks,
    Vinay

    I got this. We need to use power query add in for this.
    EXCEL 2013 -> POWER QUERY -> From Web
    Enter the URL for the REST end point and click ok. Power Query editor will show up with the URL and list of your data.
    click on the list -> Right click->drill down
    You will see the no of records the API returned.
    Right Click on List in that table -> To Table and say ok in the next dialog.
    On the displayed columns, there will be a double sided arrow, click on that and select the rows you want to import.
    There you go. You will all the data.
    Click on Apply and close. This will import the data into your excel file.

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

  • How to configure some of VMX file configurations / VM Configuration Parameters via vCloudDirector REST API

    Hi
    We need to configure some settings for VM using vCloudDirector REST API other wise which can be down in 2 following ways.
    1. On VCenter -> select VM  ( in Power Off Mode ) -> Edit Settings -> Options -> Advanced -> General -> Configuration Parameters
         Add row with values like below
               ethernet0.ctxPerDev = 1
    2. -OR- directly login to Esxi Shell .. Open VMX file ( of the VM  - which can be located in /etc/vmware/hostd/vmInventory.xml ) and  add entries manually.
          Follow this KB http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1714
          for editing VMX file.
    We would like to know how this can be achieved using vCloud Director REST. We are using 5.5 versions for both VCD and VCenter.
    Thanks for help.
    Regards,
    Murali G D

    This level of modification is not available via vCloud Director's API afaik.  A similar question came up recently about modifying the amount of Video Memory on a VM, which you have to create some sort of custom workflow directly to vCenter/ESXi about.

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

  • Incorrect coherence-rest-pof-config.xml in coherence-rest.jar (Missing PofSerializer configuration)?

    I'm running Coherence 3.7.1.0.0 with REST enabled as per the instruction. I have included coherence-rest-pof-config.xml in my pof config like so:
    <include>coherence-pof-config.xml</include>
    <include>coherence-rest-pof-config.xml</include>
    When I start Coherence, I get the following error:
    Caused by: (Wrapped: error creating class "com.tangosol.io.pof.ConfigurablePofContext") java.lang.IllegalStateException: Missing PofSerializer configuration (Config=custom-types-pof-config.xml, Type-Id=801, Class-Name=com.tangosol.coherence.rest.internal.Get)
    The config in coherence-rest-pof-config.xml for com.tangosol.coherence.rest.internal.Get is as follows:
    <user-type>
          <type-id>801</type-id>
          <class-name>com.tangosol.coherence.rest.internal.Get</class-name>
        </user-type>
    I had a quick look in the coherence-rest.jar, where com.tangosol.coherence.rest.internal.Get is defined. com.tangosol.coherence.rest.internal.Get implements InvocableMap.EntryProcessor, but not PortableObject.
    Am I missing something? As far as I can see, InvocableMap.EntryProcessor does not implement PortableObject either.
    Is there any way to fix this?
    Thanks

    The jar file coherence-common-1.7.0.16988.jar would have been part of the Coherence Incubator product, and isn't part of the core Coherence product itself.
    You'd probably need to refer to the Coherence Incubator site as there are probably significant changes between the version you are using in 3.5.3 and with what is meant for 12.1.2.

  • Using REST API: Query search box to return list items

    Hey,
    My goal is to create a search box which returns the items (matching to the name) from a list.
    Bonus: The return would happen without requiring user to click a
    Search button or such.
    To achieve this I assume the SharePoint 2013's REST API should be used. I'm completely inexperienced in using the REST API so all kind of suggestions are available.

    Hi,
    Here are some articles about SharePoint 2013 REST API for your reference:
    Get started with the SharePoint 2013 REST service
    http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
    How to: Complete basic operations using SharePoint 2013 REST endpoints
    http://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Working with SharePoint list data - OData, REST and JavaScript
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    Best regards
    Dennis Guo
    TechNet Community Support

  • Rest Api Time (Time return by _api/web/lists/byname("name")/items(id=1)

    HI All,
    I have a query regarding Rest API.
    I am getting time of item created and modified using _api/web/lists/byname("name")/items(id=1).
    It is returning always UTC time zone.
    Is there any relavent article saying that this is default for all sharepoint (Because I have observed the same in all of my virtual meachines sharepoint servers).
    Is there any java script to convert to Site regional settings(In day light savings also).
    Mainly I need any article related to waht API return time will be ?
    Thanks
    Koti

    Hi Koti,
    SharePoint stores all date field in UTC. That is, if you are saving a date time field in a list, SharePoint actually converts the time that you selected into UTC, and converts it back to whatever time zone the person is in when retrieving.
    When using any API SharePoint will always return the UTC time and leave it up to you to make the conversion in your interface or application.
    You could read the time from database and convert the time to your local time.
    You could refer to the JavaScript code example below to convert the time zone.
    self.toUtc = function (inputDate) {      
      var localTime = inputDate.getTime();       
     var localOffset=inputDate.getTimezoneOffset() * 60000;       
     var utc = localTime + localOffset;      
      var retval = new Date(utc);       
     debugger;       
     return retval;
    The article below is about time zone Issues when working with dates in SharePoint’s REST services.
    https://yetanothersharepointblog.wordpress.com/2013/07/14/timezone-issues-when-working-with-dates-in-sharepoints-rest-services/
    The article is about SharePoint Time Zone confusion in SharePoint 2010, it also can work in SharePoint 2013.
    http://www.techgrowingpains.com/2012/05/sharepoint-time-zone-confusion-2/
    The article below is about JavaScript Date Reference.
    http://www.w3schools.com/jsref/jsref_obj_date.asp
    Best regards,
    Sara Fan
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Visual Studio Integrate REST Api - WIQL request returns status 400 (Bad Request)

    Hi,
    I'm attempting to submit a WIQL (Work Item Query Language) request to the Visual Studio Online REST api but receiving a status code 400 (Bad Request).
    I'm using the sample request of the first example "Run a query" of the reference documentation listed here: http://www.visualstudio.com/en-us/integrate/reference/reference-vso-work-item-wiql-vsi
    I've taken the sample request: https://fabrikam.visualstudio.com/DefaultCollection/Fabrikam-Fiber-Git/_apis/wit/wiql?api-version=1.0-preview.2 and substituted "fabrikam" with our account and "Fabrikam-Fiber-Git" with our team project
    name.
    I've used the exact same query listed for the sample request:
      "query": "Select [System.WorkItemType],[System.Title],[System.State],[Microsoft.VSTS.Scheduling.Effort],[System.IterationPath] FROM WorkItemLinks WHERE Source.[System.WorkItemType] IN GROUP 'Microsoft.RequirementCategory' AND Target.[System.WorkItemType]
    IN GROUP 'Microsoft.RequirementCategory' AND Target.[System.State] IN ('New','Approved','Committed') AND [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward' ORDER BY [Microsoft.VSTS.Common.BacklogPriority] ASC,[System.Id] ASC MODE (Recursive, ReturnMatchingChildren)"
    Couple of things that I've tried:
    1. I've tried both "api-version=1.0-preview.2" and "api-version=1.0-preview.1"
    2. I've left out the project name from the request url: Based on the query format listed in the example "https://{account}.visualstudio.com/defaultcollection/[{project}/]_apis/wit/wiql?api-version={version}" I'm assuming that the wrapping of the
    project section in the url in square brackets ([{project}/]) indicates that this section is optional.
    3. I've tried a simpler query:
     "query": "Select [System.WorkItemType],[System.Title],[System.State],[Microsoft.VSTS.Scheduling.Effort],[System.IterationPath], [Microsoft.VSTS.Common.BacklogPriority] From WorkItems"
    Any help would be greatly appreciated.
    Kind Regards,
    Morné

    Hello Morne,
    Visual Studio Integrate forum is for questions about Visual Studio extension development. Yours seems to be about Visual Studio Online REST API to query something. Maybe
    Visual Studio Online forum is better, I'm not sure.
    I move it to [where is this forum for ...] forum, where the moderator will direct you to the right forum.
    Thanks for your understanding.
    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.

  • Add user to sharepoint group using REST API

    I am trying to add a user to sharepoint group with following code
    serviceUrl= Appweb + "/_api/SP.AppContextSite(@target)/web/sitegroups("+GroupId+")/users?@target='host web'";
        $.ajax({
            url: serviceUrl,
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
      headers: {"accept":"application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest":$("#__REQUESTDIGEST").val()
        async: false,
      success: function (data) {
               alert('success');
      error: function (data) {
                 alert('fail');
    The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and message is A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was
    expected
    I tried the sample from following link but fail it
    https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

    Hi,
    Per my understanding, you might want to add an user to a SharePoint group in host web from a SharePoint Hosted App using REST API.
    Here is a working demo for your reference:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    //Get the URI decoded URLs.
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    // Resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";
    // SP.RequestExecutor.js to make cross-domain requests
    $.getScript(scriptbase + "SP.RequestExecutor.js", loadPage);
    // Utilities
    // Retrieve a query string value.
    // For production purposes you may want to use a library to handle the query string.
    function getQueryStringParameter(paramToRetrieve)
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1)
    var singleParam = params[i].split("=");
    if (singleParam[0] == paramToRetrieve) return singleParam[1];
    function addUsersInGroup() {
    var executor;
    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync({
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/sitegroups(8)/users?@target='" + hostweburl + "'",
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: 'json',
    body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|[email protected]'}",
    headers: {
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest":$("#__REQUESTDIGEST").val()
    success: addUsersInGroupSuccessHandler,
    error: addUsersInGroupErrorHandler
    function addUsersInGroupSuccessHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    function addUsersInGroupErrorHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

Maybe you are looking for