POST https://graph.microsoft.com/v1.0/me/drive/items/{id}/workbook/refreshSession
Content-type: application/json
workbook-session-id: {session-id}
{
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Drives.Item.Items.Item.Workbook.RefreshSession;
var requestBody = new RefreshSessionPostRequestBody
{
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Workbook.RefreshSession.PostAsync(requestBody, (requestConfiguration) =>
{
requestConfiguration.Headers.Add("workbook-session-id", "{session-id}");
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphdrives "github.com/microsoftgraph/msgraph-sdk-go/drives"
//other-imports
)
headers := abstractions.NewRequestHeaders()
headers.Add("workbook-session-id", "{session-id}")
configuration := &graphdrives.DriveItemItemItemWorkbookRefreshSessionRequestBuilderPostRequestConfiguration{
Headers: headers,
}
requestBody := graphdrives.NewRefreshSessionPostRequestBody()
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Drives().ByDriveId("drive-id").Items().ByDriveItemId("driveItem-id").Workbook().RefreshSession().Post(context.Background(), requestBody, configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.drives.item.items.item.workbook.refreshsession.RefreshSessionPostRequestBody refreshSessionPostRequestBody = new com.microsoft.graph.drives.item.items.item.workbook.refreshsession.RefreshSessionPostRequestBody();
graphClient.drives().byDriveId("{drive-id}").items().byDriveItemId("{driveItem-id}").workbook().refreshSession().post(refreshSessionPostRequestBody, requestConfiguration -> {
requestConfiguration.headers.add("workbook-session-id", "{session-id}");
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.drives.item.items.item.workbook.refresh_session.refresh_session_request_builder import RefreshSessionRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from msgraph.generated.drives.item.items.item.workbook.refresh_session.refresh_session_post_request_body import RefreshSessionPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RefreshSessionPostRequestBody(
)
request_configuration = RequestConfiguration()
request_configuration.headers.add("workbook-session-id", "{session-id}")
await graph_client.drives.by_drive_id('drive-id').items.by_drive_item_id('driveItem-id').workbook.refresh_session.post(request_body, request_configuration = request_configuration)