GetPropertyValue - IoT TwinMaker

GetPropertyValue

Gets the property values for a component, component type, entity, or workspace.

You must specify a value for either componentName, componentTypeId, entityId, or workspaceId.

Request Syntax

POST /workspaces/workspaceId/entity-properties/value HTTP/1.1 Content-type: application/json { "componentName": "string", "componentTypeId": "string", "entityId": "string", "selectedProperties": [ "string" ] }

URI Request Parameters

The request uses the following URI parameters.

workspaceId

The ID of the workspace whose values the operation returns.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z_0-9][a-zA-Z_\-0-9]*[a-zA-Z0-9]+

Required: Yes

Request Body

The request accepts the following data in JSON format.

componentName

The name of the component whose property values the operation returns.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z_\-0-9]+

Required: No

componentTypeId

The ID of the component type whose property values the operation returns.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [a-zA-Z_\.\-0-9:]+

Required: No

entityId

The ID of the entity whose property values the operation returns.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|^[a-zA-Z0-9][a-zA-Z_\-0-9.:]*[a-zA-Z0-9]+

Required: No

selectedProperties

The properties whose values the operation returns.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 10 items.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: .*

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "propertyValues": { "string" : { "propertyReference": { "componentName": "string", "entityId": "string", "externalIdProperty": { "string" : "string" }, "propertyName": "string" }, "propertyValue": { "booleanValue": boolean, "doubleValue": number, "expression": "string", "integerValue": number, "listValue": [ "DataValue" ], "longValue": number, "mapValue": { "string" : "DataValue" }, "relationshipValue": { "targetComponentName": "string", "targetEntityId": "string" }, "stringValue": "string" } } } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

propertyValues

An object that maps strings to the properties and latest property values in the response. Each string in the mapping must be unique to this object.

Type: String to PropertyLatestValue object map

Key Length Constraints: Minimum length of 1. Maximum length of 256.

Key Pattern: [a-zA-Z_\-0-9]+

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Access is denied.

HTTP Status Code: 403

ConnectorFailureException

The connector failed.

HTTP Status Code: 424

ConnectorTimeoutException

The connector timed out.

HTTP Status Code: 424

InternalServerException

An unexpected error has occurred.

HTTP Status Code: 500

ResourceNotFoundException

The resource wasn't found.

HTTP Status Code: 404

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 429

ValidationException

Failed

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: