Actions
The ballerinax/microsoft.sharepoint.sites package exposes the following client:
| Client | Purpose |
|---|---|
Client | Manage SharePoint sites, lists, content types, columns, drives, items, permissions, analytics, long-running operations, and term stores through the Microsoft Graph v1.0 API |
Client
Provides operations to manage SharePoint sites, lists, content types, columns, drives, items, permissions, analytics, long-running operations, and term stores through the Microsoft Graph v1.0 API.
Configuration
ConnectionConfig
| Field | Type | Default | Description |
|---|---|---|---|
auth | OAuth2ClientCredentialsGrantConfig|http:BearerTokenConfig|OAuth2RefreshTokenGrantConfig | Required | Configurations related to client authentication |
httpVersion | http:HttpVersion | http:HTTP_2_0 | The HTTP version understood by the client |
http1Settings | http:ClientHttp1Settings | {} | Configurations related to HTTP/1.x protocol |
http2Settings | http:ClientHttp2Settings | {} | Configurations related to HTTP/2 protocol |
timeout | decimal | 30 | The maximum time to wait (in seconds) for a response before closing the connection |
forwarded | string | "disable" | The choice of setting forwarded/x-forwarded header |
followRedirects | http:FollowRedirects | — | Configurations associated with redirection |
poolConfig | http:PoolConfiguration | — | Configurations associated with request pooling |
cache | http:CacheConfig | {} | HTTP caching related configurations |
compression | http:Compression | http:COMPRESSION_AUTO | Specifies the way of handling compression (accept-encoding) header |
circuitBreaker | http:CircuitBreakerConfig | — | Configurations associated with the behaviour of the Circuit Breaker |
retryConfig | http:RetryConfig | — | Configurations associated with retrying |
cookieConfig | http:CookieConfig | — | Configurations associated with cookies |
responseLimits | http:ResponseLimitConfigs | {} | Configurations associated with inbound response size limits |
secureSocket | http:ClientSecureSocket | — | SSL/TLS-related options |
proxy | http:ProxyConfig | — | Proxy server related options |
socketConfig | http:ClientSocketConfig | {} | Provides settings related to client socket configuration |
validation | boolean | true | Enables the inbound payload validation functionality provided by the constraint package |
laxDataBinding | boolean | true | Enables relaxed data binding on the client side |
OAuth2ClientCredentialsGrantConfig (extends http:OAuth2ClientCredentialsGrantConfig)
| Field | Type | Default | Description |
|---|---|---|---|
tokenUrl | string | https://login.microsoftonline.com/<TENANT_ID>/oauth2/v2.0/token | The token endpoint URL for OAuth2 client credentials grant |
Initializing the client
import ballerinax/microsoft.sharepoint.sites;
sites:ConnectionConfig config = {
auth: {
clientId: "<clientId>",
clientSecret: "<clientSecret>",
tokenUrl: "https://login.microsoftonline.com/<tenantId>/oauth2/v2.0/token",
scopes: ["https://graph.microsoft.com/.default"]
}
};
sites:Client sharepointClient = check new (config);
Operations
Site
listSite
Lists SharePoint sites accessible to the application across the tenant.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListSiteQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: SiteCollectionResponse|error
Sample code:
sites:SiteCollectionResponse result = check client->listSite();
Sample response:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites",
"value": [
{
"id": "contoso.sharepoint.com,site-id",
"name": "Marketing",
"displayName": "Marketing Team Site",
"webUrl": "https://contoso.sharepoint.com/sites/marketing",
"createdDateTime": "2024-01-15T10:00:00Z",
"lastModifiedDateTime": "2024-06-01T08:30:00Z"
}
]
}
getSite
Retrieves the metadata of a SharePoint site by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetSiteQueries | No | OData query parameters ($select, $expand) |
Returns: Site|error
Sample code:
sites:Site result = check client->getSite("site-id");
Sample response:
{
"id": "contoso.sharepoint.com,site-id",
"name": "Marketing",
"displayName": "Marketing Team Site",
"webUrl": "https://contoso.sharepoint.com/sites/marketing",
"createdDateTime": "2024-01-15T10:00:00Z",
"lastModifiedDateTime": "2024-06-01T08:30:00Z"
}
updateSite
Updates a SharePoint site with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | Site | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:Site payload = {displayName: "Updated Marketing Site"};
check client->updateSite("site-id", payload);
Analytics
getAnalytics
Retrieves the item analytics resource for a site, summarizing access and activity statistics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetAnalyticsQueries | No | OData query parameters ($select, $expand) |
Returns: ItemAnalytics|error
Sample code:
sites:ItemAnalytics result = check client->getAnalytics("site-id");
Sample response:
{
"id": "analytics-id",
"allTime": {
"access": { "actionCount": 120, "actorCount": 25 }
},
"lastSevenDays": {
"access": { "actionCount": 18, "actorCount": 6 }
}
}
deleteAnalytics
Deletes the item analytics navigation property of a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | DeleteAnalyticsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->deleteAnalytics("site-id");
updateAnalytics
Updates the item analytics navigation property of a site with new values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | ItemAnalytics | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ItemAnalytics payload = {};
check client->updateAnalytics("site-id", payload);
analyticsGetAllTime
Retrieves the all-time aggregated activity statistics for a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsGetAllTimeQueries | No | OData query parameters ($select, $expand) |
Returns: ItemActivityStat|error
Sample code:
sites:ItemActivityStat result = check client->analyticsGetAllTime("site-id");
Sample response:
{
"id": "allTime",
"startDateTime": "2018-01-01T00:00:00Z",
"endDateTime": "2024-06-01T00:00:00Z",
"access": { "actionCount": 120, "actorCount": 25 }
}
analyticsListItemActivityStats
Lists the item activity statistics for a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsListItemActivityStatsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ItemActivityStatCollectionResponse|error
Sample code:
sites:ItemActivityStatCollectionResponse result = check client->analyticsListItemActivityStats("site-id");
Sample response:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('site-id')/analytics/itemActivityStats",
"value": [
{
"id": "stat-id-1",
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z",
"access": { "actionCount": 10, "actorCount": 3 }
}
]
}
analyticsCreateItemActivityStats
Creates a new item activity stat under a site's analytics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | ItemActivityStat | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ItemActivityStat|error
Sample code:
sites:ItemActivityStat payload = {
startDateTime: "2024-06-01T00:00:00Z",
endDateTime: "2024-06-02T00:00:00Z"
};
sites:ItemActivityStat result = check client->analyticsCreateItemActivityStats("site-id", payload);
Sample response:
{
"id": "stat-id-new",
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z"
}
analyticsGetItemActivityStats
Retrieves a single item activity stat by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsGetItemActivityStatsQueries | No | OData query parameters ($select, $expand) |
Returns: ItemActivityStat|error
Sample code:
sites:ItemActivityStat result = check client->analyticsGetItemActivityStats("site-id", "stat-id");
Sample response:
{
"id": "stat-id",
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z",
"access": { "actionCount": 10, "actorCount": 3 }
}
analyticsDeleteItemActivityStats
Deletes an item activity stat from a site's analytics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
headers | AnalyticsDeleteItemActivityStatsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->analyticsDeleteItemActivityStats("site-id", "stat-id");
analyticsUpdateItemActivityStats
Updates an item activity stat with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
payload | ItemActivityStat | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ItemActivityStat payload = {};
check client->analyticsUpdateItemActivityStats("site-id", "stat-id", payload);
analyticsItemActivityStatsListActivities
Lists the item activities recorded under a specific item activity stat.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsItemActivityStatsListActivitiesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ItemActivityCollectionResponse|error
Sample code:
sites:ItemActivityCollectionResponse result = check client->analyticsItemActivityStatsListActivities("site-id", "stat-id");
Sample response:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('site-id')/analytics/itemActivityStats('stat-id')/activities",
"value": [
{
"id": "activity-id-1",
"action": { "view": {} },
"actor": { "user": { "displayName": "Adele Vance" } }
}
]
}
analyticsItemActivityStatsCreateActivities
Creates a new item activity under an item activity stat.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
payload | ItemActivity | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ItemActivity|error
Sample code:
sites:ItemActivity payload = {};
sites:ItemActivity result = check client->analyticsItemActivityStatsCreateActivities("site-id", "stat-id", payload);
Sample response:
{
"id": "activity-id-new",
"action": { "edit": {} }
}
analyticsItemActivityStatsGetActivities
Retrieves a specific item activity by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
itemActivityId | string | Yes | The unique identifier of the itemActivity |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsItemActivityStatsGetActivitiesQueries | No | OData query parameters ($select, $expand) |
Returns: ItemActivity|error
Sample code:
sites:ItemActivity result = check client->analyticsItemActivityStatsGetActivities("site-id", "stat-id", "activity-id");
Sample response:
{
"id": "activity-id",
"action": { "view": {} },
"actor": { "user": { "displayName": "Adele Vance" } }
}
analyticsItemActivityStatsDeleteActivities
Deletes an item activity from an item activity stat.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
itemActivityId | string | Yes | The unique identifier of the itemActivity |
headers | AnalyticsItemActivityStatsDeleteActivitiesHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->analyticsItemActivityStatsDeleteActivities("site-id", "stat-id", "activity-id");
analyticsItemActivityStatsUpdateActivities
Updates an item activity with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
itemActivityId | string | Yes | The unique identifier of the itemActivity |
payload | ItemActivity | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ItemActivity payload = {};
check client->analyticsItemActivityStatsUpdateActivities("site-id", "stat-id", "activity-id", payload);
analyticsItemActivityStatsActivitiesGetDriveItem
Retrieves the drive item associated with an item activity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
itemActivityId | string | Yes | The unique identifier of the itemActivity |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsItemActivityStatsActivitiesGetDriveItemQueries | No | OData query parameters ($select, $expand) |
Returns: DriveItem|error
Sample code:
sites:DriveItem result = check client->analyticsItemActivityStatsActivitiesGetDriveItem("site-id", "stat-id", "activity-id");
Sample response:
{
"id": "drive-item-id",
"name": "Report.docx",
"size": 24576,
"webUrl": "https://contoso.sharepoint.com/sites/marketing/Documents/Report.docx"
}
analyticsItemActivityStatsActivitiesGetDriveItemContent
Retrieves the binary content of the drive item associated with an item activity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
itemActivityId | string | Yes | The unique identifier of the itemActivity |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsItemActivityStatsActivitiesGetDriveItemContentQueries | No | OData query parameters ($format) |
Returns: byte[]|error
Sample code:
byte[] result = check client->analyticsItemActivityStatsActivitiesGetDriveItemContent("site-id", "stat-id", "activity-id");
analyticsItemActivityStatsActivitiesUpdateDriveItemContent
Updates the binary content of the drive item associated with an item activity.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
itemActivityId | string | Yes | The unique identifier of the itemActivity |
payload | byte[] | Yes | New binary content |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
byte[] payload = [];
check client->analyticsItemActivityStatsActivitiesUpdateDriveItemContent("site-id", "stat-id", "activity-id", payload);
analyticsItemActivityStatsActivitiesGetCount972d
Gets the total count of activities under an item activity stat.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
itemActivityStatId | string | Yes | The unique identifier of the itemActivityStat |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsItemActivityStatsActivitiesGetCount972dQueries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->analyticsItemActivityStatsActivitiesGetCount972d("site-id", "stat-id");
Sample response:
"12"
analyticsItemActivityStatsGetCountC4ac
Gets the total count of item activity stats under a site's analytics.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsItemActivityStatsGetCountC4acQueries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->analyticsItemActivityStatsGetCountC4ac("site-id");
Sample response:
"7"
analyticsGetLastSevenDays
Retrieves the aggregated activity statistics for the last seven days for a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *AnalyticsGetLastSevenDaysQueries | No | OData query parameters ($select, $expand) |
Returns: ItemActivityStat|error
Sample code:
sites:ItemActivityStat result = check client->analyticsGetLastSevenDays("site-id");
Sample response:
{
"id": "lastSevenDays",
"startDateTime": "2024-06-05T00:00:00Z",
"endDateTime": "2024-06-12T00:00:00Z",
"access": { "actionCount": 18, "actorCount": 6 }
}
getActivitiesByInterval96b0
Invokes the getActivitiesByInterval function on a site to return activity statistics aggregated using the default interval.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetActivitiesByInterval96b0Queries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfItemActivityStat|error
Sample code:
sites:CollectionOfItemActivityStat result = check client->getActivitiesByInterval96b0("site-id");
Sample response:
{
"value": [
{
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z",
"access": { "actionCount": 10, "actorCount": 3 }
}
]
}
getActivitiesByInterval9468
Invokes the getActivitiesByInterval function on a site with explicit startDateTime, endDateTime, and interval parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
startDateTime | string? | Yes | The start date and time of the interval (startDateTime='{startDateTime}') |
endDateTime | string? | Yes | The end date and time of the interval (endDateTime='{endDateTime}') |
interval | string? | Yes | The aggregation interval (interval='{interval}') |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetActivitiesByInterval9468Queries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfItemActivityStat|error
Sample code:
sites:CollectionOfItemActivityStat result = check client->getActivitiesByInterval9468(
"site-id", "2024-06-01", "2024-06-08", "day");
Sample response:
{
"value": [
{
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z",
"access": { "actionCount": 4, "actorCount": 2 }
}
]
}
Columns
listColumns
Lists the column definitions of a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListColumnsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnDefinitionCollectionResponse|error
Sample code:
sites:ColumnDefinitionCollectionResponse result = check client->listColumns("site-id");
Sample response:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('site-id')/columns",
"value": [
{
"id": "column-id-1",
"name": "Title",
"displayName": "Title",
"required": true,
"text": { "maxLength": 255 }
}
]
}
createColumns
Creates a new column definition on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | ColumnDefinition | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition payload = {
name: "Department",
displayName: "Department",
text: {}
};
sites:ColumnDefinition result = check client->createColumns("site-id", payload);
Sample response:
{
"id": "column-id-new",
"name": "Department",
"displayName": "Department",
"text": {}
}
getColumns
Retrieves a column definition by its identifier from a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetColumnsQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition result = check client->getColumns("site-id", "column-id");
Sample response:
{
"id": "column-id",
"name": "Title",
"displayName": "Title",
"required": true,
"text": { "maxLength": 255 }
}
deleteColumns
Deletes a column definition from a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | DeleteColumnsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->deleteColumns("site-id", "column-id");
updateColumns
Updates a column definition with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
payload | ColumnDefinition | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ColumnDefinition payload = {displayName: "Renamed Column"};
check client->updateColumns("site-id", "column-id", payload);
columnsGetSourceColumn
Retrieves the source column from which a derived column inherits its definition.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ColumnsGetSourceColumnQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition result = check client->columnsGetSourceColumn("site-id", "column-id");
Sample response:
{
"id": "source-column-id",
"name": "Title",
"displayName": "Title"
}
columnsGetCountA8bb
Gets the total count of column definitions on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ColumnsGetCountA8bbQueries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->columnsGetCountA8bb("site-id");
Sample response:
"8"
Content Types
listContentTypes
Lists the content types defined on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListContentTypesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ContentTypeCollectionResponse|error
Sample code:
sites:ContentTypeCollectionResponse result = check client->listContentTypes("site-id");
Sample response:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('site-id')/contentTypes",
"value": [
{
"id": "0x0101",
"name": "Document",
"description": "Create a new document.",
"group": "Document Content Types"
}
]
}
createContentTypes
Creates a new content type on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | ContentType | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ContentType|error
Sample code:
sites:ContentType payload = {
name: "Press Release",
description: "Press release content type",
group: "Marketing"
};
sites:ContentType result = check client->createContentTypes("site-id", payload);
Sample response:
{
"id": "0x0101009A",
"name": "Press Release",
"description": "Press release content type",
"group": "Marketing"
}
getContentTypes
Retrieves a content type by its identifier from a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetContentTypesQueries | No | OData query parameters ($select, $expand) |
Returns: ContentType|error
Sample code:
sites:ContentType result = check client->getContentTypes("site-id", "content-type-id");
Sample response:
{
"id": "0x0101",
"name": "Document",
"description": "Create a new document.",
"group": "Document Content Types"
}
deleteContentTypes
Deletes a content type from a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | DeleteContentTypesHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->deleteContentTypes("site-id", "content-type-id");
updateContentTypes
Updates a content type with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
payload | ContentType | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ContentType payload = {description: "Updated description"};
check client->updateContentTypes("site-id", "content-type-id", payload);
contentTypesGetBase
Retrieves the parent (base) content type of a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetBaseQueries | No | OData query parameters ($select, $expand) |
Returns: ContentType|error
Sample code:
sites:ContentType result = check client->contentTypesGetBase("site-id", "content-type-id");
Sample response:
{
"id": "0x0101",
"name": "Document",
"group": "Document Content Types"
}
contentTypesListBaseTypes
Lists the ancestor (base) content types of a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesListBaseTypesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ContentTypeCollectionResponse|error
Sample code:
sites:ContentTypeCollectionResponse result = check client->contentTypesListBaseTypes("site-id", "content-type-id");
Sample response:
{
"value": [
{ "id": "0x01", "name": "Item" },
{ "id": "0x0101", "name": "Document" }
]
}
contentTypesGetBaseTypes
Retrieves a specific ancestor content type of a content type by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
contentTypeId1 | string | Yes | The unique identifier of the base contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetBaseTypesQueries | No | OData query parameters ($select, $expand) |
Returns: ContentType|error
Sample code:
sites:ContentType result = check client->contentTypesGetBaseTypes("site-id", "content-type-id", "base-content-type-id");
Sample response:
{
"id": "0x01",
"name": "Item"
}
contentTypesBaseTypesGetCount6b07
Gets the total count of ancestor content types of a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesBaseTypesGetCount6b07Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->contentTypesBaseTypesGetCount6b07("site-id", "content-type-id");
Sample response:
"3"
contentTypesListColumnLinks
Lists the column links of a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesListColumnLinksQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnLinkCollectionResponse|error
Sample code:
sites:ColumnLinkCollectionResponse result = check client->contentTypesListColumnLinks("site-id", "content-type-id");
Sample response:
{
"value": [
{ "id": "column-link-1", "name": "Title" }
]
}
contentTypesCreateColumnLinks
Creates a new column link on a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
payload | ColumnLink | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ColumnLink|error
Sample code:
sites:ColumnLink payload = {name: "Department"};
sites:ColumnLink result = check client->contentTypesCreateColumnLinks("site-id", "content-type-id", payload);
Sample response:
{
"id": "column-link-new",
"name": "Department"
}
contentTypesGetColumnLinks
Retrieves a column link of a content type by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnLinkId | string | Yes | The unique identifier of the columnLink |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetColumnLinksQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnLink|error
Sample code:
sites:ColumnLink result = check client->contentTypesGetColumnLinks("site-id", "content-type-id", "column-link-id");
Sample response:
{
"id": "column-link-id",
"name": "Title"
}
contentTypesDeleteColumnLinks
Deletes a column link from a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnLinkId | string | Yes | The unique identifier of the columnLink |
headers | ContentTypesDeleteColumnLinksHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->contentTypesDeleteColumnLinks("site-id", "content-type-id", "column-link-id");
contentTypesUpdateColumnLinks
Updates a column link of a content type with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnLinkId | string | Yes | The unique identifier of the columnLink |
payload | ColumnLink | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ColumnLink payload = {name: "RenamedColumn"};
check client->contentTypesUpdateColumnLinks("site-id", "content-type-id", "column-link-id", payload);
contentTypesColumnLinksGetCount7bc1
Gets the total count of column links on a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesColumnLinksGetCount7bc1Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->contentTypesColumnLinksGetCount7bc1("site-id", "content-type-id");
Sample response:
"5"
contentTypesListColumnPositions
Lists the column definitions in the order they appear on a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesListColumnPositionsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnDefinitionCollectionResponse|error
Sample code:
sites:ColumnDefinitionCollectionResponse result = check client->contentTypesListColumnPositions("site-id", "content-type-id");
Sample response:
{
"value": [
{ "id": "column-id-1", "name": "Title" },
{ "id": "column-id-2", "name": "Department" }
]
}
contentTypesGetColumnPositions
Retrieves a column at a specific position on a content type by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetColumnPositionsQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition result = check client->contentTypesGetColumnPositions("site-id", "content-type-id", "column-id");
Sample response:
{
"id": "column-id",
"name": "Title",
"displayName": "Title"
}
contentTypesColumnPositionsGetCountDea9
Gets the total count of column positions on a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesColumnPositionsGetCountDea9Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->contentTypesColumnPositionsGetCountDea9("site-id", "content-type-id");
Sample response:
"4"
contentTypesListColumns
Lists the columns of a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesListColumnsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnDefinitionCollectionResponse|error
Sample code:
sites:ColumnDefinitionCollectionResponse result = check client->contentTypesListColumns("site-id", "content-type-id");
Sample response:
{
"value": [
{ "id": "column-id-1", "name": "Title", "displayName": "Title" }
]
}
contentTypesCreateColumns
Creates a new column on a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
payload | ColumnDefinition | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition payload = {name: "Owner", displayName: "Owner", text: {}};
sites:ColumnDefinition result = check client->contentTypesCreateColumns("site-id", "content-type-id", payload);
Sample response:
{
"id": "column-id-new",
"name": "Owner",
"displayName": "Owner"
}
contentTypesGetColumns
Retrieves a column of a content type by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetColumnsQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition result = check client->contentTypesGetColumns("site-id", "content-type-id", "column-id");
Sample response:
{
"id": "column-id",
"name": "Title",
"displayName": "Title"
}
contentTypesDeleteColumns
Deletes a column from a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | ContentTypesDeleteColumnsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->contentTypesDeleteColumns("site-id", "content-type-id", "column-id");
contentTypesUpdateColumns
Updates a column of a content type with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
payload | ColumnDefinition | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ColumnDefinition payload = {displayName: "Renamed"};
check client->contentTypesUpdateColumns("site-id", "content-type-id", "column-id", payload);
contentTypesColumnsGetSourceColumn
Retrieves the source column from which a content type's column inherits its definition.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesColumnsGetSourceColumnQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition result = check client->contentTypesColumnsGetSourceColumn("site-id", "content-type-id", "column-id");
Sample response:
{
"id": "source-column-id",
"name": "Title",
"displayName": "Title"
}
contentTypesColumnsGetCount896b
Gets the total count of columns on a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesColumnsGetCount896bQueries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->contentTypesColumnsGetCount896b("site-id", "content-type-id");
Sample response:
"6"
contentTypesContentTypeAssociateWithHubSites
Associates a content type with a list of hub sites, optionally propagating it to lists that already use it.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
payload | ContentTypeIdAssociateWithHubSitesBody | Yes | List of hub site URLs and propagation flag |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ContentTypeIdAssociateWithHubSitesBody payload = {
hubSiteUrls: ["https://contoso.sharepoint.com/sites/hub"],
propagateToExistingLists: true
};
check client->contentTypesContentTypeAssociateWithHubSites("site-id", "content-type-id", payload);
contentTypesContentTypeCopyToDefaultContentLocation
Copies a file to the default content location for a content type.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
payload | ContentTypeIdCopyToDefaultContentLocationBody | Yes | Source file reference and target destination file name |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ContentTypeIdCopyToDefaultContentLocationBody payload = {
sourceFile: {driveId: "drive-id", id: "item-id"},
destinationFileName: "Template.docx"
};
check client->contentTypesContentTypeCopyToDefaultContentLocation("site-id", "content-type-id", payload);
contentTypesContentTypeIsPublished
Indicates whether a content type is published to the content type hub.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: BooleanValueResponse|error
Sample code:
sites:BooleanValueResponse result = check client->contentTypesContentTypeIsPublished("site-id", "content-type-id");
Sample response:
{
"value": true
}
contentTypesContentTypePublish
Publishes a content type from the content type hub so it is available across sites.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->contentTypesContentTypePublish("site-id", "content-type-id");
contentTypesContentTypeUnpublish
Unpublishes a content type from the content type hub.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
contentTypeId | string | Yes | The unique identifier of the contentType |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
check client->contentTypesContentTypeUnpublish("site-id", "content-type-id");
contentTypesGetCount50aa
Gets the total count of content types on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetCount50aaQueries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->contentTypesGetCount50aa("site-id");
Sample response:
"15"
contentTypesAddCopy
Adds a copy of a content type from another location on the site collection to a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | ContentTypesAddCopyBody | Yes | URL or identifier of the content type to copy |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ContentTypeOrNullResponse|error
Sample code:
sites:ContentTypesAddCopyBody payload = {contentType: "https://contoso.sharepoint.com/_cts/Document"};
sites:ContentTypeOrNullResponse result = check client->contentTypesAddCopy("site-id", payload);
Sample response:
{
"id": "0x0101009A",
"name": "Document",
"group": "Document Content Types"
}
contentTypesAddCopyFromContentTypeHub
Adds a copy of a content type from the content type hub to a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | ContentTypesAddCopyFromContentTypeHubBody | Yes | Identifier of the hub content type to copy |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ContentTypeOrNullResponse|error
Sample code:
sites:ContentTypesAddCopyFromContentTypeHubBody payload = {contentTypeId: "0x0101009A"};
sites:ContentTypeOrNullResponse result = check client->contentTypesAddCopyFromContentTypeHub("site-id", payload);
Sample response:
{
"id": "0x0101009A",
"name": "Press Release",
"group": "Marketing"
}
contentTypesGetCompatibleHubContentTypes
Lists the content types from the content type hub that are compatible with a site and can be added to it.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ContentTypesGetCompatibleHubContentTypesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfContentType|error
Sample code:
sites:CollectionOfContentType result = check client->contentTypesGetCompatibleHubContentTypes("site-id");
Sample response:
{
"value": [
{ "id": "0x0101009A", "name": "Press Release" }
]
}
Created By User
getCreatedByUser
Retrieves the user who created the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetCreatedByUserQueries | No | OData query parameters ($select, $expand) |
Returns: User|error
Sample code:
sites:User result = check client->getCreatedByUser("site-id");
Sample response:
{
"id": "user-id",
"displayName": "Adele Vance",
"userPrincipalName": "[email protected]"
}
createdByUserGetMailboxSettings
Retrieves the mailbox settings of the user who created the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CreatedByUserGetMailboxSettingsQueries | No | OData query parameters ($select) |
Returns: MailboxSettings|error
Sample code:
sites:MailboxSettings result = check client->createdByUserGetMailboxSettings("site-id");
Sample response:
{
"timeZone": "Pacific Standard Time",
"language": { "locale": "en-US" }
}
createdByUserUpdateMailboxSettings
Updates the mailbox settings of the user who created the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | MailboxSettings | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:MailboxSettings payload = {timeZone: "Eastern Standard Time"};
check client->createdByUserUpdateMailboxSettings("site-id", payload);
createdByUserListServiceProvisioningErrors
Lists the service provisioning errors for the user who created the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CreatedByUserListServiceProvisioningErrorsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $count) |
Returns: ServiceProvisioningErrorCollectionResponse|error
Sample code:
sites:ServiceProvisioningErrorCollectionResponse result = check client->createdByUserListServiceProvisioningErrors("site-id");
Sample response:
{
"value": []
}
createdByUserServiceProvisioningErrorsGetCountC398
Gets the total count of service provisioning errors for the user who created the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *CreatedByUserServiceProvisioningErrorsGetCountC398Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->createdByUserServiceProvisioningErrorsGetCountC398("site-id");
Sample response:
"0"
Drives
getDrive
Retrieves the default document library (drive) for a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetDriveQueries | No | OData query parameters ($select, $expand) |
Returns: Drive|error
Sample code:
sites:Drive result = check client->getDrive("site-id");
Sample response:
{
"id": "drive-id",
"name": "Documents",
"driveType": "documentLibrary",
"webUrl": "https://contoso.sharepoint.com/sites/marketing/Shared%20Documents"
}
listDrives
Lists all document libraries (drives) available on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListDrivesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: DriveCollectionResponse|error
Sample code:
sites:DriveCollectionResponse result = check client->listDrives("site-id");
Sample response:
{
"value": [
{ "id": "drive-id-1", "name": "Documents", "driveType": "documentLibrary" }
]
}
getDrives
Retrieves a specific document library (drive) of a site by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
driveId | string | Yes | The unique identifier of the drive |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetDrivesQueries | No | OData query parameters ($select, $expand) |
Returns: Drive|error
Sample code:
sites:Drive result = check client->getDrives("site-id", "drive-id");
Sample response:
{
"id": "drive-id",
"name": "Documents",
"driveType": "documentLibrary"
}
drivesGetCount5071
Gets the total count of drives on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *DrivesGetCount5071Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->drivesGetCount5071("site-id");
Sample response:
"2"
External Columns
listExternalColumns
Lists the externally provisioned column definitions of a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListExternalColumnsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnDefinitionCollectionResponse|error
Sample code:
sites:ColumnDefinitionCollectionResponse result = check client->listExternalColumns("site-id");
Sample response:
{
"value": [
{ "id": "external-column-id-1", "name": "ExternalRef", "displayName": "External Reference" }
]
}
getExternalColumns
Retrieves an externally provisioned column definition by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
columnDefinitionId | string | Yes | The unique identifier of the columnDefinition |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetExternalColumnsQueries | No | OData query parameters ($select, $expand) |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition result = check client->getExternalColumns("site-id", "column-id");
Sample response:
{
"id": "column-id",
"name": "ExternalRef",
"displayName": "External Reference"
}
externalColumnsGetCount3855
Gets the total count of external column definitions on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ExternalColumnsGetCount3855Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->externalColumnsGetCount3855("site-id");
Sample response:
"1"
Items
listItems
Lists the base items of a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListItemsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: BaseItemCollectionResponse|error
Sample code:
sites:BaseItemCollectionResponse result = check client->listItems("site-id");
Sample response:
{
"value": [
{ "id": "item-id-1", "name": "Document1", "webUrl": "https://contoso.sharepoint.com/sites/marketing/Document1" }
]
}
getItems
Retrieves a base item from a site by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
baseItemId | string | Yes | The unique identifier of the baseItem |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetItemsQueries | No | OData query parameters ($select, $expand) |
Returns: BaseItem|error
Sample code:
sites:BaseItem result = check client->getItems("site-id", "item-id");
Sample response:
{
"id": "item-id",
"name": "Document1",
"webUrl": "https://contoso.sharepoint.com/sites/marketing/Document1"
}
itemsGetCount1b67
Gets the total count of base items on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ItemsGetCount1b67Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->itemsGetCount1b67("site-id");
Sample response:
"23"
Last Modified By User
getLastModifiedByUser
Retrieves the user who last modified the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetLastModifiedByUserQueries | No | OData query parameters ($select, $expand) |
Returns: User|error
Sample code:
sites:User result = check client->getLastModifiedByUser("site-id");
Sample response:
{
"id": "user-id",
"displayName": "Megan Bowen",
"userPrincipalName": "[email protected]"
}
lastModifiedByUserGetMailboxSettings
Retrieves the mailbox settings of the user who last modified the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *LastModifiedByUserGetMailboxSettingsQueries | No | OData query parameters ($select) |
Returns: MailboxSettings|error
Sample code:
sites:MailboxSettings result = check client->lastModifiedByUserGetMailboxSettings("site-id");
Sample response:
{
"timeZone": "Pacific Standard Time",
"language": { "locale": "en-US" }
}
lastModifiedByUserUpdateMailboxSettings
Updates the mailbox settings of the user who last modified the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | MailboxSettings | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:MailboxSettings payload = {timeZone: "UTC"};
check client->lastModifiedByUserUpdateMailboxSettings("site-id", payload);
lastModifiedByUserListServiceProvisioningErrors
Lists the service provisioning errors for the user who last modified the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *LastModifiedByUserListServiceProvisioningErrorsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $count) |
Returns: ServiceProvisioningErrorCollectionResponse|error
Sample code:
sites:ServiceProvisioningErrorCollectionResponse result = check client->lastModifiedByUserListServiceProvisioningErrors("site-id");
Sample response:
{
"value": []
}
lastModifiedByUserServiceProvisioningErrorsGetCount4573
Gets the total count of service provisioning errors for the user who last modified the site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *LastModifiedByUserServiceProvisioningErrorsGetCount4573Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->lastModifiedByUserServiceProvisioningErrorsGetCount4573("site-id");
Sample response:
"0"
Applicable Content Types For List
getApplicableContentTypesForList
Invokes the getApplicableContentTypesForList function to return the content types that are applicable to a specific list on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
listId | string | Yes | The unique identifier of the list (listId='{listId}') |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetApplicableContentTypesForListQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfContentType|error
Sample code:
sites:CollectionOfContentType result = check client->getApplicableContentTypesForList("site-id", "list-id");
Sample response:
{
"value": [
{ "id": "0x0101", "name": "Document", "group": "Document Content Types" }
]
}
Site By Path
getByPath
Resolves a SharePoint site by its server-relative path under a site collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site (path='{path}') |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: SiteOrNullResponse|error
Sample code:
sites:SiteOrNullResponse result = check client->getByPath("site-id", "/sites/marketing");
Sample response:
{
"id": "contoso.sharepoint.com,collection-id,site-id",
"name": "Marketing",
"webUrl": "https://contoso.sharepoint.com/sites/marketing"
}
getByPathGetAnalytics
Retrieves the item analytics resource of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetAnalyticsQueries | No | OData query parameters ($select, $expand) |
Returns: ItemAnalytics|error
Sample code:
sites:ItemAnalytics result = check client->getByPathGetAnalytics("site-id", "/sites/marketing");
Sample response:
{
"id": "analytics-id",
"allTime": { "access": { "actionCount": 120, "actorCount": 25 } }
}
getByPathDeleteAnalytics
Deletes the item analytics navigation property of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | GetByPathDeleteAnalyticsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->getByPathDeleteAnalytics("site-id", "/sites/marketing");
getByPathUpdateAnalytics
Updates the item analytics navigation property of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | ItemAnalytics | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:ItemAnalytics payload = {};
check client->getByPathUpdateAnalytics("site-id", "/sites/marketing", payload);
getByPathListColumns
Lists the column definitions of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListColumnsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnDefinitionCollectionResponse|error
Sample code:
sites:ColumnDefinitionCollectionResponse result = check client->getByPathListColumns("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "column-id-1", "name": "Title", "displayName": "Title" }
]
}
getByPathCreateColumns
Creates a new column definition on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | ColumnDefinition | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ColumnDefinition|error
Sample code:
sites:ColumnDefinition payload = {name: "Department", displayName: "Department", text: {}};
sites:ColumnDefinition result = check client->getByPathCreateColumns("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "column-id-new",
"name": "Department",
"displayName": "Department"
}
getByPathListContentTypes
Lists the content types of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListContentTypesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ContentTypeCollectionResponse|error
Sample code:
sites:ContentTypeCollectionResponse result = check client->getByPathListContentTypes("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "0x0101", "name": "Document" }
]
}
getByPathCreateContentTypes
Creates a content type on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | ContentType | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: ContentType|error
Sample code:
sites:ContentType payload = {name: "Press Release", group: "Marketing"};
sites:ContentType result = check client->getByPathCreateContentTypes("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "0x0101009A",
"name": "Press Release",
"group": "Marketing"
}
getByPathGetCreatedByUser
Retrieves the user who created a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetCreatedByUserQueries | No | OData query parameters ($select, $expand) |
Returns: User|error
Sample code:
sites:User result = check client->getByPathGetCreatedByUser("site-id", "/sites/marketing");
Sample response:
{
"id": "user-id",
"displayName": "Adele Vance"
}
getByPathGetDrive
Retrieves the default document library (drive) of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetDriveQueries | No | OData query parameters ($select, $expand) |
Returns: Drive|error
Sample code:
sites:Drive result = check client->getByPathGetDrive("site-id", "/sites/marketing");
Sample response:
{
"id": "drive-id",
"name": "Documents",
"driveType": "documentLibrary"
}
getByPathListDrives
Lists the document libraries (drives) of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListDrivesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: DriveCollectionResponse|error
Sample code:
sites:DriveCollectionResponse result = check client->getByPathListDrives("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "drive-id-1", "name": "Documents" }
]
}
getByPathListExternalColumns
Lists the externally provisioned column definitions of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListExternalColumnsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ColumnDefinitionCollectionResponse|error
Sample code:
sites:ColumnDefinitionCollectionResponse result = check client->getByPathListExternalColumns("site-id", "/sites/marketing");
Sample response:
{
"value": []
}
getByPathListItems
Lists the base items of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListItemsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: BaseItemCollectionResponse|error
Sample code:
sites:BaseItemCollectionResponse result = check client->getByPathListItems("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "item-id-1", "name": "Document1" }
]
}
getByPathGetLastModifiedByUser
Retrieves the user who last modified a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetLastModifiedByUserQueries | No | OData query parameters ($select, $expand) |
Returns: User|error
Sample code:
sites:User result = check client->getByPathGetLastModifiedByUser("site-id", "/sites/marketing");
Sample response:
{
"id": "user-id",
"displayName": "Megan Bowen"
}
getByPathListLists
Lists the SharePoint lists on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListListsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: ListCollectionResponse|error
Sample code:
sites:ListCollectionResponse result = check client->getByPathListLists("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "list-id-1", "displayName": "Documents", "name": "Shared Documents" }
]
}
getByPathCreateLists
Creates a SharePoint list on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | List | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: List|error
Sample code:
sites:List payload = {displayName: "Announcements", list: {template: "announcements"}};
sites:List result = check client->getByPathCreateLists("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "list-id-new",
"displayName": "Announcements",
"name": "Announcements"
}
getByPathGetActivitiesByInterval96b0
Invokes the getActivitiesByInterval function on a site resolved by path using the default interval.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetActivitiesByInterval96b0Queries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfItemActivityStat|error
Sample code:
sites:CollectionOfItemActivityStat result = check client->getByPathGetActivitiesByInterval96b0("site-id", "/sites/marketing");
Sample response:
{
"value": [
{
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z",
"access": { "actionCount": 10, "actorCount": 3 }
}
]
}
getByPathGetActivitiesByInterval9468
Invokes the getActivitiesByInterval function on a site resolved by path with explicit startDateTime, endDateTime, and interval parameters.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
startDateTime | string? | Yes | The start date and time of the interval |
endDateTime | string? | Yes | The end date and time of the interval |
interval | string? | Yes | The aggregation interval |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetActivitiesByInterval9468Queries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfItemActivityStat|error
Sample code:
sites:CollectionOfItemActivityStat result = check client->getByPathGetActivitiesByInterval9468(
"site-id", "/sites/marketing", "2024-06-01", "2024-06-08", "day");
Sample response:
{
"value": [
{
"startDateTime": "2024-06-01T00:00:00Z",
"endDateTime": "2024-06-02T00:00:00Z",
"access": { "actionCount": 4, "actorCount": 2 }
}
]
}
getByPathGetApplicableContentTypesForList
Invokes the getApplicableContentTypesForList function on a site resolved by path, returning the content types applicable to a specific list.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
listId | string | Yes | The unique identifier of the list |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetApplicableContentTypesForListQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfContentType|error
Sample code:
sites:CollectionOfContentType result = check client->getByPathGetApplicableContentTypesForList(
"site-id", "/sites/marketing", "list-id");
Sample response:
{
"value": [
{ "id": "0x0101", "name": "Document" }
]
}
getByPathGetOnenote
Retrieves the OneNote notebook resource attached to a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetOnenoteQueries | No | OData query parameters ($select, $expand) |
Returns: Onenote|error
Sample code:
sites:Onenote result = check client->getByPathGetOnenote("site-id", "/sites/marketing");
Sample response:
{
"id": "onenote-id"
}
getByPathDeleteOnenote
Deletes the OneNote navigation property of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | GetByPathDeleteOnenoteHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->getByPathDeleteOnenote("site-id", "/sites/marketing");
getByPathUpdateOnenote
Updates the OneNote navigation property of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | Onenote | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:Onenote payload = {};
check client->getByPathUpdateOnenote("site-id", "/sites/marketing", payload);
getByPathListOperations
Lists the long-running operations of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListOperationsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: RichLongRunningOperationCollectionResponse|error
Sample code:
sites:RichLongRunningOperationCollectionResponse result = check client->getByPathListOperations("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "operation-id-1", "status": "completed", "percentageComplete": 100 }
]
}
getByPathCreateOperations
Creates a long-running operation on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | RichLongRunningOperation | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: RichLongRunningOperation|error
Sample code:
sites:RichLongRunningOperation payload = {};
sites:RichLongRunningOperation result = check client->getByPathCreateOperations("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "operation-id-new",
"status": "notStarted"
}
getByPathListPages
Lists the site pages of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListPagesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: BaseSitePageCollectionResponse|error
Sample code:
sites:BaseSitePageCollectionResponse result = check client->getByPathListPages("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "page-id-1", "name": "home.aspx", "title": "Home" }
]
}
getByPathCreatePages
Creates a site page on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | BaseSitePage | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: BaseSitePage|error
Sample code:
sites:BaseSitePage payload = {name: "new-page.aspx", title: "New Page"};
sites:BaseSitePage result = check client->getByPathCreatePages("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "page-id-new",
"name": "new-page.aspx",
"title": "New Page"
}
getByPathListPermissions
Lists the permissions granted on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListPermissionsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: PermissionCollectionResponse|error
Sample code:
sites:PermissionCollectionResponse result = check client->getByPathListPermissions("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "permission-id-1", "roles": ["read"] }
]
}
getByPathCreatePermissions
Creates a permission on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | Permission | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Permission|error
Sample code:
sites:Permission payload = {roles: ["read"]};
sites:Permission result = check client->getByPathCreatePermissions("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "permission-id-new",
"roles": ["read"]
}
getByPathListSites
Lists the subsites of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListSitesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: SiteCollectionResponse|error
Sample code:
sites:SiteCollectionResponse result = check client->getByPathListSites("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "subsite-id-1", "name": "Events", "webUrl": "https://contoso.sharepoint.com/sites/marketing/events" }
]
}
getByPathGetTermStore
Retrieves the default term store of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathGetTermStoreQueries | No | OData query parameters ($select, $expand) |
Returns: TermStoreStore|error
Sample code:
sites:TermStoreStore result = check client->getByPathGetTermStore("site-id", "/sites/marketing");
Sample response:
{
"id": "term-store-id",
"defaultLanguageTag": "en-US"
}
getByPathDeleteTermStore
Deletes the default term store of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | GetByPathDeleteTermStoreHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->getByPathDeleteTermStore("site-id", "/sites/marketing");
getByPathUpdateTermStore
Updates the default term store of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | TermStoreStore | Yes | New property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:TermStoreStore payload = {defaultLanguageTag: "en-US"};
check client->getByPathUpdateTermStore("site-id", "/sites/marketing", payload);
getByPathListTermStores
Lists the term stores of a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetByPathListTermStoresQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: TermStoreStoreCollectionResponse|error
Sample code:
sites:TermStoreStoreCollectionResponse result = check client->getByPathListTermStores("site-id", "/sites/marketing");
Sample response:
{
"value": [
{ "id": "term-store-id-1", "defaultLanguageTag": "en-US" }
]
}
getByPathCreateTermStores
Creates a term store on a site resolved by path.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site collection |
path | string? | Yes | The server-relative path of the site |
payload | TermStoreStore | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: TermStoreStore|error
Sample code:
sites:TermStoreStore payload = {defaultLanguageTag: "en-US"};
sites:TermStoreStore result = check client->getByPathCreateTermStores("site-id", "/sites/marketing", payload);
Sample response:
{
"id": "term-store-id-new",
"defaultLanguageTag": "en-US"
}
Operations
listOperations
Lists the long-running operations on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListOperationsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: RichLongRunningOperationCollectionResponse|error
Sample code:
sites:RichLongRunningOperationCollectionResponse result = check client->listOperations("site-id");
Sample response:
{
"value": [
{ "id": "operation-id-1", "status": "completed", "percentageComplete": 100 }
]
}
createOperations
Creates a long-running operation on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | RichLongRunningOperation | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: RichLongRunningOperation|error
Sample code:
sites:RichLongRunningOperation payload = {};
sites:RichLongRunningOperation result = check client->createOperations("site-id", payload);
Sample response:
{
"id": "operation-id-new",
"status": "notStarted"
}
getOperations
Retrieves a long-running operation on a site by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
richLongRunningOperationId | string | Yes | The unique identifier of the richLongRunningOperation |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetOperationsQueries | No | OData query parameters ($select, $expand) |
Returns: RichLongRunningOperation|error
Sample code:
sites:RichLongRunningOperation result = check client->getOperations("site-id", "operation-id");
Sample response:
{
"id": "operation-id",
"status": "running",
"percentageComplete": 50
}
deleteOperations
Deletes a long-running operation from a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
richLongRunningOperationId | string | Yes | The unique identifier of the richLongRunningOperation |
headers | DeleteOperationsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->deleteOperations("site-id", "operation-id");
updateOperations
Updates a long-running operation on a site with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
richLongRunningOperationId | string | Yes | The unique identifier of the richLongRunningOperation |
payload | RichLongRunningOperation | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:RichLongRunningOperation payload = {status: "completed"};
check client->updateOperations("site-id", "operation-id", payload);
operationsGetCount71b0
Gets the total count of long-running operations on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *OperationsGetCount71b0Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->operationsGetCount71b0("site-id");
Sample response:
"3"
Permissions
listPermissions
Lists the permissions granted on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListPermissionsQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: PermissionCollectionResponse|error
Sample code:
sites:PermissionCollectionResponse result = check client->listPermissions("site-id");
Sample response:
{
"value": [
{ "id": "permission-id-1", "roles": ["read"] }
]
}
createPermissions
Creates a permission on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
payload | Permission | Yes | New navigation property |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: Permission|error
Sample code:
sites:Permission payload = {roles: ["write"]};
sites:Permission result = check client->createPermissions("site-id", payload);
Sample response:
{
"id": "permission-id-new",
"roles": ["write"]
}
getPermissions
Retrieves a permission on a site by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
permissionId | string | Yes | The unique identifier of the permission |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetPermissionsQueries | No | OData query parameters ($select, $expand) |
Returns: Permission|error
Sample code:
sites:Permission result = check client->getPermissions("site-id", "permission-id");
Sample response:
{
"id": "permission-id",
"roles": ["read"]
}
deletePermissions
Deletes a permission from a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
permissionId | string | Yes | The unique identifier of the permission |
headers | DeletePermissionsHeaders | No | Headers to be sent with the request (supports If-Match ETag) |
Returns: error?
Sample code:
check client->deletePermissions("site-id", "permission-id");
updatePermissions
Updates a permission on a site with new property values.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
permissionId | string | Yes | The unique identifier of the permission |
payload | Permission | Yes | New navigation property values |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: error?
Sample code:
sites:Permission payload = {roles: ["write"]};
check client->updatePermissions("site-id", "permission-id", payload);
permissionsPermissionGrant
Grants an existing permission to additional drive recipients and roles.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
permissionId | string | Yes | The unique identifier of the permission |
payload | PermissionIdGrantBody | Yes | Recipients and roles to grant the permission to |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CollectionOfPermission|error
Sample code:
sites:PermissionIdGrantBody payload = {
recipients: [{email: "[email protected]"}],
roles: ["read"]
};
sites:CollectionOfPermission result = check client->permissionsPermissionGrant("site-id", "permission-id", payload);
Sample response:
{
"value": [
{ "id": "permission-granted-id", "roles": ["read"] }
]
}
permissionsGetCount511e
Gets the total count of permissions on a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *PermissionsGetCount511eQueries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->permissionsGetCount511e("site-id");
Sample response:
"4"
Subsites
listSites
Lists the subsites of a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *ListSitesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: SiteCollectionResponse|error
Sample code:
sites:SiteCollectionResponse result = check client->listSites("site-id");
Sample response:
{
"value": [
{ "id": "subsite-id-1", "name": "Events" }
]
}
getSites
Retrieves a specific subsite of a site by its identifier.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site |
id1 | string | Yes | The unique identifier of the subsite |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetSitesQueries | No | OData query parameters ($select, $expand) |
Returns: Site|error
Sample code:
sites:Site result = check client->getSites("site-id", "subsite-id");
Sample response:
{
"id": "subsite-id",
"name": "Events",
"webUrl": "https://contoso.sharepoint.com/sites/marketing/events"
}
getCountF499
Gets the total count of subsites under a site.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | Yes | The unique identifier of the parent site |
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetCountF499Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->getCountF499("site-id");
Sample response:
"2"
getCount6254
Gets the total count of sites accessible to the application across the tenant.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetCount6254Queries | No | OData query parameters ($filter, $search) |
Returns: string|error
Sample code:
string result = check client->getCount6254();
Sample response:
"42"
getAllSites
Invokes the getAllSites function to return all sites in the tenant, including subsites.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *GetAllSitesQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count) |
Returns: CollectionOfSite|error
Sample code:
sites:CollectionOfSite result = check client->getAllSites();
Sample response:
{
"value": [
{ "id": "site-id-1", "name": "Marketing" },
{ "id": "site-id-2", "name": "Sales" }
]
}
Add / Delta / Remove
add
Adds (follows) a collection of sites to the application's site collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AddBody | Yes | Array of SharePoint sites to be added |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CollectionOfSite|error
Sample code:
sites:AddBody payload = {
value: [{id: "site-id-1"}, {id: "site-id-2"}]
};
sites:CollectionOfSite result = check client->add(payload);
Sample response:
{
"value": [
{ "id": "site-id-1", "name": "Marketing" }
]
}
delta
Invokes the delta function to track changes to sites in the tenant.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
headers | map<string|string[]> | No | Headers to be sent with the request |
queries | *DeltaQueries | No | OData query parameters ($top, $skip, $filter, $search, $orderby, $select, $expand, $count, $deltaToken, $skipToken) |
Returns: CollectionOfSite1|error
Sample code:
sites:CollectionOfSite1 result = check client->delta();
Sample response:
{
"@odata.deltaLink": "https://graph.microsoft.com/v1.0/sites/delta?token=abc",
"value": [
{ "id": "site-id-1", "name": "Marketing" }
]
}
remove
Removes (unfollows) a collection of sites from the application's site collection.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
payload | AddBody | Yes | Array of SharePoint sites to be removed |
headers | map<string|string[]> | No | Headers to be sent with the request |
Returns: CollectionOfSite|error
Sample code:
sites:AddBody payload = {
value: [{id: "site-id-1"}]
};
sites:CollectionOfSite result = check client->remove(payload);
Sample response:
{
"value": [
{ "id": "site-id-1", "name": "Marketing" }
]
}