Service REST API Formatting in AJAX Call

Hi all,
I am having a small issue with formatting the URL in my AJAX. This works great when pasted into a browser window:
https://yourcompany.com/_api/search/query?querytext='ContentTypeId:0x01FD* write>="2013-11-06 21:46:30Z" -ContentClass=urn:content-class:SPSPeople'&refiners='Tags'
But when I try to use it the URL portion of AJAX, it bombs with a bad request since the entire REST endpoint needs to be in quotes:
"https://yourcompany.com/_api/search/query?querytext='ContentTypeId:0x01FD* write>="2013-11-06 21:46:30Z" -ContentClass=urn:content-class:SPSPeople'&refiners='Tags'"
It is getting tripped up on the date. I have tried write>=" + " but it causing issues
I know I am missing something obvious (and if someone else has an easier way to find trending tags, please let me know!).
Kelly
Personal Blog: http://thebitsthatbyte.com

Update, I was able to get a unified URL (the entire URL was a non-disjointed hyperlink) with this:
"https://yourcompany.com/_api/search/query?querytext='ContentTypeId:0x01FD* write>=\'2013-11-06 21:46:30Z'\' -ContentClass=urn:content-class:SPSPeople'&refiners='Tags'"
However, this throws an internal server error as it appears the date needs to be surrounded by " ".
I am able to use Trending Tags now though. Check this out:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/9d6b3fa9-c87d-4dc6-87d5-6d1984854c43/danger-of-activating-mysite-host-to-have-trending-tags-web-part?forum=sharepointgeneral#3202a22a-8f60-4977-99c8-4b465baf697a
Personal Blog: http://thebitsthatbyte.com

