Create workspace API endpoint stops working after upgrading Coder
I upgraded my Coder deployment from version
2.0.2 to 2.8.1 (yes i know huge jump). The create workspace endpoint used to worked fine through my application / manually through curl or postman. After upgrading, I'm getting the following error message

5 Replies
<#1204991551843991602>
Category
Bug report
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
If I downgrade back, I get the above error so I'm kinda stuck here. Looking at a similar issue reported here, I guess fix to the above migration issue is to delete the postgres database? (to be fair I didn't backup a snapshot of database as the docs suggested) Would like some guidance on how that's done
Edit: Nvm, I think I found how to delete the database by going over the uninstall Coder docs.
Got the fix by going through the release notes of each version after
2.0.2. Turns out the param template_version_id has been replaced with template_active_version_id and that's what causing the issue in the API requestCreated an issue for it: https://github.com/coder/coder/issues/12090
GitHub
Change
template_version_id -> template_active_version_id in API...Following up from the discord thread I noticed the API docs for create workspace haven't been updated to mention this change. template_version_id no longer works for creating a workspace throug...
Issue was figured out in GH:
I see it still as template_version_id: https://github.com/coder/coder/blob/main/codersdk/organizations.go#L145-L145 The issue ran into in discord is you cannot provide both template_id and template_version_id. They are mutually exclusive. I will update the docs
@Phorcys closed and locked the thread.