API/UI/CLI を使用した Schematics ワークスペースの作成が失敗するのはなぜですか?
以下のCURLコマンドを使用してAPIを作成しようとすると、 Schematics、ワークスペースの作成に失敗します。
curl --request POST --url https://cloud.ibm.com/schematics/workspaces -H "Authorization: Bearer scfQ" -d '{"name":"test_api","type": ["terraform_v1.4"],"location": "eu-de","description": "via api","resource_group": "5e1f06f5b2b24a319f6cd5be86f531dd","tags": [],"template_repo": {"url": "https://xxxxxxxxx/Rise-with-SAP/iac-hec-sap"},"template_data": [{"folder": ".","type": "terraform_v1.4","variablestore": []}]}'
Schematics、CURLコマンドを実行すると、エラー状態 Schematics、ペイロード内の完全な情報を見つけることができない。 また、ワークスペースの作成には Bad request メッセージのマークが付けられます。
{
"requestid": "3b57ed5d-8610-4a86-9864-8d8197b80336",
"timestamp": "2021-09-22T14:49:04.565693526Z",
"messageid": "M1008",
"message": "Bad request. Check that the information you entered in the payload is complete and formatted correctly in JSON.",
"statuscode": 400
}
CURL またはペイロードに、location と url が、ワークスペースを作成または更新するリージョンと同じリージョンを指していることを確認します。
例えば
US地域にワークスペースを作成する場合:locationをus-eastまたはus-southとし、urlをhttps://us-south.schematics.cloud.ibm.com/またはhttps://us-east.schematics.cloud.ibm.com/. デフォルトではhttps://cloud.ibm.com/schematics/workspacesを指す。https://cloud.ibm.com/schematics/overviewエンドポイントを指します。EUリージョンのワークスペース用:locationをeu-deまたはeu-gbおよびurlをhttps://eu-de.schematics.cloud.ibm.comおよびhttps://eu-gb.schematics.cloud.ibm.comエンドポイントを使用します。