getPropertyValue IOT Twinmaker error

0

I called the API POST /workspaces/${workspaceId}/entity-properties/value with the params { componentName: "AlarmComponent" componentTypeId: "com.example.cookiefactory.alarm" entityId: "Mixer_3_3218c6d8-627e-465f-9aea-cdbcd212625b" selectedProperties: ["alarm_key", "alarm_status", "telemetryAssetId", "telemetryAssetType"] }

I ended up with the error com.amazon.coral.service#UnknownOperationException What did go wrong with the call?

jimcbl
質問済み 1年前229ビュー
2回答
0

Hi, if you are calling the API by directly POST to the API uri, then you might need to fill in the ${workspaceId} in the uri path.

Depending on your development environment, we do recommend you use AWS CLI (if you are testing in terminal) or AWS SDK (you can find all coding language there), where you don't need to manually construct API uri. TwinMaker is generally available so all TwinMaker APIs are included in the most recent AWS CLI/SDK version.

Using AWS CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html

Using AWS SDK: https://aws.amazon.com/developer/tools/

Let us know if you still have any issues.

AWS
Hao
回答済み 1年前
  • Hi Hao, thanks for your answer but I've add the workspaceId in the request, the full request URL is https://api.iottwinmaker.eu-west-1.amazonaws.com/workspaces/CookieFactory/entity-properties/value

0

Based on the information shared by you, I believe that you are using http client like postman/curl to call the API. If yes, then please note that there is a problem either with the authorization header you are providing or the endpoint you are using.

The endpoint that you should be using with http clients is "data.iottwinmaker.us-east-1.amazonaws.com " instead of instead of "iottwinmaker.us-east-1.amazonaws.com ".

AWS
サポートエンジニア
回答済み 1年前
  • You are correct, I'm calling it from the browser, the full request URL is https://api.iottwinmaker.eu-west-1.amazonaws.com/workspaces/CookieFactory/entity-properties/value. I have setup the authorization and I'm able to call other api from TwinMaker as well, for example ListEntities with filters, so I don't think the authorization header is the issue I'm facing

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