What is the REST endpoint URL to get list of site collections in Sharepoint ?

Hi,
If I go to Sharepoint 2013 site, click on Admin -> Sharepoint, you will see a list of site collections (the link is https://somename-admin.sharepoint.com/_layouts/15/online/SiteCollections.aspx)
What is the REST endpoint URL to retrieve this list of site collections ?
I was trying _api/search/query?querytext='contentclass:sts_site' or _api/search/query?querytext='contentclass:sts_web', but it doesn't give the whole list...

As far as i know, There is no REST endpoint at FARM level
it would be good to see a possible way to do this.
If my contribution helps you, please click Mark As Answer on that post and
Vote as Helpful
Thanks, ShankarSingh(MCP)

Similar Messages

  • How to get hostweb's site collection in SharePoint hosted app?

    I want display SharePoint site collection of host web in my SharePoint hosted app. I have used following code. 
    ExecuteOrDelayUntilScriptLoaded(callSharePoint, "sp.js");
    function callSharePoint() {
    hostweburl = getQueryStringParameter("SPHostUrl");
    appweburl = getQueryStringParameter("SPAppWebUrl");
    hostweburl = decodeURIComponent(hostweburl);
    appweburl = decodeURIComponent(appweburl);
    var scriptbase = appweburl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js",
    function () {
    $.getScript(scriptbase + "SP.js",
    function () {
    //$.getScript(scriptbase + "SP.Taxonomy.js", function () { });
    $.getScript(scriptbase + "SP.RequestExecutor.js", execOperation);
    //Loads context, web and lists....
    function execOperation() {
    try {
    //create context for appweburl.
    context = new SP.ClientContext(appweburl);
    var factory = new SP.ProxyWebRequestExecutorFactory(appweburl);
    context.set_webRequestExecutorFactory(factory);
    //get hostsite reference & load as web.
    appContextSite = new SP.AppContextSite(context, hostweburl);
    web = appContextSite.get_web();
    context.load(web);
    list = web.get_lists();
    context.load(list);
    webs = appContextSite.get_web().get_webs();
    context.load(webs);
    //webs = appContextSite.get_site().get_rootWeb().get_webs();
    //context.load(webs);
    context.executeQueryAsync(onWebsLoaded, onQueryFailed);
    catch (err) {
    alert(err.message);
    function onWebsLoaded(sender, args) {
    alert(list.get_count());
    var webEnum = list.getEnumerator();
    while (webEnum.moveNext()) {
    web = webEnum.get_current();
    alert(web.get_id());
    for (var i = 0; i < webs.get_count() ; i++) {
    subwebs = webs.itemAt(i);
    recursiveAll(subwebs);
    /* recursive call for web */
    function recursiveAll(cweb) {
    debugger;
    alert(cweb.get_title());
    var subwebs = cweb.get_webs();
    context.load(subwebs);
    context.executeQueryAsync(function (sender, args) {
    debugger;
    var webEnum = subwebs.getEnumerator();
    while (webEnum.moveNext()) {
    web = webEnum.get_current();
    alert(web.get_title());
    //recursive call for current web.
    recursiveAll(web);
    }, function () { debugger; alert('err'); });
    In this code I have get all the list of the Host web. But I am not able to get Host webs.
    Any of the when I load the Web it gives me the AppWebUrl not the host web.
    So I tried by using following code
    context = new SP.ClientContext(hostweburl);
    web = appContextSite.get_web();
    context.load(web);
    context.executeQueryAsync(onWebsLoaded, onQueryFailed);
    But it gives me error: unexpected response data from server
    Is there any other way to view all sites and sub sites of the host web in SharePoint hosted app?

    Hi,
    Since you are using a provider Hosted app if you want to get the current logged in name than do not use AppOnlyAccessToken else use AccessToken which is App + user Context AccessToken.
    then 
    Web web = clientContext.Web;
    clientContext.Load(web);
    clientContext.ExecuteQuery();
    clientContext.Load(web.CurrentUser);
    clientContext.ExecuteQuery();
    clientContext.Web.CurrentUser.LoginName;will return proper user Name.
    HttpContext.Current.User.Identity.Name will never return the user as this object is related to IIS server of your App Server not sharepoint.you should set this as Anonymous in case of provider hosted app.you can download the below sample which uses the AccessToken which has user name in it.https://code.msdn.microsoft.com/Working-provider-hosted-8fdf2d95
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • Is there any REST API to get all the Site and site Collections from Sharepoint Online

    Hi,
    I have one SharePoint Online tenant. We are using REST API to integrate SharePoint to our internal System.
    For my use case I need to get all the SharePoint sites ans Sitecollections. From each SiteCollection I need all the subsites under this.
    I have used below REST Query
    http://<Base site url>/_api/web
    This doesn't give me all the Site collections
    Could any one please give me some way to get all the Site collections and sites from my sharepoint tenant through REST API.
    Thanks,

    Hi Abhiram,
    There seems no such endpoint in SharePoint REST API can retrieve a list of site collections in a SharePoint Online tenant:
    https://msdn.microsoft.com/en-us/library/office/jj860569.aspx#Reference
    If Client Object Model can be an option for you, you can use Tenant object to achieve what you want:
    http://social.technet.microsoft.com/wiki/contents/articles/24050.perform-basic-admin-operations-using-csom-in-sharepoint-online.aspx#Scenario_3_Fetch_All_Site_Collections
    Anyway, I would suggest you submit a feedback to the Office Developer Platform if there any expectation about the future version of REST API of Office 365 SharePoint
    Online:
    http://officespdev.uservoice.com/
    It
    is a place for customers provide feedback about Microsoft Office products. What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft
    Product Team will take it into consideration when designing the next version in the future.
    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]

  • What is the diffrence between URL and URI

    Hi all
    Can any one tell me the difference between URI and URL . I have got a doubt that since somany days what exactly the URI and URL. Can anyone tell with example .
    Thq

    Please go through this url
    http://www.onjava.com/pub/a/onjava/excerpt/jvntwkprg_3e/

  • I have MacBook Pro 2.2GHz Intel Core i7 (15-inch DDR3) Early-2011 and I want to upgrade RAM, What is the MAX RAM can I get it 8GB or 16GB?

    I have MacBook Pro 2.2GHz Intel Core i7 (15-inch DDR3) Early-2011 and I want to upgrade RAM, What is the MAX RAM can I get it 8GB or 16GB?

    Maximum Memory     16 GB (Actual) 8 GB (Apple)
    Memory Slots     2 - 204-pin PC-10600 (1333 MHz) DDR3 SO-DIMM

  • "File Browse" type item: at what point the fields mime_type, file_name, last_update_date get their values?

    Hi there,
    I have an issue with "File Browse" type item, my question is: at what point the fields mime_type, file_name, last_update_date get their values? I want to add them to the collection but if I try to do it in Process "On Submit - After Computations and Validations" the values in those fields are still null (that's for the insert, and for the update they have old values). Also I don't seem to be able to add blob to the collection ("File Browse" type item (which has the source as blob database column) can't be assigned as parameter p_blob001 of APEX_COLLECTION.ADD_MEMBER, error is: PLS-00306: wrong number or types of arguments in call to 'ADD_MEMBER').
    What I am trying to do is this: I have parent table (TABLE1), and child table (TABLE2).  In TABLE2 I store documents. I have a main page that is form on TABLE1, and on it I have button "Add documents" that opens popup window with form on TABLE2. On submit of popup page I want to avoid inserting document into TABLE2, instead I want to send data to the main page (using collection) and insert in only once the main page is submitted.
    I would appreciate any advice on this...
    Thanks,
    Tanya

    Hello Tanya,
    Can you post your PL/SQL code which you are trying?
    Regards,
    Hari

  • IPad 2 has slow playback.  What is the fix? Aside from getting Galaxy Tab...

    iPad 2 has slow playback.  What is the fix? Aside from getting Galaxy Tab...

    Playback quality/responsiveness is a function of network speed. If you have slow playback you need to checkout your network (ISP) and the characteristics and configuration of your networking equipment (WiFi router, etc.)
    YouTube performance is excellent on my iPad connected through a high-speed cable modem. What kind of network do you have?

  • Just Purchased a MacBook Pro.  What it the best Adobe product to get to be able to view PDFs?

    Just Purchased a MacBook Pro.  What it the best Adobe product to get to be able to view PDFs?

    Yes, Mountain Lion has a convoluted method to do a "Save as", but try this. Open the applicable PDF, from the "File" menu select "Duplicate". This will create a copy of the PDF file and highlight the name at the top of the page. Here you can type in a new name, and a gain from the "File" menu select "Move To" or "Save" to save the resultant, newly named PDF.

  • No credit, what is the easiest credit card to get??

    Hello everyone, I am 18 about to be 19 and new to credit, i have no credit history whatsoever. I need help figuring out what is the easiest credit card to get with no history. I am currently a student at a university and dont have a job and have a savings account with bank of america. My parents have bad credit so i dont know what to do. I need advice as to what kind of credit card i should be going for in my situation and what should be the easiest to abtain. Any other advice is also welcomed! Thanks!

    dzemene wrote:
    Hello everyone, I am 18 about to be 19 and new to credit, i have no credit history whatsoever. I need help figuring out what is the easiest credit card to get with no history. I am currently a student at a university and dont have a job and have a savings account with bank of america. My parents have bad credit so i dont know what to do. I need advice as to what kind of credit card i should be going for in my situation and what should be the easiest to abtain. Any other advice is also welcomed! Thanks!I'm sorry but if you have no job or other source of income and no credit you won't be able to obtain a credit card.  You need to find employment and then look for a secured credit card to establish some credit.

  • What is the most effective way to get my imac 2 ghz intel core duo 2 10.4.11 to be able to run 10.5 and sync with my iphone 4s?

    What is the most effective way to get my imac 2 ghz intel core duo 2 10.4.11 to be able to run 10.5 and sync with my iphone 4s?

    As your Mac should run Snow Leopard provided it has at least 1GB memory, that would be a good deal easier and very much cheaper than trying to find a 10.5 install disc.
    Snow Leopard costs $30 approx from the online Apple store (£26 if you're in UK)
    You'll need to update Tiger to 10.4.11 with the combo installer first (unless you're just erasing the disc and starting fresh) You can then update SL from 10.6.3 to 10.6.8 with its combo installer.
    For comparison, 10.5 Leopard is currently running about $130 from Apple (if still available) and more on Amazon etc.
    This info for Leopard courtesy of TexasMacMan;
    Mac OS X 10.5 Leopard installation system requirements
    http://support.apple.com/kb/TA24950
    Leopard is no longer available at the Apple Store but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753).
    If you can't obtain a retail install DVD from Apple, look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
    MB427Z/A  Leopard 10.5.1 install DVD
    MB576Z/A  Leopard 10.5.4 install DVD
    MB021Z/A  Leopard 10.5.6 install DVD (single user)
    MB022Z/A  Leopard 10.5.6 install DVD (5-user family pack)
    Installing Mac OS X 10.5 Leopard
    http://support.apple.com/kb/HT1544
    Mac OS X 10.5 Leopard Installation and Setup Guide
    http://manuals.info.apple.com/en/leopard_install-setup.pdf
    After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update

  • App store icon gone what's the best/ easiest way to get it back?

    App store icon is gone what's the best / easiest way to get it back?

    Sophia,
    Be sure to look closely for the app in all of your user created folders.

  • What's the WMI class name to get Client Approval status

    What's the WMI class name to get Client Approval status.
    Unfortunately the below example with class "SMS_R_System" does not have the approval status
    Get-WmiObject -Namespace "root\sms\site_LAB" -Class SMS_R_System | fl *
    I listed all the available classes and... yeah It's going to take along time to go though all the possibilities.
    Note: I'm running this in powershell on the primary first
    If anyone knows it... I'd appreciate your help

    This is all still in the testing phase so I'm not sure this is the best solution... but here's my problem and idea to resolve it.
    Currently in our environment OSD can only be run against unknown computers and approved clients.
    I currently automatically approve all clients in a trusted domain. So all systems that succeed OSD and auto join the domain are approved and I can always run OSD against those machines in the future.
    Problem is with the systems that fail OSD for any reason and therefore do not automatically join the domain. They end up getting a SCCM record by the name of "Unknown" and therefore cannot run OSD again until the "Unknown" record
    is deleted. "Unknown" records happen too frequently to manually delete and I'm not too comfortable with just deleting ALL of them on a scheduled basis.
    Additionally there are way too many OU's in my environment to automatically join our OSD'd systems to the domain. So I have a script that checks using a prestart command to see if the system is already in AD, and if so then OSD continues and simply
    joins the machine to the domain in it's current OU. If not the tech is given a nasty error message telling them to add the computer object in AD in the proper OU first.
    I intend to check , with a Prestart Command if the current system already has a record in SCCM and delete it if found AND is not approved yet. This should resolve the "There are no task sequences available" error I get with
    systems that have an "Unknown" SCCM record.
    In this way the system will be essentially approved if the system was already prestaged in AD manually by a technician and any "unknown" record for that system will simply be deleted at the point of OSD.
    Note: Although I can easily use the new SCCM Powershell cmdlettts and get the "Approved" status, I need to do all of this in WinPE without the cmdletts. If this property is not available via WMI, then I'm guessing this will not work.

  • What's the multi colored pinwheel I get when I work on my mac book pro?

    What's the multi colored pinwheel I get when I work on my mac book pro?

    Zyriab wrote:
    it means the system is busy and you have to wait before it will respond to mouse clicks or key presses by you.
    Sligh correction here. Sometimes it is the system; but sometimes it is just a specific app, while the system will continue to accept user input, and you may switch to a different app.
    The 'official' name is the spinning wait cursor. Go to
    <http://www.thexlab.com/faqs/sbbod.html>
    for a few more details and troubleshooting techniques (if necessary).

  • What is the availablility and cost of getting the glass on my 3GS replaced?

    What is the availablility and cost of getting the glass on my 3GS replaced?

    Apple doe snot do this.
    You can buy an out of warranty replacement:
    Out-of-Warranty Service
    If you own an iPhone that is ineligible for warranty service but is eligible for Out-of-Warranty (OOW) Service, Apple will service your iPhone for the Out-of-Warranty Service fee listed below.
    iPhone model
    Out-of-Warranty Service
    iPhone 4S
    $199
    iPhone 4, iPhone 3GS,
    iPhone 3G, Original iPhone
    $149
    A $6.95 shipping fee will be added if you arrange service online or by calling Apple Technical Support. All fees are in U.S. dollars and are subject to local tax.
    When setting up out-of-warranty service, Apple will request credit card pre-authorization for the maximum service fee listed above.  This amount will be deducted from your credit limit. The final service fee we charge will be determined during testing and may be less than the service fee listed above.
    Certain damage is ineligible for out-of-warranty service, including catastrophic damage, such as the device separating into multiple pieces, and inoperability caused by unauthorized modifications. However, an iPhone that has failed due to contact with liquid may be eligible for out-of-warranty service.
    Apple reserves the right to determine whether or not your iPhone is eligible for Out-of-Warranty service. iPhones that are repaired or replaced have a 90-day limited hardware warranty or assume the remainder of your standard warranty or AppleCare service contract coverage, whichever is longer. Please see Apple's Repair Terms And Conditions for further details."
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipho ne

  • What is the different endpoint/binding-WSDLs?

    Hi All.
    Could you explin what the different is endpoint/binding-WSDLs?
    The endpoint wsdl seem to be working.(Tested in WS Navigatror) but binding-wsdl is not existing.
    Is it possible situation?
    I want to import binding-wsdl in caf to modify existing my webservice.
    Do I should do somthing for this? such as building the binding-wsdl..?
    And What is the different endpoint/binding-WSDLs?

    Hi, Viboth
    Answer to your question depends on what do you actually mean by "what is the difference"
    Speaking generally, those words represents 2 different IOS commands and 2 different concepts.
    Service instance is the way of logical mapping of traffic (based on VLAN tag let's say) to L2 or L3 instance. Also this approach helps us use single physical port as combination of logical L2 and L3 services.
    Xconnect in general can refer to any connection between two network points where low-level traffic (e.g. L2) goes via high-level infrastructure (e.g. L3). But usually we mean using of L2TPv3 or AToM.
    Using xconnect, you can bring together 2 service instances configured on different network endpoints.
    If you could lay out the specifics of your question, maybe I can provide you more useful information.
    BR,
    Nataliya

Maybe you are looking for

  • 10.4.8 killed my powerbook! Help!! :O

    I went a long time without installing any updates on my powerbook so today I figured I would update to 10.4.8 from 10.4.6 among other things. After it installed, my powerbook restarted like usual and then restarted again but this time spent about 20

  • HT4623 How to download latest I tunes version on I phone 5

    How do i sync iPhone 5 to MC pro air ? Message says IPhone 5 's r need version 10.7 or later . How to download latest version of  I tunes  ? Frustrating that buying the latest gadget but does not come with latest software

  • PL/SQL --forall clause

    <div class="jive-quote"> CREATE OR REPLACE PROCEDURE IND_MONITOR(P_tab VARCHAR2) is type ind_table is table of varchar2(20); p_ind ind_table; v_sql varchar2(2000); begin select index_name bulk collect into P_Ind from user_indexes where table_name=upp

  • PS CS5 vs. Indesign?

    I have PS CS5 and now need to make an advertisement page. Are the tools of PS sufficient fo rmy purpose or is it adviseable to buy Indesign? I cannot really find what advantages Indesign would offer over PS in Adobe's product description.

  • I only have the SWF file and HTML5 output, how can I control it?

    Picture this: A client gives me two zipped archives; one archive has a SWF file and another has HTML5, JS, and CSS. Both were published after checking "Scorm 1.2" in the reporting tab in Captivate. I'm just one developer and all I have at my disposal