Skip to content

Latest commit

 

History

History
149 lines (112 loc) · 4.43 KB

File metadata and controls

149 lines (112 loc) · 4.43 KB
title Update term
description Update the properties of a term object.
author mohitpcad
ms.localizationpriority medium
ms.subservice sharepoint
doc_type apiPageType
ms.date 04/05/2024

Update term

Namespace: microsoft.graph.termStore

[!INCLUDE beta-disclaimer]

Update the properties of a term object.

[!INCLUDE national-cloud-support]

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.

[!INCLUDE permissions-table]

HTTP request

PATCH /termStore/sets/{setId}/terms/{termId}

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 a JSON representation of the term object.

The following table shows the properties that can be updated for a term.

Property Type Description
labels microsoft.graph.termStore.localizedLabel collection Labels of a term.
descriptions microsoft.graph.termStore.localizedDescription collection Description about the term.
properties microsoft.graph.keyValue collection Properties associated with the term.

Response

If successful, this method returns a 200 OK response code and an updated term object in the response body.

Examples

Request

PATCH https://graph.microsoft.com/beta/termStore/sets/{setId}/terms/{termId}
Content-Type: application/json

{
  "labels" : [
      {
          "name" : "changedLabel",
          "languageTag" : "en-US",
          "isDefault" : true
      }
  ]
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "81be9856-9856-81be-5698-be815698be81",
  "labels" : [
      {
          "name" : "changedLabel",
          "languageTag" : "en-US",
          "isDefault" : true
      }
  ]
}