Why do Schematics workspaces create using the API/UI/CLI fails?
The Schematics create workspace fails when you attempt to create using the API by using following CURL command.
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://github.ibm.com/Rise-with-SAP/iac-hec-sap"},"template_data": [{"folder": ".","type": "terraform_v1.4","variablestore": []}]}'
When Schematics runs the CURL command, an error state Schematics cannot find the complete information in the payload. And the workspace create is marked with Bad request
message.
{
"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
}
Verify your CURL or the payload contains that the location
and the url
are pointing to the same region where you want to create or update the workspace.
For example
- For creating workspace in
US
region: Uselocation
asus-east
orus-south
andurl
ashttps://us-south.schematics.cloud.ibm.com/
orhttps://us-east.schematics.cloud.ibm.com/
. By defaulthttps://cloud.ibm.com/schematics/workspaces
points tohttps://cloud.ibm.com/schematics/overview
endpoint. - For workspace in the
EU
region: Uselocation
aseu-de
oreu-gb
andurl
ashttps://eu-de.schematics.cloud.ibm.com
andhttps://eu-gb.schematics.cloud.ibm.com
endpoint.