次の方法で共有


Twins - DigitalTwins ListRelationships

デジタル ツインからリレーションシップを取得します。 状態コード:

  • 200 OK
  • 400 Bad Request
    • InvalidArgument - デジタル ツイン ID が無効です。
  • 404 見つかりません
    • DigitalTwinNotFound - デジタル ツインが見つかりませんでした。
GET https://digitaltwins-hostname/digitaltwins/{id}/relationships?api-version=2023-10-31
GET https://digitaltwins-hostname/digitaltwins/{id}/relationships?relationshipName={relationshipName}&api-version=2023-10-31

URI パラメーター

名前 / 必須 説明
id
path True

string

デジタル ツインの ID。 ID はサービス内で一意であり、大文字と小文字が区別されます。

api-version
query True

string

要求された API バージョン。

relationshipName
query

string

リレーションシップの名前。

要求ヘッダー

名前 必須 説明
traceparent

string

分散トレース システム内の要求を識別します。

tracestate

string

ベンダー固有のトレース識別情報を提供し、traceparent に対応しています。

応答

名前 説明
200 OK

RelationshipCollection

Success

Other Status Codes

ErrorResponse

既定の応答。

Headers

x-ms-error-code: string

セキュリティ

oauth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0

List relationships
List relationships by name

List relationships

Sample Request

GET https://digitaltwins-hostname/digitaltwins/mySourceTwin/relationships?api-version=2023-10-31

Sample Response

{
  "value": [
    {
      "$sourceId": "mySourceTwin",
      "$relationshipId": "firstRelationshipId",
      "$targetId": "targetTwinId",
      "$relationshipName": "myRelationship",
      "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"",
      "property": "value"
    },
    {
      "$sourceId": "mySourceTwin",
      "$relationshipId": "secondRelationshipId",
      "$targetId": "targetTwinId",
      "$relationshipName": "myRelationship",
      "$etag": "W/\"2552a0a7-0666-4d5e-a67f-ece5b9b81fe0\"",
      "property": "value"
    }
  ],
  "nextLink": "url-to-next-page"
}

List relationships by name

Sample Request

GET https://digitaltwins-hostname/digitaltwins/mySourceTwin/relationships?relationshipName=myRelationship&api-version=2023-10-31

Sample Response

{
  "value": [
    {
      "$sourceId": "mySourceTwin",
      "$relationshipId": "firstRelationshipId",
      "$targetId": "targetTwinId",
      "$relationshipName": "myRelationship",
      "$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"",
      "property": "value"
    },
    {
      "$sourceId": "mySourceTwin",
      "$relationshipId": "secondRelationshipId",
      "$targetId": "targetTwinId",
      "$relationshipName": "myRelationship",
      "$etag": "W/\"2552a0a7-0666-4d5e-a67f-ece5b9b81fe0\"",
      "property": "value"
    }
  ],
  "nextLink": "url-to-next-page"
}

定義

名前 説明
Error

エラー定義。

ErrorResponse

エラー応答。

InnerError

含まれているエラーによって提供されたよりも具体的なエラーの説明。

RelationshipCollection

デジタル ツインを相互に関連付けるリレーションシップのコレクション。

Error

エラー定義。

名前 説明
code

string

HTTP エラー コードのサブステータスとして機能するサービス固有のエラー コード。

details

Error[]

内部エラーの詳細。

innererror

InnerError

エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。

message

string

エラーの人間が判読できる表現。

ErrorResponse

エラー応答。

名前 説明
error

Error

エラーの詳細です。

InnerError

含まれているエラーによって提供されたよりも具体的なエラーの説明。

名前 説明
code

string

含まれているエラーによって提供されたよりも具体的なエラー コード。

innererror

InnerError

エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。

RelationshipCollection

デジタル ツインを相互に関連付けるリレーションシップのコレクション。

名前 説明
nextLink

string

オブジェクトの次のページを取得する URI。

value

object[]

リレーションシップ オブジェクト。