Perché gli spazi di lavoro Schematics vengono creati utilizzando API/UI/CLI non riesce?

L'area di lavoro Schematics create fallisce quando si tenta di creare un'API utilizzando il seguente comando CURL.

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": []}]}'

Quando Schematics esegue il comando CURL, viene visualizzato uno stato di errore Schematics che non riesce a trovare le informazioni complete nel payload. La creazione dello spazio di lavoro viene contrassegnata con il messaggio 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
}

Verifica che il tuo CURL o il payload contenga che location e url puntino alla stessa regione in cui vuoi creare o aggiornare lo spazio di lavoro.

Ad esempio

  • Per la creazione di uno spazio di lavoro nella regione US: utilizzare location come us-east o us-south e url come https://us-south.schematics.cloud.ibm.com/ o https://us-east.schematics.cloud.ibm.com/. Per impostazione predefinita, https://cloud.ibm.com/schematics/workspaces punta all'endpoint https://cloud.ibm.com/schematics/overview.
  • Per lo spazio di lavoro nella regione EU: utilizzare location come endpoint eu-de o eu-gb e url come endpoint https://eu-de.schematics.cloud.ibm.com e https://eu-gb.schematics.cloud.ibm.com.