Use Workspace Create API #7714
Answered
by
sharkymark
whenSunSet
asked this question in
Help
-
I want to pass some parameters to Terraform when using the Workspace create API, so that I can do some tasks when starting the container. How should I do this? |
Beta Was this translation helpful? Give feedback.
Answered by
sharkymark
May 25, 2023
Replies: 1 comment
-
@whenSunSet this worked for me. This is the template that has a git repo url as the parameter curl --request POST \
--url "$CODER_URL/api/v2/organizations/$ORG_ID/members/me/workspaces" \
--header "Coder-Session-Token: $API_KEY" \
--data '{
"name": "jupyter-lab",
"rich_parameter_values": [
{
"name": "Git Repo URL",
"value": "https://github.com/sharkymark/pandas_automl"
}
],
"template_id": "'$TEMPLATE_ID'"
}' |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
matifali
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@whenSunSet this worked for me.
This is the template that has a git repo url as the parameter