列出 bookingBusinesses
本文内容
命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
获取已为租户创建的 bookingBusiness 对象的集合。
此操作仅返回集合中每个 Microsoft Bookings 业务的 ID 和 displayName 。 出于性能考虑,它不会返回其他属性。 可以通过在 GET 操作中指定其 ID 来获取 Bookings 业务的其他属性。
还可以通过在 query
参数中指定字符串来查询 Bookings 业务,以便在租户的业务之间进行子字符串匹配。 有关详细信息,请参阅 示例 2 。
注意: 结果限制为 500 个邮箱。 目前不支持对结果进行分页。
此 API 可用于以下国家级云部署 。
全局服务
美国政府 L4
美国政府 L5 (DOD)
由世纪互联运营的中国
✅
✅
✅
❌
权限
为此 API 选择标记为最低特权的权限。 只有在应用需要它时 ,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型 。 要了解有关这些权限的详细信息,请参阅 权限参考 。
权限类型
最低特权权限
更高特权权限
委派(工作或学校帐户)
Bookings.Read.All
Bookings。Manage.All、Bookings。ReadWrite.All、BookingsAppointment.ReadWrite.All
委派(个人 Microsoft 帐户)
不支持。
不支持。
应用程序
Bookings.Read.All
Bookings。Manage.All、Bookings。ReadWrite.All
HTTP 请求
GET /solutions/bookingbusinesses
可选的查询参数
此方法支持一些 OData 查询参数 来帮助自定义响应。
此方法还支持接受字符串值的 query
参数。 此参数将 GET 结果限制为与指定字符串匹配的业务。
名称
说明
Authorization
Bearer {code}
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应正文中返回 200 OK
响应代码和 bookingBusiness 对象集合。
示例
示例 1:获取租户中的 Bookings 业务
请求
以下示例获取租户中的 Bookings 业务。
GET https://graph.microsoft.com/beta/solutions/bookingbusinesses
// 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=csharp
var result = await graphClient.Solutions.BookingBusinesses.GetAsync();
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta solutions booking-businesses list
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
bookingBusinesses, err := graphClient.Solutions().BookingBusinesses().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingBusinessCollectionResponse result = graphClient.solutions().bookingBusinesses().get();
const options = {
authProvider,
};
const client = Client.init(options);
let bookingBusinesses = await client.api('/solutions/bookingbusinesses')
.version('beta')
.get();
<?php
use Microsoft\Graph\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->solutions()->bookingBusinesses()->get()->wait();
from msgraph import GraphServiceClient
graph_client = GraphServiceClient(credentials, scopes)
result = await graph_client.solutions.booking_businesses.get()
响应
以下示例显示了相应的响应。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context":"https://graph.microsoft.com/beta/$metadata#solutions/bookingBusinesses",
"value":[
{
"id":"Contosolunchdelivery@contoso.com",
"displayName":"Contoso lunch delivery",
},
{
"id":"Fabrikam@contoso.com",
"displayName":"Fabrikam",
}
]
}
示例 2:查询参数
请求
下面的示例演示如何使用 query
参数在租户中获取一个或多个匹配的 Bookings 业务。
GET https://graph.microsoft.com/beta/solutions/bookingbusinesses?query=Adventure
// 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=csharp
var result = await graphClient.Solutions.BookingBusinesses.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Query = "Adventure";
});
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta solutions booking-businesses list
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphsolutions "github.com/microsoftgraph/msgraph-beta-sdk-go/solutions"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestQuery := "Adventure"
requestParameters := &graphsolutions.SolutionsBookingBusinessesRequestBuilderGetQueryParameters{
Query: &requestQuery,
}
configuration := &graphsolutions.SolutionsBookingBusinessesRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
bookingBusinesses, err := graphClient.Solutions().BookingBusinesses().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingBusinessCollectionResponse result = graphClient.solutions().bookingBusinesses().get(requestConfiguration -> {
requestConfiguration.queryParameters.query = "Adventure";
});
const options = {
authProvider,
};
const client = Client.init(options);
let bookingBusinesses = await client.api('/solutions/bookingbusinesses?query=Adventure')
.version('beta')
.get();
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Solutions\BookingBusinesses\BookingBusinessesRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new BookingBusinessesRequestBuilderGetRequestConfiguration();
$queryParameters = BookingBusinessesRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->query = "Adventure";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->solutions()->bookingBusinesses()->get($requestConfiguration)->wait();
from msgraph import GraphServiceClient
from msgraph.generated.solutions.bookingBusinesses.booking_businesses_request_builder import BookingBusinessesRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = BookingBusinessesRequestBuilder.BookingBusinessesRequestBuilderGetQueryParameters(
query = "Adventure",
)
request_configuration = BookingBusinessesRequestBuilder.BookingBusinessesRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.solutions.booking_businesses.get(request_configuration = request_configuration)
响应
以下示例显示了相应的响应。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context":"https://graph.microsoft.com/beta/$metadata#solutions/bookingBusinesses",
"value":[
{
"id":"AdventureWorksCycles@contoso.com",
"displayName":"Adventure Works Cycles",
}
]
}