更新 meetingRegistrationQuestion
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
代表 组织者更新 与 meetingRegistration 对象关联的自定义注册问题。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 |
权限(从最低特权到最高特权) |
| 委派(工作或学校帐户) |
OnlineMeetings.ReadWrite |
| 委派(个人 Microsoft 帐户) |
不支持。 |
| 应用程序 |
不支持。 |
HTTP 请求
PATCH /me/onlineMeetings/{meetingId}/registration/customQuestions/{id}
| 名称 |
说明 |
| Authorization |
Bearer {token}。必需。 |
请求正文
在请求正文中,仅提供需要以 meetingRegistrationQuestion 对象的 JSON 表示形式更新的属性。
响应
如果成功,此方法在响应正文中返回 响应代码和更新的 200 OK meetingRegistrationQuestion 对象。
示例
请求
PATCH https://graph.microsoft.com/beta/me/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/customQuestions/MSNhYjc5NWI4MC119zX3gwMDIwX3lvdXJfeDAwMjBfam8=
Content-Type: application/json
{
"answerInputType": "radioButton",
"answerOptions": [
"Software Engineer",
"Software Development Manager",
"Product Manager",
"Data scientist",
"Other"
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var meetingRegistrationQuestion = new MeetingRegistrationQuestion
{
AnswerInputType = AnswerInputType.RadioButton,
AnswerOptions = new List<String>()
{
"Software Engineer",
"Software Development Manager",
"Product Manager",
"Data scientist",
"Other"
}
};
await graphClient.Me.OnlineMeetings["{onlineMeeting-id}"].Registration.CustomQuestions["{meetingRegistrationQuestion-id}"]
.Request()
.UpdateAsync(meetingRegistrationQuestion);
const options = {
authProvider,
};
const client = Client.init(options);
const meetingRegistrationQuestion = {
answerInputType: 'radioButton',
answerOptions: [
'Software Engineer',
'Software Development Manager',
'Product Manager',
'Data scientist',
'Other'
]
};
await client.api('/me/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/customQuestions/MSNhYjc5NWI4MC119zX3gwMDIwX3lvdXJfeDAwMjBfam8=')
.version('beta')
.update(meetingRegistrationQuestion);
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/onlineMeetings/MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ/registration/customQuestions/MSNhYjc5NWI4MC119zX3gwMDIwX3lvdXJfeDAwMjBfam8="]]];
[urlRequest setHTTPMethod:@"PATCH"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphMeetingRegistrationQuestion *meetingRegistrationQuestion = [[MSGraphMeetingRegistrationQuestion alloc] init];
[meetingRegistrationQuestion setAnswerInputType: [MSGraphAnswerInputType radioButton]];
NSMutableArray *answerOptionsList = [[NSMutableArray alloc] init];
[answerOptionsList addObject: @"Software Engineer"];
[answerOptionsList addObject: @"Software Development Manager"];
[answerOptionsList addObject: @"Product Manager"];
[answerOptionsList addObject: @"Data scientist"];
[answerOptionsList addObject: @"Other"];
[meetingRegistrationQuestion setAnswerOptions:answerOptionsList];
NSError *error;
NSData *meetingRegistrationQuestionData = [meetingRegistrationQuestion getSerializedDataWithError:&error];
[urlRequest setHTTPBody:meetingRegistrationQuestionData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
MeetingRegistrationQuestion meetingRegistrationQuestion = new MeetingRegistrationQuestion();
meetingRegistrationQuestion.answerInputType = AnswerInputType.RADIO_BUTTON;
LinkedList<String> answerOptionsList = new LinkedList<String>();
answerOptionsList.add("Software Engineer");
answerOptionsList.add("Software Development Manager");
answerOptionsList.add("Product Manager");
answerOptionsList.add("Data scientist");
answerOptionsList.add("Other");
meetingRegistrationQuestion.answerOptions = answerOptionsList;
graphClient.me().onlineMeetings("MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ").registration().customQuestions("MSNhYjc5NWI4MC119zX3gwMDIwX3lvdXJfeDAwMjBfam8=")
.buildRequest()
.patch(meetingRegistrationQuestion);
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewMeetingRegistrationQuestion()
answerInputType := "radioButton"
requestBody.SetAnswerInputType(&answerInputType)
requestBody.SetAnswerOptions( []String {
"Software Engineer",
"Software Development Manager",
"Product Manager",
"Data scientist",
"Other",
}
onlineMeetingId := "onlineMeeting-id"
meetingRegistrationQuestionId := "meetingRegistrationQuestion-id"
graphClient.Me().OnlineMeetingsById(&onlineMeetingId).Registration().CustomQuestionsById(&meetingRegistrationQuestionId).Patch(requestBody)
Import-Module Microsoft.Graph.CloudCommunications
$params = @{
AnswerInputType = "radioButton"
AnswerOptions = @(
"Software Engineer"
"Software Development Manager"
"Product Manager"
"Data scientist"
"Other"
)
}
# A UPN can also be used as -UserId.
Update-MgUserOnlineMeetingRegistrationCustomQuestion -UserId $userId -OnlineMeetingId $onlineMeetingId -MeetingRegistrationQuestionId $meetingRegistrationQuestionId -BodyParameter $params
响应
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('16664f75-11dc-4870-bec6-38c1aaa81431')/onlineMeetings('MSpkYzE3Njc0Yy04MWQ5LTRhZGItYmZ')/registration/customQuestions/$entity",
"id": "MSNhYjc5NWI4MC119zX3gwMDIwX3lvdXJfeDAwMjBfam8=",
"displayName": "What's your job position?",
"isRequired": false,
"answerInputType": "radioButton",
"answerOptions": [
"Software Engineer",
"Software Development Manager",
"Product Manager",
"Data scientist",
"Other"
]
}