Update qna
Namespace: microsoft.graph.search
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Update the properties of a qna object.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ❌ | ❌ | ❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | SearchConfiguration.Read.All | SearchConfiguration.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | SearchConfiguration.Read.All | SearchConfiguration.ReadWrite.All |
HTTP request
PATCH /search/qnas/{qnaId}
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-Type | application/json. Required. |
Request body
In the request body, supply only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
Note: Any updates to the properties of a collection, such as keywords, replace the entire collection.
Property | Type | Description |
---|---|---|
availabilityEndDateTime | DateTimeOffset | Date and time when the QnA stops appearing as a search result. Set as null for always available. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z . |
availabilityStartDateTime | DateTimeOffset | Date and time when the QnA starts to appear as a search result. Set as null for always available. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z . |
description | String | Answer that is displayed in search results. Inherited from searchAnswer. |
displayName | String | Question that is displayed in search results. Inherited from searchAnswer. |
groupIds | String collection | The list of security groups that are able to view this QnA. |
keywords | microsoft.graph.search.answerKeyword | Keywords that trigger this QnA to appear in search results. |
languageTags | String collection | A list of geographically specific language names in which this QnA can be viewed. Each language tag value follows the pattern {language}-{region}. For example, en-us is English as used in the United States. For the list of possible values, see Supported language tags. |
platforms | microsoft.graph.devicePlatformType collection | List of devices and operating systems that are able to view this QnA. Possible values are: android , androidForWork , ios , macOS , windowsPhone81 , windowsPhone81AndLater , windows10AndLater , androidWorkProfile , unknown , androidASOP , androidMobileApplicationManagement , iOSMobileApplicationManagement , unknownFutureValue . |
state | microsoft.graph.search.answerState | State of the QnA. Possible values are: published , draft , excluded , unknownFutureValue . |
targetedVariations | microsoft.graph.search.answerVariant collection | Variations of a QnA for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings apply to all variations. |
webUrl | String | The URL link for the QnA. When users select this QnA from the search results, they're directed to the specified URL. Inherited from searchAnswer. |
Response
If successful, this method returns a 204 No Content
response code.
Examples
Request
The following example shows a request.
PATCH https://graph.microsoft.com/beta/search/qnas/733b26d5-af76-4eea-ac69-1a0ce8716897
Content-Type: application/json
{
"description": "The dates that Contoso offices will be closed to observe holidays. These dates may differ from the actual date of the holiday in cases where the holiday falls on a weekend."
}
Response
The following example shows the response.
HTTP/1.1 204 No Content