Similar Messages

  • 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

  • What is the best way to get storage data for hard disk using REST api

    Hello All,
    Given that I have disk info for virtual machine/role from service management REST api (for example using
    GetRole) how I could retrieve container/blob related info for it?
    So I have credentials for service management REST API, I have OSVirtualHardDisk info, but I am not sure how to detect correctly to which storage account connect and than which container to use. Yes, I know that there is OSVirtualHardDisk .MediaLink property
    which contains storage account name and container inside of it but I am not sure it is good practice to assume about it format. Alternatively I have another solution - just retrieve all storage accounts from  Service management REST, then compare url
    of each account with disk's  MediaLink. And use appropriate storage account for further data retrieve.   But seem to me it could retrieve too many info. 
    So generally I am trying to find correct way to join  service management REST api and Storage Services REST API for disks

    Hi,
    From my experience, your first approach is correct. The media link exactly points to the location of the blob. With the link, you can access the blob if you have the storage account key. If you want to extract more information, such as what
    the container is and what the blob is, you can parse the link. 
      >> From my point of view it is bad way to retrieve storage account name and container.
    In addition, you are welcome to post feature requests on
    http://feedback.windowsazure.com/forums/34192--general-feedback
    Best Regards,
    Ming Xu
    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 read azure storage data using JAVA with REST API

    Hi,
    We have a cloud service in our lab. We have enabled diagnostics
    in cloud services. So WADPerformanceCounterTable was created in storage account. Now , We want to read the WADPerformanceTable using
    JAVA with REST API. Is there any way to collect these details. please give me any
    sample code to connect azure storage using table service REST API.
    Thanks & Regards
    Rathidevi

    Hi,
    Please have a look at this article:
    https://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/, it demonstrate how to use table service Rest API, it also give us the code, hope this helps. Of course, the
    MSDN article could also help us coding.
    Best Regards,
    Jambor
    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 get up and run a Web Services/RESTful functionality?

    Hello there,
    The DBAs just completed the upgrade for the APEX 4.2 in our organization. I was asked to work with APEX and build some application. This morning I was asked by my boss to take a look at getting the Web Services/RESTful API Functionality up and running. I am new to this environment. When I check the RESTful Services I found out the are no RESTful Services. What do I do to get this running? as a Developer, I do not have access to any schema or web services. How do I go about making this work? can any one point me to some blog or site that will help me make this work?

    Hello,
    You can consume Web-Services from APEX, but you can't produce. So first ask your boss which web-service you want to implement.
    There are 2 types of web services in general, SOAP based and RESTful. APEX provides simplified API's to invoke both types web-service.
    Identify web-service you want to TEST
    Create ACL for APEX_XXXX schema to access web-service
    Create ACL for Proxy Server as-well, if required
    If web-service is SSL-enabled then configure wallet. See 17.7 Implementing Web Services
    Use APEX API's to invoke Web-Services. See APEX_WEB_SERVICE
    You can process XML response from Web-Service using Using XQuery with Oracle XML&amp;nbsp;DB
    If Web-Service returns JSON data either you can use PL/JSON | Free software downloads at SourceForge.net to process response, or you can process response at client side using jQuery
    Regards,
    Hari

  • Performance issue during SharePoint list data bind to html table using Ajax call(Rest API)

    Hello,
    I am having multiple lists in my SharePoint Site. I am using SharePoint REST APIs to get data from these lists and bind a HTML Table. Suppose, I have 5 lists with 1000 records each, I am looping 5000 times to bind each row(record) to this html table. This
    is causing performance issue which is taking a very long time to bind. 
    Is there any way So that I can reduce this looping OR is there any better approach to improve the performance. Please kindly Suggest.  Thank you for your help :)
    Warm Regards,
    Ratan Kumar Racha

    Hi Racha,
    For handling large data binding in a page,
    AngularJS would be a great option if you might would worry about the performance.
    You can get more information about using AngularJS from the two links below:
    https://www.airpair.com/angularjs/posts/angularjs-performance-large-applications
    http://www.sitepoint.com/10-reasons-use-angularjs/
    Best regards
    Patrick Liang
    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

  • JS Ajax Call return 'Access Denied' for Rest Call

    Hello Everyone,
    I I am building one application where I need to pull the data from Eloqua using REST API, when I am using Java, I am able to fetch the data, but whereas when I applying the same logic in JS Ajax Call am receiving 'Access Denied', Can any one help us to understand the issue here, whats going wrong here.

    mortecouille wrote:Similarly, I cannot enable/disable services. The couple of times I booted with systemd with initscripts and sysvinit still installed, systemd used rc.conf's NETWORK to start the network. Now that I've removed it, it tries to start dhcpcd@eth0 whereas I need dhcpcd@eth1. But disabling the first and enabling the other does not work, and if I reboot, systemd is back to trying dhcpcd on eth0.
    Any ideas ?
    https://bugs.archlinux.org/task/31093

  • HTTP REST API call to CPSC 10.x from an external system

    Hi,
    I would like to know the below items.
    Is it possible to connect with the CPSC 10.x from an external system via HTTP REST API call to process a request and complete a task?
    Is it possible to create a new ticket / request in CPSC for a specific service via the HTTP REST API call?
    One of the use case is to know how many requests are pending in a queue via a HTTP REST API call? How to pass a queue name in the HTTP REST API call to get the result? These kind of custom piece is not available in the integration guide.
    Is there any specific REST API guide available which Cisco provides for the REST capability in CPSC?
    Any help is highly appreciated!
    Thanks.

    When a task is invoked from a service catalog request to an external system, the request remains open and the task is pending until the external system issues a call to complete the task.  The API for completing the task is SOAP-based.  Check out the Cisco Prime Service Catalog Integration Guide.  Within the doc, go to the section about "Web Service Listener Adapter" for the WSDL.
    You can order a service within Prime Service Catalog with a SOAP call, which is also documented in this same document.  Starting with Prime Service Catalog 10.1, you will have a way to order a service via a REST API.
    Existing REST APIs are also documented in the integration guide.

  • REST API usign ajax

    Hello
    I am trying to make use of REST API using ajax, but its failing giving the error message: "NetworkError: 403 Forbidden - https://secure.eloqua.com/API/REST/1.0/data/contact/123"
    Below is the javascript code I am using:
    <script>
        jQuery.ajax( {
         type: 'GET',
         url : 'https://secure.eloqua.com/API/REST/1.0/data/contact/123', 
         dataType : 'json',
         async: false,
         beforeSend : function(xhr) {
              xhr.setRequestHeader("Authorization", "Basic " + <base64>);
        error : function(xhr, ajaxOptions, thrownError) {
            alert("error");
         success : function(data) {
            alert("success");
    </script>
    Thanks and appreciate your Help !!

    Yes, I am using the correct base URL for the API. The response I get is:
    "urls": {
    "base": "https://secure.eloqua.com",
    "apis": {
    "soap": {
    "standard": "https://secure.eloqua.com/API/{version}/Service.svc",
    "dataTransfer": "https://secure.eloqua.com/API/
    "email": "https://secure.eloqua.com/API/
    /DataTransferService.svc",
         /EmailService.svc",
    "externalAction": "https://secure.eloqua.com/API/
    "rest": {
    "standard": "https://secure.eloqua.com/API/REST/
    /ExternalActionService.svc"},
    "data": "https://secure.eloqua.com/API/Data/
    "bulk": "https://secure.eloqua.com/API/Bulk/

  • External Rest API call from SharePoint 2013 On Premises

    Hi All,
    May my questions is silly but I am totally tired by trying different things.
    I need to call a third party rest api from my SharePoint Designer page using &Ajax call.First time when i tried it gave me access denied then added this line
    jQuery.support.cors =true;
    Again error changed to "No Transport" last time i had the same situation i saw some sites where people mentioned some power shell script to enable something at web app level but didn't remember if possible can some help me please i already wasted
    my half long weekend :(
    Note :- This is SharePoint On Premises
    Thanks in Advance :)

    Hi All,
    May my questions is silly but I am totally tired by trying different things.
    I need to call a third party rest api from my SharePoint Designer page using &Ajax call.First time when i tried it gave me access denied then added this line
    jQuery.support.cors =true;
    Again error changed to "No Transport" last time i had the same situation i saw some sites where people mentioned some power shell script to enable something at web app level but didn't remember if possible can some help me please i already wasted
    my half long weekend :(
    Note :- This is SharePoint On Premises
    Thanks in Advance :)

  • HTTP Rest api call maximum results

    Hi all,
    I´m trying to get data from the portal using the follwoing rest api call:
    http://<ServerURL>/RequestCenter/nsapi/serviceitems/serviceitemsubscription
    but it only gives me 20 results, which I believe it is the default, is there any way to get all the elements or a way to page all the results?
    Thanks
    Alex.

    Hi all,
    found some info on the Integration guide (Cisco Prime Service Catalog 10.0 Integration Guide) page 222, there is a section regarding Paging, but the max results are 50.
    I was looking a simple way to export / import info from the portal, but it seems Java is going to be neded instead http nsapi.
    Regards,
    Alex.

  • REST API call in SCOM 2012R2

    Hi,  
    We are planning monitoring our cluster using SCOM 2102R2 server. REST API developed for our cluster. How to call these REST API calls in SCOM 2012R2 server? I searched, I am not able to find. Please help me with any steps or documents or with links. I am
    struct here. I am new to SCOM 2012 server. 
    Thanks,
    Boopalan

    You can refer below links
    http://mountainss.wordpress.com/2014/05/02/windows-azure-pack-service-management-api-samples-april-2014-wapack-scvmm-ws2012r2/
    http://www.vmunify.com/tag/windows-server-2012-r2/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

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

  • Not able to create row in HANA via .create or ajax call (oData Services)

    Hello Experts,
    SYSTEM: AWS (Amazone Cloud with HANA SPS06), tunneling via VPN. My HANA-Studio is rev.70 with the "Kepler" addons. I´m the owner of this Schema and granted the necessary privliegues to the __SYS_REPO User.
    The following issues when I try to add a row with SAPUI5 - GUI:
    The following code are in the index.controller.js implemented and triggered by a button:
    Further to the developer guide (SAPUI5....) there is a create Statement to add rows into the Table in HANA. I tried the following:
    //Einfacher Datensatz welcher in die HANA geschrieben werden sollte:
    var oModel = new sap.ui.model.odata.ODataModel 
    ("..(censored)../BL_TI/2005/zaginfothek/Opportunities.xsodata", false);
    var oEntry = {};
    oEntry.id = 7777;
    oEntry.LfdNr=1;
    oEntry.Customer=2;
    oEntry.Thema=3;
    oEntry.Leadueber=4;
    oEntry.Owner=5;
    oEntry.MarketDeveloper=6;
    oEntry.ThemenfokusnachBL=7;
    oEntry.Industry=8;
    oEntry.PDs=9;
    oEntry.Revenue=0;
    oEntry.Probability=1;
    oEntry.ProbableRevenue=2;
    oEntry.Start=3;
    oEntry.Finish=4;
    oEntry.Duration=5;
    oEntry.Phase=6;
    oEntry.Status=7;
    oEntry.ATPDecision=8;
    oEntry.Date=9;
    oEntry.SupplyChain=0;
    oEntry.Technology=1;
    oEntry.Region=2;
    oEntry.Kontaktquelle=3;
    oEntry.CASStatus=4;
    oEntry.Angebotsnummer=5;
    oEntry.Archiv=6;
    oEntry.Angebotabgelegt=7;
    oEntry.LeadmeldunganSAP=8;
    oEntry.ArtderAnfrage=9;
    oEntry.tmstmp= "/Date(1390557603727)/";
    //Instantzierung mit Anhang Opportunities
    oModel.create('/Opportunities', oEntry, nullfunction(){
    alert("Create successful");
               },function(e){
    for (var property in e.d){
    alert(property + "=" + e.d[property] + oEntry + "failed"); 
    I get the following Errormessage:
    ERROR: 2014-03-17 12:51:52 The following problem occurred: HTTP request failed501,Not Implemented,<?xml version="1.0" encoding="utf-8" standalone="yes"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message xml:lang="en-US">Feature not supported.</message></error> -
    After this I tried it with an ajax call:
    var aUrl = '..(censored)../BL_TI/2005/zaginfothek/Opportunities.xsodata/Opportunities';
    //all in one ajax – Statement included and tried to create the row via POST:
    jQuery.ajax({
    method:'POST',
    url: aUrl,
    data: {"id": "7778",
    "LfdNr" : "1" ,
    "Customer" : "2",
    "Thema" : "3" ,
    "Leadueber" : "4",
    "Owner" : "5",
    "MarketDeveloper" : "6",
    "ThemenfokusnachBL" : "7",
    "Industry" : "8",
    "PDs" : "9",
    "Revenue" : "0",
    "Probability" : "1",
    "ProbableRevenue" : "2",
    "Start" : "3",
    "Finish" : "4",
    "Duration" : "5",
    "Phase" : "6",
    "Status" : "7",
    "ATPDecision" : "8",
    "Date": "9",
    "SupplyChain" : "0",
    "Technology" : "1",
    "Region" : "2",
    "Kontaktquelle" : "3",
    "CASStatus" : "4",
    "Angebotsnummer" : "5",
    "Archiv" : "6",
    "Angebotabgelegt" : "7",
    "LeadmeldunganSAP" : "8",
    "ArtderAnfrage" : "9",
    "tmstmp": "/Date(1390557603727)/"
    contentType: 'application/json',
    dataType: 'json',
    success: function(e){
    alert(e.response + "success");
    error: function onErrorCall(jqXHR, textStatus, errorThrown){
    alert(jqXHR.status);
    alert(aUrl);
    sap.ui.commons.MessageBox.show(jqXHR.status,   
    "ERROR",  
    "Error in calling Service" );   
    // return;  
    The last statement with ajax send me a success message back, but there is still no row added in the HANA.
    Has anyone an idea what´s going wrong?
    I woulb be happy for any hints, thanks
    André

    Hi Ben,
    well I tried out your code and it works with an small correction of your insert:
    save: function(){
            var oData = new sap.ui.model.odata.ODataModel('...censored.../BL_TI/2005/TEST_USER/Opportunities.xsodata', true); 
            // New user panel 
    //        var pnlUser = new sap.ui.commons.Panel({text: "User-Data"}); 
    //        var tfUserId = new sap.ui.commons.TextField({placeholder: "User-Id"}); 
    //        var tfUserName = new sap.ui.commons.TextField({placeholder: "User-Name"}); 
    //        var btnSave = new sap.ui.commons.Button({text: "Save"}); 
    //        pnlUser.addContent(tfUserId).addContent(tfUserName).addContent(btnSave); 
    //        btnSave.attachPress(function() { 
            var entry = {}; 
            entry.ID = "3"; //tfUserId.getValue(); 
            entry.USERNAME = "4"; //tfUserName.getValue(); 
            oData.create('/USER', entry, null, 
                    function() { 
                alert("Create successful"); 
            function() { 
                alert("Create failed"); 
    Try to write your id instead of  3 -> "3" That was the only what I´ve changed.
    Greetz,
    André

Maybe you are looking for