participant: muteAll
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
将呼叫中的所有参与者设为静音。
注意: 此 API 已弃用,将在 2020 年 3 月 15 日之前删除。 若要使单个参与者静音,请参阅 参与者:静音。
Permissions
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
不支持 |
| 委派(个人 Microsoft 帐户) |
不支持 |
| Application |
Calls.JoinGroupCallsasGuest.All 或 Calls.JoinGroupCalls.All |
HTTP 请求
POST /app/calls/{id}/participants/muteAll
POST /communications/calls/{id}/participants/muteAll
注意:/app 路径已弃用。 今后将使用 /communications 路径。
| 名称 |
说明 |
| Authorization |
Bearer {token}。必需。 |
| Content-type |
application/json. Required. |
请求正文
在请求正文中,提供具有以下参数的 JSON 对象。
| 参数 |
类型 |
说明 |
| participants |
String collection |
要静音的参与者。 |
| clientContext |
String |
客户端上下文。 |
响应
如果成功,此方法在响应 200 OK 正文中返回 响应代码和 commsOperation 对象。
示例
以下示例演示如何调用此 API。
请求
下面为请求示例。
POST https://graph.microsoft.com/beta/communications/calls/{id}/participants/muteAll
Content-Type: application/json
Content-Length: 81
{
"participants": [
""
],
"clientContext": "clientContext-value"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var participants = new List<String>()
{
""
};
var clientContext = "clientContext-value";
await graphClient.Communications.Calls["{call-id}"].Participants
.MuteAll(participants,clientContext)
.Request()
.PostAsync();
const options = {
authProvider,
};
const client = Client.init(options);
const muteParticipantsOperation = {
participants: [
''
],
clientContext: 'clientContext-value'
};
await client.api('/communications/calls/{id}/participants/muteAll')
.version('beta')
.post(muteParticipantsOperation);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/communications/calls/{id}/participants/muteAll"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
NSMutableArray *participantsList = [[NSMutableArray alloc] init];
[participantsList addObject: @""];
payloadDictionary[@"participants"] = participantsList;
NSString *clientContext = @"clientContext-value";
payloadDictionary[@"clientContext"] = clientContext;
NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
[urlRequest setHTTPBody:data];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<String> participantsList = new LinkedList<String>();
participantsList.add("");
String clientContext = "clientContext-value";
graphClient.communications().calls("{id}").participants()
.muteAll(ParticipantMuteAllParameterSet
.newBuilder()
.withParticipants(participantsList)
.withClientContext(clientContext)
.build())
.buildRequest()
.post();
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.New()
requestBody.SetParticipants( []String {
"",
}
clientContext := "clientContext-value"
requestBody.SetClientContext(&clientContext)
callId := "call-id"
result, err := graphClient.Communications().CallsById(&callId).Participants().MuteAll(call-id).Post(requestBody)
Import-Module Microsoft.Graph.CloudCommunications
$params = @{
Participants = @(
""
)
ClientContext = "clientContext-value"
}
Invoke-MgMuteAllCommunicationCallParticipant -CallId $callId -BodyParameter $params
响应
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Location: https://graph.microsoft.com/beta/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896/operations/0fe0623f-d628-42ed-b4bd-8ac290072cc5
{
"@odata.type": "#microsoft.graph.commsOperation",
"clientContext": "clientContext-value",
"id": "0fe0623f-d628-42ed-b4bd-8ac290072cc5",
"resultInfo": null,
"status": "completed"
}