获取呼叫
命名空间:microsoft.graph
检索调用对象的属性和关系。
此 API 可用于以下国家级云部署。
全局服务 | 美国政府 L4 | 美国政府 L5 (DOD) | 由世纪互联运营的中国 |
---|---|---|---|
✅ | ✅ | ✅ | ❌ |
权限
为此 API 选择标记为最低特权的权限。 只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
权限类型 | 最低特权权限 | 更高特权权限 |
---|---|---|
委派(工作或学校帐户) | 不支持。 | 不支持。 |
委派(个人 Microsoft 帐户) | 不支持。 | 不支持。 |
应用程序 | Calls.Initiate.All | Calls.AccessMedia.All |
注意:创建调用时,将检查权限;调用此 API 时,不会创建其他权限检查。 Calls.AccessMedia.All 仅对使用应用托管媒体的调用是必需的。
HTTP 请求
GET /communications/calls/{id}
可选的查询参数
此方法支持使用 OData 查询参数来帮助自定义响应。
请求标头
名称 | 说明 |
---|---|
Authorization | 持有者 {token}。 必填。 详细了解 身份验证和授权。 |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在 200 OK
响应正文中返回响应代码和 调用 对象。
示例
示例 1:获取对等呼叫
请求
GET https://graph.microsoft.com/v1.0/communications/calls/{id}
响应
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.call",
"state": "established",
"direction": "outgoing",
"callbackUri": "https://bot.contoso.com/callback",
"source": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"application": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "Calling Bot",
"id": "2891555a-92ff-42e6-80fa-6e1300c6b5c6",
}
},
"region": null,
"languageId": null
},
"targets": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "John",
"id": "112f7296-5fa4-42ca-bae8-6a692b15d4b8"
}
}
}
],
"requestedModalities": [
"audio"
],
"mediaConfig": {
"@odata.type": "#microsoft.graph.serviceHostedMediaConfig",
"preFetchMedia": [
{
"uri": "https://cdn.contoso.com/beep.wav",
"resourceId": "f8971b04-b53e-418c-9222-c82ce681a582"
},
{
"uri": "https://cdn.contoso.com/cool.wav",
"resourceId": "86dc814b-c172-4428-9112-60f8ecae1edb"
}
],
},
"myParticipantId": "499ff390-7a72-40e8-83a0-8fac6295ae7e",
"id": "2e1a0b00-2db4-4022-9570-243709c565ab",
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/calls/$entity",
"subject": null,
"ringingTimeoutInSeconds": null,
"resultInfo": null,
"answeredBy": null,
"chatInfo": null,
"meetingInfo": null,
"transcription": null,
"toneInfo": null
}
示例 2:获取组呼叫
请求
GET https://graph.microsoft.com/v1.0/communications/calls/2f1a1100-b174-40a0-aba7-0b405e01ed92
响应
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.call",
"state": "established",
"direction": "outgoing",
"callbackUri": "https://bot.contoso.com/callback",
"source": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"application": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "Calling Bot",
"id": "2891555a-92ff-42e6-80fa-6e1300c6b5c6",
}
},
"region": null,
"languageId": null
},
"targets": [],
"requestedModalities": [
"audio"
],
"mediaConfig": {
"@odata.type": "#microsoft.graph.serviceHostedMediaConfig",
"preFetchMedia": [
{
"uri": "https://cdn.contoso.com/beep.wav",
"resourceId": "f8971b04-b53e-418c-9222-c82ce681a582"
},
{
"uri": "https://cdn.contoso.com/cool.wav",
"resourceId": "86dc814b-c172-4428-9112-60f8ecae1edb"
}
],
},
"chatInfo": {
"@odata.type": "#microsoft.graph.chatInfo",
"threadId": "19:meeting_Win6Ydo4wsMijFjZS00ZGVjLTk5MGUtOTRjNWY2NmNkYTFm@thread.v2",
"messageId": "0",
"replyChainMessageId": null
},
"meetingInfo": {
"@odata.type": "#microsoft.graph.organizerMeetingInfo",
"organizer": {
"@odata.type": "#microsoft.graph.identitySet",
"user": {
"@odata.type": "#microsoft.graph.identity",
"id": "5810cede-f3cc-42eb-b2c1-e9bd5d53ec96",
"displayName": null
}
},
"allowConversationWithoutHost": true
},
"transcription": {
"@odata.type": "#microsoft.graph.callTranscriptionInfo",
"state": "inactive",
"lastModifiedDateTime": "2020-05-28T00:10:54.104318Z"
},
"myParticipantId": "05491616-385f-44a8-9974-18cc5f9933c1",
"id": "2f1a1100-b174-40a0-aba7-0b405e01ed92",
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/calls/$entity",
"ringingTimeoutInSeconds": null,
"subject": null,
"resultInfo": null,
"answeredBy": null,
"toneInfo": null
}