How to call remote API from root SharePoint 2013 domain (not an app)

I'm trying to follow the article
http://msdn.microsoft.com/en-us/library/office/fp179895%28v=office.15%29.aspx
For a SharePoint 2013 hosted under O365, do I need to create an app to use the SP.* methods in sp.js? I need to call a remote API from the root domain (https://mycompany.sharepoint.com). But the app, as mentioned in the article
above, deploys on a whole different URL (https://mycompany-a2d3f4t454.sharepoint.com).
I need to be able to call the API from pages like https://mycompany.sharepoint.com/pages/default.aspx. Is this not possible?

Hi,
According to your description, my understanding is that you want to call remote API from the root domain site.
Yes, you can use SharePoint hosted app to achieve it. SharePoint hosted app has app web and host web, you can create an app to call the remote api in the host web from app web.
Here are some detailed articles for your reference:
http://blog.ctp.com/2014/06/23/data-access-in-sharepoint-hosted-apps/
http://msdn.microsoft.com/en-us/library/office/fp179925(v=office.15).aspx
Best Regards
Zhengyu Guo
TechNet Community Support

Similar Messages

  • How to call Java API from BSP?

    I have a requirement to call Java API from BSP application.
    I have checked the forum and found that it is possible by using some ABAP codes.
    However there is no pointer on how this is done.
    Can someone explain the details on how to call Java API from BSP is done?
    I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
    Actually is there any BSP extention which can used to call Java API?
    Thanks,
    Hendri

    check out these weblogs, it should give you an idea how to go about it.
    /people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
    /people/puru.govind/blog/2006/12/20/let-abap-speak
    Regards
    Raja

  • How to call SOAP API from JavaScript

    Hi,
    I'm trying to call the SOAP API to get statistics about emails. Are there any examples on how to call the API from JavaScript?
    Here is a link to my original question about using the REST API. REST API URL for email statistics
    Thanks,
    Tim

    Tim,
    In order to consume a SOAP API I recommend you use something other than JavaScript.
    Any platform can offer you a good SOAP client should be OK. (.Net, Java, php, Ruby, python).
    I didn't see anyone successfully used javascript and consume the Eloqua SOAP API.
    I know you can create a SOAP client in Java script but it will be too much work to handle the Eloqua response in some cases.
    Regards,
    Daniel

  • How to implement remote blob storage in SharePoint 2013

    How to implement remote blob storage in SharePoint 2013 

    Try below:
    http://blogs.technet.com/b/wbaer/archive/2013/05/23/deploying-remote-blob-storage-with-sql-server-2012-alwayson-availability-groups.aspx
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

  • How to call OIM API from external app?

    Hi,
    I have an java application and I would like to call OIM API to accept a request. The application resides in separate server than OIM.
    My questions:
    *1.* What to do to call OIM API from external application (import any OIM jars etc.)?
    *2.* Which method to use, setRequestResponse , closeRequest or any other?
    I appreciate any help, thanks.
    Edited by: m.m. on Feb 2, 2010 5:33 AM

    Hello,
    If it is an external client, you need to provide the "login" and "password" details explicitly in the code (something like this), before getting any other Interface control to invoke the OIM APIs -
    public class OIMAPIClientTest {
    public static void main(String[] args) {
    try{
    System.out.println("Starting...");
    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
    System.out.println("Getting utility interfaces...");
    Regards,
    Amit
    Edited by: amitKumar on Feb 2, 2010 5:29 AM

  • How to call UME API from ABAP?

    Hello all,
    I want to call the UME API using ABAP to change portal users from backend system.
    Is this possible without JAVA development? How?
    Thanks for your help,
    Regards,
    Guido Knapp

    Hi,
    Refer this link you wil get some idea
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/3820a37edeec45a91dd6e45fba15b8/frameset.htm
    Regards,
    Senthil K.

  • Calling Java API from ABAP using JCo (Part 2)

    Hello,
    This is an additional question to thread Calling Java API from ABAP using JCo
    Has anyone managed to get the input parameter value
    input.getString("REQUTEXT")
    that is being passed from ABAP?
    If yes, what kind of setting you need to do? Because when I execute, it has no value.
    Thus, the below ECHOTEXT parameter returns blank value:
    output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
    When I debug by printing the below line, the input XML is indeed without value:
    System.out.println(input.toXML());
    Anybody knows how to pass input variable from ABAP to JAVA using JCo?
    rgs,
    hiroshi

    Hallo Hiroshi,
    as far as I can see, you are doing it the right way. The problem might be that the ABAP program does not fill in this parameter because something went wrong in the SAP System.
    Have you tried setting a breakpoint (an HTTP session - remote breakpoint) and tried checking step by step if the value is being processed and put into the REQUTEXT field?
    Bye,
    Sameer

  • Calling HRMS APIs from a DotNet plateform

    Hello,
    I am new on this forum and I have difficulty in beginning, i don't know if it's the right category to post my question.
    I'm working in a project looking for a solution of revision of the self-service's interfaces of oracle e-business suite, indeed I need an example or a document which can help me for using the HRMS APIs of oracle e-business suite via a dotNet plateform or SharePoint application.
    I have to work on a middelware allowing retreiving and persisting data from oracle e-business suite database using oracle HRMS APIs like hr_appraisals_api. So haw can i call these APIs from .NET application how can i use a .NET code to call these api's ?
    Can you help me please ? i'm waiting for your answers if possible and this is my e-mail address if necessary "[email protected]" .
    I would be so grateful if someone can help me. Thank you in advance.
    Cordially.

    HRMS PLSQL API can be called from Java and .Dot net support to execute Java API . This way it could be done.
    I have not idea how call PLSQL API from direct .Dot net code.
    Thanks

  • How to call an API through Forms

    Hi,
    I want to call 'inv_quantity_tree_pub.query_quantities' from a custom form developed using Template.fmb.
    It is displaying error that 'remote package can not be called '.
    can any one help me on this issue.

    Hi;
    What is your OS?
    Please check below which could be helpful for your issue
    Oracle E-Business Suite Java APIs for Forms Troubleshooting Guide, Release 12 [ID 966982.1]
    http://drupal.org/node/751826
    http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/how-to-call-windows-apis-through-oracle-forms-developer-6i-1082381
    Regard
    Helios

  • How to call oracle function from ejb3

    i'm trying to call an oracle query-function from ejb3.
    The oracle function:
    create or replace FUNCTION getSecThreadCount(secId in NUMBER,avai in NUMBER)
    RETURN SYS_REFCURSOR is cur SYS_REFCURSOR;
    m_sql VARCHAR2(250);
    BEGIN
    m_sql:='select count(thrId) from thread where secId='|| secid||'
    and thrAvai='|| avai;
    open cur for m_sql;
    return cur;
    END;
    I'v tried several ways to call it,but all failed:
    1. the calling code:
    public Object getSectionThreadCount(int secId,int avai){
              Query query=manager.createNativeQuery("{call getSecThreadCount(?,?) }");     
              query.setParameter(1, secId);
              query.setParameter(2, avai);
              return query.getSingleResult();
    but i got the exception:
    Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    Caused by: java.sql.SQLException: ORA-06550: row 1, col 7:
    PLS-00221: 'GETSECTHREADCOUNT' not procedure or not defined
    ORA-06550: row 1, col 7:
    PL/SQL: Statement ignored
    2. the calling code:
    @SqlResultSetMapping(name = "getSecThreadCount_Mapping")
    @NamedNativeQuery(name = "getSecThreadCount",
    query = "{?=call getSecThreadCount(:secId,:avai)}",
    resultSetMapping = "getSecThreadCount_Mapping",
    hints = {@QueryHint(name = "org.hibernate.callable", value = "true"),
              @QueryHint(name = "org.hibernate.readOnly", value = "true")})
    public Object getSectionThreadCount(int secId,int avai){
              Query query=manager.createNamedQuery("getSecThreadCount");     
              query.setParameter("secId", secId);
              query.setParameter("avai", avai);
              return query.getSingleResult();
    but i run into the exception:
    Exception in thread "main" javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
    Caused by: java.sql.SQLException: lost in index IN or OUT parameter:: 3
    By the way, i have successfully called the function from hibernate. And i use oracle 11g, JBoss5 RC1.
    Could anyone tell me how to call the function from EJB3?
    Thanks.

    Here's a working model:
    package.procedure: (created in example schema scott)
    CREATE OR REPLACE package  body data_pkg as
      type c_refcursor is ref cursor;
      -- function that return all emps of a certain dept
      function getEmployees ( p_deptId in number
      return c_refcursor
      is
        l_refcursor c_refcursor;
      begin
         open l_refcursor
        for
              select e.empno as emp_id
              ,        e.ename as emp_name
              ,        e.job   as emp_job
              ,        e.hiredate as emp_hiredate
              from   emp e
              where  e.DEPTNO = p_deptId;
        return l_refcursor;
      end getEmployees;
    end data_pkg;
    /entity class:
    package net.app.entity;
    import java.io.Serializable;
    import java.util.Date;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedNativeQuery;
    import javax.persistence.QueryHint;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @SuppressWarnings("serial")
    @Entity
    @Table (name="emp")
    @SequenceGenerator(name = "EmployeeSequence", sequenceName = "emp_seq")
    @NamedNativeQuery( name = "getEmpsByDeptId"
                   , query = "{ ? = call data_pkg.getEmployees(?)}"
                   , resultClass = Employee.class
                   , hints = { @QueryHint(name = "org.hibernate.callable", value = "true")
                          , @QueryHint(name = "org.hibernate.readOnly", value = "true")
    public class Employee implements Serializable
        @Id
        @Column(name="emp_id")
        @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "EmployeeSequence")
        private int id;
        @Column(name="emp_name")
        private String name;
        @Column(name="emp_job")
        private String job;
        @Column(name="emp_hiredate")
        private Date hiredate;
        // constructor
        public Employee (){}
        // getters and setters
        public int getId()
         return id;
    etc...session bean:
    package net.app.entity;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import net.app.entity.Employee;
    import net.app.iface.ScottAdmin;
    @Stateless
    public class ScottAdminImpl implements ScottAdmin
        @PersistenceContext
        private EntityManager entityManager;
        @SuppressWarnings("unchecked")
        public List<Employee> getEmployeesByDeptId(int deptId)
         ArrayList<Employee> empList;
         try
             Query query = entityManager.createNamedQuery("getEmpsByDeptId");
             query.setParameter(1, deptId);
             empList = (ArrayList<Employee>) query.getResultList();
             return empList;
         catch (Exception e)
             e.printStackTrace(System.out);
             return null;
    }client:
    package net.app.client;
    import java.util.List;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import net.app.entity.Employee;
    import net.app.iface.ScottAdmin;
    public class ScottClient
        public static void main(String[] args)
         try
             // create local interface
             InitialContext ctx = new InitialContext();
             ScottAdmin adminInterface = (ScottAdmin) ctx.lookup("ScottAdminImpl/remote");
             // select employees by deptno
             int deptno = 20;
             List<Employee> empList = adminInterface.getEmployeesByDeptId(deptno);
             // output
             System.out.println("Listing employees:");
             for (Employee emp : empList)
              System.out.println(emp.getId() + ": " + emp.getName() + ", " + emp.getJob() + ", " + emp.getHiredate());
         catch (NamingException e)
             e.printStackTrace(System.out);
    }Basically you just ignore the refcursor outbound parameter.
    This is a stored function, have yet to try outbound refcursor parameters in stored procedures...
    Edited by: _Locutus on Apr 2, 2009 2:37 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to call custom API in ODI

    Hi All,how to call custom API in ODI and how can multiple people run the scenario at same time. I explained my process below
    1. Through ODI console pass parameter (file name) to scenario and read the file form configured location
    2. Insert the data from flat file to custom table
    3. Call custom API
    4. Generating a report in ODI in same location where we read the file from. Creating sample report just reading from custom table
    5. The above design should be such that multiple people can run the scenario at same time.
    can any one help me on step 3 and step 5 how to go forward..
    Thanks in Advance.
    Edited by: 981371 on Mar 4, 2013 3:19 AM

    You can invoke java api in the procedure or KM tasks. You can select Jython technology type and can call the custom java API.
    You may find relevant info at
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12643/procedures.htm#CHDIDDFE
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/intro.htm#sthref5
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/api_intro.htm#CEGFCFHC
    You can directly put DB functions in the your mapping expressions.

  • Re: Calling Windows API from Tool

    Hi,
    If it's only for the UserName on NT you can get the environment variable
    USERNAME.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Url : http://perso.club-internet.fr/dnguyen/
    Tim Sawyer a &eacute;crit:
    Hi George,
    I think you need to find out which Windows DLL implements the function and
    then wrapper it, using Fort&eacute;'s C Wrappering technique. I'm going to be
    doing this for the GetUserName() function, so we can login to our
    application automatically, using the username that the user logged into NT
    with.
    Hope this helps!
    Tim Sawyer
    PanCredit
    Leeds, UK.
    From: Aberdour George <[email protected]>
    Date: Thu, 6 May 1999 09:08:03 +1000
    Subject: Calling Windows API from Tool
    Hi,
    Does anyone know how to call Windows API calls such as WinExec,
    CreateProcess, RegSetValue, etc directly from TOOL ?
    These are just examples calls. I know some Windows API calls can be called
    via equivalent OperatingSystem method calls, but I would really like toknow
    if it is possible to call Windows API routines directly.
    Thanks in advance,
    George Aberdour
    TAFE NSW-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    I'm afraid we have to make it work for NT, 95 and probably 98 too, so we're
    looking for something a bit more robust than the environment variable.
    Thanks,
    Tim Sawyer
    PanCredit
    Leeds, UK.
    From: Daniel Nguyen[SMTP:[email protected]]
    Reply To: [email protected]
    Sent: 07 May 1999 20:40
    To: Tim Sawyer
    Cc: '[email protected]'; '[email protected]'
    Subject: Re: Calling Windows API from Tool
    Hi,
    If it's only for the UserName on NT you can get the environment variable
    USERNAME.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Url : http://perso.club-internet.fr/dnguyen/
    Tim Sawyer a &eacute;crit:
    Hi George,
    I think you need to find out which Windows DLL implements the functionand
    then wrapper it, using Fort&eacute;'s C Wrappering technique. I'm going to be
    doing this for the GetUserName() function, so we can login to our
    application automatically, using the username that the user logged intoNT
    with.
    Hope this helps!
    Tim Sawyer
    PanCredit
    Leeds, UK.
    From: Aberdour George <[email protected]>
    Date: Thu, 6 May 1999 09:08:03 +1000
    Subject: Calling Windows API from Tool
    Hi,
    Does anyone know how to call Windows API calls such as WinExec,
    CreateProcess, RegSetValue, etc directly from TOOL ?
    These are just examples calls. I know some Windows API calls can be
    called
    via equivalent OperatingSystem method calls, but I would really like toknow
    if it is possible to call Windows API routines directly.
    Thanks in advance,
    George Aberdour
    TAFE NSW-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • How to call a form from report? in 6i

    How to call a Form from Report? In Developer 6i of oracle. Plz tell me tex.

    try this
    declare
       AppID PLS_INTEGER;
    begin
         AppID := DDE.App_Begin('ifrun60 module=myform.fmx userid=scott/tiger@mydb maximize=no', DDE.App_Mode_Maximized);
    exception when others then
          srw.message(1,'Errror');
    end;Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • How to call a package from the Report in Oracle Application Express

    How to call a package from the Report in Oracle Application Express

    Hello,
    What do you mean? Something like SELECT mypackage.function( par1, par2) from dual?
    Or do you want to execute a procedure when something happens on the page, like clicking a button?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How to call business service from xquery transformation in OSB ??

    Hi All,
    How to call business service from xquery transformation in OSB ??
    I need to assign the response variable of Business Service to a target element in XQuery Transformation Mapper file.
    It's urgent.
    Regards,
    Jyoti Nayak

    Transformation is to mapping the source and target of 2 different schemas.
    In your case you should have a XQuery transformation between, your Business Service output schema and the target schema.
    Thanks,
    Vijay

Maybe you are looking for

  • Create Trial Balance

    Hi, How do I get to build a trial balance in BPC. We have BPC 10.0 Sincerely Nicky

  • Error when Broadcasting PDF format to email

    Hi, The template is getting executed properly through WAD. Even, in portal the report is being generated correctly. The problem is when I try to broadcast PDF format to Email. I am receiving the following error when attempting to broadcast a query as

  • Maps Gone on E6-00

    Help,  I was recently in Nokia Store and noticed that there was a Maps update available for my phone.  I don't remember which version I was running.  When I tried the update it started out with a screen that said: "You are now getting several new map

  • Calling and using LabVIEW VI's in a C# application : user manual ?

    Hi everyone, I am working on a project (actually a proof of concept) where I need to call and use LabVIEW VI's in a C# application. I downloaded the example available on this page : Calling LabVIEW VIs from Other Programming Languages. This example (

  • Check my logic please: Enlarging a Matrix

    The value of the first array is supposed to determine how many elements are in the second array. Will this work? (FFS, matricies make me dizzy as hell! Kinda like my brain is going into an infinite loop or somethin'.) public int[][] enlargeIntMatrix(