Escolha a permissão ou as permissões marcadas como menos privilegiadas para essa API. Use uma permissão ou permissões privilegiadas mais altas somente se o aplicativo exigir. Para obter detalhes sobre permissões delegadas e de aplicativo, consulte Tipos de permissão. Para saber mais sobre essas permissões, consulte a referência de permissões.
POST /solutions/bookingBusinesses/{id}/getStaffAvailability
Cabeçalhos de solicitação
Nome
Descrição
Autorização
Portador {código}. Obrigatório.
Content-Type
application/json. Obrigatório.
Corpo da solicitação
No corpo da solicitação, passe a lista de IDs da equipe junto com outros dois parâmetros do tipo de recurso dateTimeTimeZone chamado startDateTime e endDateTime. Eles correspondem aos dois carimbos de data/hora entre os quais a disponibilidade da equipe será retornada.
Resposta
Se for bem-sucedido, esse método retornará um 200 OK código de resposta e uma coleção staffAvailabilityItem na resposta.
POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/getStaffAvailability
Content-Type: application/json
{
"staffIds": [
"311a5454-08b2-4560-ba1c-f715e938cb79"
],
"startDateTime": {
"dateTime": "2022-01-25T00:00:00",
"timeZone": "India Standard Time"
},
"endDateTime": {
"dateTime": "2022-01-26T17:00:00",
"timeZone": "Pacific Standard Time"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Solutions.BookingBusinesses.Item.GetStaffAvailability;
using Microsoft.Graph.Models;
var requestBody = new GetStaffAvailabilityPostRequestBody
{
StaffIds = new List<string>
{
"311a5454-08b2-4560-ba1c-f715e938cb79",
},
StartDateTime = new DateTimeTimeZone
{
DateTime = "2022-01-25T00:00:00",
TimeZone = "India Standard Time",
},
EndDateTime = new DateTimeTimeZone
{
DateTime = "2022-01-26T17:00:00",
TimeZone = "Pacific Standard Time",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].GetStaffAvailability.PostAsGetStaffAvailabilityPostResponseAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.solutions.bookingbusinesses.item.getstaffavailability.GetStaffAvailabilityPostRequestBody getStaffAvailabilityPostRequestBody = new com.microsoft.graph.solutions.bookingbusinesses.item.getstaffavailability.GetStaffAvailabilityPostRequestBody();
LinkedList<String> staffIds = new LinkedList<String>();
staffIds.add("311a5454-08b2-4560-ba1c-f715e938cb79");
getStaffAvailabilityPostRequestBody.setStaffIds(staffIds);
DateTimeTimeZone startDateTime = new DateTimeTimeZone();
startDateTime.setDateTime("2022-01-25T00:00:00");
startDateTime.setTimeZone("India Standard Time");
getStaffAvailabilityPostRequestBody.setStartDateTime(startDateTime);
DateTimeTimeZone endDateTime = new DateTimeTimeZone();
endDateTime.setDateTime("2022-01-26T17:00:00");
endDateTime.setTimeZone("Pacific Standard Time");
getStaffAvailabilityPostRequestBody.setEndDateTime(endDateTime);
var result = graphClient.solutions().bookingBusinesses().byBookingBusinessId("{bookingBusiness-id}").getStaffAvailability().post(getStaffAvailabilityPostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Solutions\BookingBusinesses\Item\GetStaffAvailability\GetStaffAvailabilityPostRequestBody;
use Microsoft\Graph\Generated\Models\DateTimeTimeZone;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetStaffAvailabilityPostRequestBody();
$requestBody->setStaffIds(['311a5454-08b2-4560-ba1c-f715e938cb79', ]);
$startDateTime = new DateTimeTimeZone();
$startDateTime->setDateTime('2022-01-25T00:00:00');
$startDateTime->setTimeZone('India Standard Time');
$requestBody->setStartDateTime($startDateTime);
$endDateTime = new DateTimeTimeZone();
$endDateTime->setDateTime('2022-01-26T17:00:00');
$endDateTime->setTimeZone('Pacific Standard Time');
$requestBody->setEndDateTime($endDateTime);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->getStaffAvailability()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.solutions.bookingbusinesses.item.get_staff_availability.get_staff_availability_post_request_body import GetStaffAvailabilityPostRequestBody
from msgraph.generated.models.date_time_time_zone import DateTimeTimeZone
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetStaffAvailabilityPostRequestBody(
staff_ids = [
"311a5454-08b2-4560-ba1c-f715e938cb79",
],
start_date_time = DateTimeTimeZone(
date_time = "2022-01-25T00:00:00",
time_zone = "India Standard Time",
),
end_date_time = DateTimeTimeZone(
date_time = "2022-01-26T17:00:00",
time_zone = "Pacific Standard Time",
),
)
result = await graph_client.solutions.booking_businesses.by_booking_business_id('bookingBusiness-id').get_staff_availability.post(request_body)