Getting Organization SharePoint Sites

In this article

    You can get a resource representation of organization's SharePoint sites.

    Request

    GET https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/Organization/Sites[?parentId=<value>]

    Request Headers

    The request header must contain an authorization token of the current session.

    Request Parameters

    The following parameter must be specified in the URL of the request:

    Parameter

    Type

    Description

    restoreSessionId

    string

    Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions.

    The following optional parameter can be specified in the URL of the request:

    Parameter

    Type

    Description

    parentId

    string

    Specifies what information the server will return in the resource representation. Possible values:

    • <parentID> — ID of the SharePoint site. In the response, the server will return a representation of subsites for the specified top-level site.
    • null — specifies that the server will return a representation of all top-level SharePoint sites of the organization without their subsites.

    If you do not specify this parameter, the server will return a representation of all top-level SharePoint sites with their subsites. Thus, the server will require longer time to execute the request.

    Request Body

    None.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 200 OK.

    Response Headers

    The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

    Header

    Description

    Content-length

    The length of the response body.

    Content-type

    The media type and syntax of the response body message: application/json; charset=utf-8

    Response Body

    In the response body the server returns a resource representation of the /RestoreSessions/{restoreSessionId}/Organization/Sites resource.

    Examples

    Example 1

    The following request returns a resource representation of the organization's SharePoint sites.

    Request:

    GET https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200 OK

     

    Response Body:

    {

     "offset": 0,

     "limit": 30,

     "results": [

      {

       "id": "b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39",

       "name": "Administrator",

       "url": "http://server/sites/mySite",

       "_links": {

        "self": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39"

        },

        "sites": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?parentId=b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39"

        },

        "libraries": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/libraries"

        },

        "lists": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/lists"

        },

        "documents": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents"

        },

        "items": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/items"

        },

        "folders": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders"

        }

       }

      },

      {

       "id": "724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11",

       "name": "CopyTo User",

       "url": "http://server/personal/orgUser",

       "_links": {

        "self": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11"

        },

        "sites": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?parentId=724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11"

        },

        "libraries": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/libraries"

        },

        "lists": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/lists"

        },

        "documents": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/documents"

        },

        "items": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/items"

        },

        "folders": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/folders"

        }

       }

      }

     ],

     "_links": {

      "self": {

       "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?offset=0&limit=30"

      }

     }

    }

    Example 2

    The following request returns a resource representation of the organization's SharePoint subsites of a site with the specified ID.

    Request:

    GET https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?parentId=b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Response:

    200 OK

     

    Response Body:

    {

     "offset": 0,

     "limit": 30,

     "results": [

      {

       "id": "b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39",

       "name": "Administrator",

       "url": "http://server/sites/mySite",

       "_links": {

        "self": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39"

        },

        "sites": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?parentId=b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39"

        },

        "libraries": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/libraries"

        },

        "lists": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/lists"

        },

        "documents": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/documents"

        },

        "items": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/items"

        },

        "folders": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/b3184e77-b95b-45f7-96cc-180a20b61cbd8507931c-4561-4ddf-bc90-411aba44bb39/folders"

        }

       }

      },

      {

       "id": "724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11",

       "name": "CopyTo User",

       "url": "http://server/personal/orgUser",

       "_links": {

        "self": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11"

        },

        "sites": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?parentId=724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11"

        },

        "libraries": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/libraries"

        },

        "lists": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/lists"

        },

        "documents": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/documents"

        },

        "items": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/items"

        },

        "folders": {

         "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites/724011c3-a540-4684-b24f-3e2ab4ef6380df26ea7d-6468-4846-bdf5-4e88d871ed11/folders"

        }

       }

      }

     ],

     "_links": {

      "self": {

       "href": "https://support.north.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/sites?offset=0&limit=30"

      }

     }

    }