Twins

Operations

DigitalTwins Add

Adds or replaces a digital twin. Status codes:

  • 200 OK
  • 400 Bad Request
    • InvalidArgument - The digital twin id or payload is invalid.
    • ModelDecommissioned - The model for the digital twin is decommissioned.
    • TwinLimitReached - The maximum number of digital twins allowed has been reached.
    • ValidationFailed - The digital twin payload is not valid.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
DigitalTwins AddRelationship

Adds a relationship between two digital twins. Status codes:

  • 200 OK
  • 400 Bad Request
    • InvalidArgument - The digital twin id, relationship id, or payload is invalid.
    • InvalidRelationship - The relationship is invalid.
    • OperationNotAllowed - The relationship cannot connect to the same digital twin.
    • ValidationFailed - The relationship content is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
    • TargetTwinNotFound - The digital twin target of the relationship was not found.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
DigitalTwins Delete

Deletes a digital twin. All relationships referencing the digital twin must already be deleted. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id is invalid.
    • RelationshipsNotDeleted - The digital twin contains relationships.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
DigitalTwins DeleteRelationship

Deletes a relationship between two digital twins. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id or relationship id is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
    • RelationshipNotFound - The relationship was not found.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
DigitalTwins GetById

Retrieves 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.
DigitalTwins GetComponent

Retrieves a component from a digital twin. Status codes:

  • 200 OK
  • 400 Bad Request
    • InvalidArgument - The digital twin id or component path is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
    • ComponentNotFound - The component path was not found.
DigitalTwins GetRelationshipById

Retrieves a relationship between two digital twins. Status codes:

  • 200 OK
  • 400 Bad Request
    • InvalidArgument - The digital twin id or relationship id is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
    • RelationshipNotFound - The relationship was not found.
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.
DigitalTwins ListRelationships

Retrieves the relationships from 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.
DigitalTwins SendComponentTelemetry

Sends telemetry on behalf of a component in a digital twin. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id, message id, or component path is invalid.
    • ValidationFailed - The telemetry content is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
    • ComponentNotFound - The component path was not found.
DigitalTwins SendTelemetry

Sends telemetry on behalf of a digital twin. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id or message id is invalid.
    • ValidationFailed - The telemetry content is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
DigitalTwins Update

Updates a digital twin. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id or payload is invalid.
    • JsonPatchInvalid - The JSON Patch provided is invalid.
    • ValidationFailed - Applying the patch results in an invalid digital twin.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
DigitalTwins UpdateComponent

Updates a component on a digital twin. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id, component path, or payload is invalid.
    • JsonPatchInvalid - The JSON Patch provided is invalid.
    • ValidationFailed - Applying the patch results in an invalid digital twin.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
DigitalTwins UpdateRelationship

Updates the properties on a relationship between two digital twins. Status codes:

  • 204 No Content
  • 400 Bad Request
    • InvalidArgument - The digital twin id or relationship id is invalid.
    • InvalidRelationship - The relationship is invalid.
    • JsonPatchInvalid - The JSON Patch provided is invalid.
    • ValidationFailed - The relationship content is invalid.
  • 404 Not Found
    • DigitalTwinNotFound - The digital twin was not found.
    • RelationshipNotFound - The relationship was not found.
  • 409 Conflict
    • RelationshipAlreadyExists - The relationship already exists.
  • 412 Precondition Failed
    • PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.