名前空間: microsoft.graph.industryData
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
referenceDefinition オブジェクトのプロパティを更新します。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
IndustryData-ReferenceDefinition.ReadWrite.All |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
IndustryData-ReferenceDefinition.ReadWrite.All |
注意事項なし。 |
HTTP 要求
PATCH /external/industryData/referenceDefinitions/{referenceDefinitionId}
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、更新するプロパティの値 のみを 指定します。 要求本文に含まれていない既存のプロパティは、以前の値を維持するか、他のプロパティ値の変更に基づいて再計算されます。
次の表に、更新できるプロパティを示します。
| プロパティ |
型 |
説明 |
| displayName |
文字列 |
ユーザー インターフェイスに表示するための参照コード値の人間が判読できる表現。 省略可能。 |
| isDisabled |
ブール値 |
定義が無効かどうかを示します。 必須です。 |
| sortIndex |
Int32 |
定義をユーザーに提示する順序を指定するインデックス。 referenceType 内で一意である必要があります。 必須です。 |
応答
成功した場合、このメソッドは 204 No Content 応答コードを返します。
例
要求
次の例は要求を示しています。
PATCH https://graph.microsoft.com/beta/external/industryData/referenceDefinitions/RefGradeLevel-TestGrade
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.industryData.referenceDefinition",
"displayName": "Updated Test Grade Name"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.IndustryData;
var requestBody = new ReferenceDefinition
{
OdataType = "#microsoft.graph.industryData.referenceDefinition",
DisplayName = "Updated Test Grade Name",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.External.IndustryData.ReferenceDefinitions["{referenceDefinition-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodelsindustrydata "github.com/microsoftgraph/msgraph-beta-sdk-go/models/industrydata"
//other-imports
)
requestBody := graphmodelsindustrydata.NewReferenceDefinition()
displayName := "Updated Test Grade Name"
requestBody.SetDisplayName(&displayName)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
referenceDefinitions, err := graphClient.External().IndustryData().ReferenceDefinitions().ByReferenceDefinitionId("referenceDefinition-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.industrydata.ReferenceDefinition referenceDefinition = new com.microsoft.graph.beta.models.industrydata.ReferenceDefinition();
referenceDefinition.setOdataType("#microsoft.graph.industryData.referenceDefinition");
referenceDefinition.setDisplayName("Updated Test Grade Name");
com.microsoft.graph.models.industrydata.ReferenceDefinition result = graphClient.external().industryData().referenceDefinitions().byReferenceDefinitionId("{referenceDefinition-id}").patch(referenceDefinition);
const options = {
authProvider,
};
const client = Client.init(options);
const referenceDefinition = {
'@odata.type': '#microsoft.graph.industryData.referenceDefinition',
displayName: 'Updated Test Grade Name'
};
await client.api('/external/industryData/referenceDefinitions/RefGradeLevel-TestGrade')
.version('beta')
.update(referenceDefinition);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\IndustryData\ReferenceDefinition;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ReferenceDefinition();
$requestBody->setOdataType('#microsoft.graph.industryData.referenceDefinition');
$requestBody->setDisplayName('Updated Test Grade Name');
$result = $graphServiceClient->external()->industryData()->referenceDefinitions()->byReferenceDefinitionId('referenceDefinition-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Search
$params = @{
"@odata.type" = "#microsoft.graph.industryData.referenceDefinition"
displayName = "Updated Test Grade Name"
}
Update-MgBetaExternalIndustryDataReferenceDefinition -ReferenceDefinitionId $referenceDefinitionId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.industry_data.reference_definition import ReferenceDefinition
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ReferenceDefinition(
odata_type = "#microsoft.graph.industryData.referenceDefinition",
display_name = "Updated Test Grade Name",
)
result = await graph_client.external.industry_data.reference_definitions.by_reference_definition_id('referenceDefinition-id').patch(request_body)
応答
次の例は応答を示しています。
HTTP/1.1 204 No Content