Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the user's default calendar,
or from some other calendar of the user.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
GET /me/calendar/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}
GET /users/{id | userPrincipalName}/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}
GET /me/calendars/{id}/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}
GET /users/{id | userPrincipalName}/calendars/{id}/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}
GET /me/calendarGroups/{id}/calendars/{id}/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}
GET /users/{id | userPrincipalName}/calendarGroups/{id}/calendars/{id}/calendarView?startDateTime={start_datetime}&endDateTime={end_datetime}
Query parameters
In the request URL, provide the following required query parameters with values.
Parameter
Type
Description
startDateTime
String
The start date and time of the time range, represented in ISO 8601 format. For example, "2019-11-08T19:00:00-08:00".
endDateTime
String
The end date and time of the time range, represented in ISO 8601 format. For example, "2019-11-08T20:00:00-08:00".
The values of startDateTime and endDateTime are interpreted using the timezone offset specified in the value and aren't impacted by the value of the Prefer: outlook.timezone header if present. If no timezone offset is included in the value, it is interpreted as UTC.
This method also supports some of the OData Query Parameters to help customize the response.
Not
The createdDateTime and lastModifiedDateTime properties of event do not support $select. To get their values, simply query on calendarView without applying $select.
Use this to specify the time zone for start and end times in the response. If not specified, those time values are returned in UTC. Optional.
Prefer: outlook.body-content-type
string
The format of the body property to be returned in. Values can be "text" or "html". A Preference-Applied header is returned as confirmation if this Prefer header is specified. If the header is not specified, the body property is returned in HTML format. Optional.
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK response code and collection of event objects in the response body.
GET https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2020-01-01T19:00:00-08:00&endDateTime=2020-01-02T19:00:00-08:00
C#
// Code snippets are only available for the latest version. Current version is 5.x// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharpvar result = await graphClient.Me.CalendarView.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.StartDateTime = "2020-01-01T19:00:00-08:00";
requestConfiguration.QueryParameters.EndDateTime = "2020-01-02T19:00:00-08:00";
});
// Code snippets are only available for the latest major version. Current major version is $v1.*// Dependenciesimport (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphusers "github.com/microsoftgraph/msgraph-sdk-go/users"//other-imports
)
requestStartDateTime := "2020-01-01T19:00:00-08:00"
requestEndDateTime := "2020-01-02T19:00:00-08:00"
requestParameters := &graphusers.ItemCalendarViewRequestBuilderGetQueryParameters{
StartDateTime: &requestStartDateTime,
EndDateTime: &requestEndDateTime,
}
configuration := &graphusers.ItemCalendarViewRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
calendarView, err := graphClient.Me().CalendarView().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EventCollectionResponse result = graphClient.me().calendarView().get(requestConfiguration -> {
requestConfiguration.queryParameters.startDateTime = "2020-01-01T19:00:00-08:00";
requestConfiguration.queryParameters.endDateTime = "2020-01-02T19:00:00-08:00";
});
# Code snippets are only available for the latest version. Current version is 1.xfrom msgraph import GraphServiceClient
from msgraph.generated.users.item.calendar_view.calendar_view_request_builder import CalendarViewRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = CalendarViewRequestBuilder.CalendarViewRequestBuilderGetQueryParameters(
start_date_time = "2020-01-01T19:00:00-08:00",
end_date_time = "2020-01-02T19:00:00-08:00",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.me.calendar_view.get(request_configuration = request_configuration)
Diğer geliştiriciler ve uzmanlarla gerçek dünyadaki kullanım örneklerini temel alan ölçeklenebilir yapay zeka çözümleri oluşturmak için toplantı serisine katılın.