Twins - DigitalTwins ListIncomingRelationships

Retrieves all incoming relationship for a digital twin. Status codes:

  • 200 OK
  • 400 Bad Request
    • InvalidArgument - The digital twin id is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
GET https://digitaltwins-hostname/digitaltwins/{id}/incomingrelationships?api-version=2023-10-31

URI Parameters

Name In Required Type Description
id
path True

string

The id of the digital twin. The id is unique within the service and case sensitive.

api-version
query True

string

The requested API version.

Request Header

Name Required Type Description
traceparent

string

Identifies the request in a distributed tracing system.

tracestate

string

Provides vendor-specific trace identification information and is a companion to traceparent.

Responses

Name Type Description
200 OK

IncomingRelationshipCollection

Success

Other Status Codes

ErrorResponse

Default response.

Headers

x-ms-error-code: string

Security

oauth2

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

Examples

List incoming relationships

Sample Request

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

Sample Response

{
  "value": [
    {
      "$sourceId": "mySourceTwin",
      "$relationshipId": "firstRelationshipId",
      "$relationshipName": "myRelationship",
      "$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/firstRelationshipId"
    },
    {
      "$sourceId": "mySourceTwin",
      "$relationshipId": "secondRelationshipId",
      "$relationshipName": "myRelationship",
      "$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/secondRelationshipId"
    }
  ],
  "nextLink": "url-to-next-page"
}

Definitions

Name Description
Error

Error definition.

ErrorResponse

Error response.

IncomingRelationship

An incoming relationship.

IncomingRelationshipCollection

A collection of incoming relationships which relate digital twins together.

InnerError

A more specific error description than was provided by the containing error.

Error

Error definition.

Name Type Description
code

string

Service specific error code which serves as the substatus for the HTTP error code.

details

Error[]

Internal error details.

innererror

InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

ErrorResponse

Error response.

Name Type Description
error

Error

The error details.

IncomingRelationship

An incoming relationship.

Name Type Description
$relationshipId

string

A user-provided string representing the id of this relationship, unique in the context of the source digital twin, i.e. sourceId + relationshipId is unique in the context of the service.

$relationshipLink

string

Link to the relationship, to be used for deletion.

$relationshipName

string

The name of the relationship.

$sourceId

string

The id of the source digital twin.

IncomingRelationshipCollection

A collection of incoming relationships which relate digital twins together.

Name Type Description
nextLink

string

A URI to retrieve the next page of objects.

value

IncomingRelationship[]

An incoming relationship.

InnerError

A more specific error description than was provided by the containing error.

Name Type Description
code

string

A more specific error code than was provided by the containing error.

innererror

InnerError

An object containing more specific information than the current object about the error.