Getting Microsoft SharePoint Sites by Organization and Site ID

You can get a resource representation of an organization site with the specified ID.

Request

GET https://<hostname>:4443/v6/Organizations/{organizationId}/Sites/{siteId}

Request Headers

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

Request Parameters

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

Parameter

Type

Description

organizationId

string

Specifies the identification number of the Microsoft 365 organization. For more information on how to get this parameter, see Getting Organizations.

siteId

string

Specifies the identification number of the SharePoint site. For more information on how to get this parameter, see Getting Microsoft SharePoint Sites.

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 /Organizations/{organizationId}/Sites/{siteId} resource. The response body contains the following properties:

Property

Type

Description

id

string

Specifies the organization site ID.

url

string

Specifies a path to the organization site.

name

string

Specifies a name of the organization site.

title

string

Specifies a title of the organization site.

parentUrl

string

Specifies a path for the parent object.

isCloud

boolean

Defines whether this organization site is located in cloud.

isPersonal

boolean

Defines whether the organization site is personal.

isAvailable

boolean

Defines whether the organization site is available for backup and restore.

siteCollectionError

string

Specifies an error when processing site collections.

_links

Dictionary of string [key] and Object [value]

Links to related resources (navigation property).

Example

The example returns a resource representation of the organization site with the ID f8956d6b-73b3-4ce2-bca7-66896490de7770e7bee3-08ea-48ac-ba1a-16863f06e1e2.

Request:

GET https://abc.tech.local:4443/v6/Organizations/e60dfb9c-ac58-4463-879f-9855ac35576b/Sites/f8956d6b-73b3-4ce2-bca7-66896490de7770e7bee3-08ea-48ac-ba1a-16863f06e1e2

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

 "id": "f8956d6b-73b3-4ce2-bca7-66896490de7770e7bee3-08ea-48ac-ba1a-16863f06e1e2",

 "url": "https://abc-my.sharepoint.com/personal/john_doe_abc_onmicrosoft_com",

 "name": "John Doe",

 "isCloud": true,

 "isPersonal": true,

 "title": "John Doe Site",

 "isAvailable": true,

 "_links": {

   "self": {

     "href": "/v6/organizations/e60dfb9c-ac58-4463-879f-9855ac35576b/sites/f8956d6b-73b3-4ce2-bca7-66896490de7770e7bee3-08ea-48ac-ba1a-16863f06e1e2"

   },

   "children": {

     "href": "/v6/organizations/e60dfb9c-ac58-4463-879f-9855ac35576b/sites?parentId=f8956d6b-73b3-4ce2-bca7-66896490de7770e7bee3-08ea-48ac-ba1a-16863f06e1e2"

   },

   "organization": {

     "href": "/v6/organizations/e60dfb9c-ac58-4463-879f-9855ac35576b"

   }

 }

}