Vagrant Cloud API Example
curl \
--header " X-Atlas-Token: $VAGRANT_CLOUD_TOKEN " \
--header " Content-Type: application/json" \
https://app.vagrantup.com/api/v1/boxes \
--data ' {"username":"justin_hashicorp", "name":"test"}'
{
"created_at" : " 2017-10-16T19:29:09.415Z" ,
"updated_at" : " 2017-10-16T19:29:09.415Z" ,
"tag" : " justin_hashicorp/test" ,
"name" : " test" ,
"short_description" : null ,
"description_html" : null ,
"username" : " justin_hashicorp" ,
"description_markdown" : null ,
"private" : true ,
"current_version" : null ,
"versions" : []
}
curl \
--header "X-Atlas-Token: $VAGRANT_CLOUD_TOKEN" \
--header "Content-Type: application/json" \
https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/versions \
--data '{"version":{"version":"0.1.0", "description":"Testing"}}'
{
"version" : " 0.1.0" ,
"status" : " unreleased" ,
"description_html" : " <p>Testing</p>\n " ,
"description_markdown" : " Testing" ,
"created_at" : " 2017-10-16T19:29:09.415Z" ,
"updated_at" : " 2017-10-16T19:29:09.415Z" ,
"number" : " 0.1.0" ,
"release_url" : " https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/version/0.1.0/release" ,
"revoke_url" : " https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/version/0.1.0/revoke" ,
"providers" : []
}
curl \
--header "X-Atlas-Token: $VAGRANT_CLOUD_TOKEN" \
--header "Content-Type: application/json" \
https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/version/0.1.0/providers \
--data '{"provider":{"name":"virtualbox"}}'
{
"name" : " virtualbox" ,
"hosted" : true ,
"hosted_token" : null ,
"original_url" : null ,
"created_at" : " 2017-10-16T19:31:03.277Z" ,
"updated_at" : " 2017-10-16T19:31:03.277Z" ,
"download_url" : " https://vagrantcloud.com/justin_hashicorp/boxes/test/versions/0.1.0/providers/virtualbox.box"
}
curl \
--header "X-Atlas-Token: $VAGRANT_CLOUD_TOKEN" \
-X PUT \
https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/version/0.1.0/release
{
"version" : " 0.1.0" ,
"status" : " active" ,
"description_html" : " <p>Testing</p>\n " ,
"description_markdown" : " Testing" ,
"created_at" : " 2017-10-16T19:29:09.415Z" ,
"updated_at" : " 2017-10-16T19:31:52.351Z" ,
"number" : " 0.1.0" ,
"release_url" : " https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/version/0.1.0/release" ,
"revoke_url" : " https://app.vagrantup.com/api/v1/box/justin_hashicorp/test/version/0.1.0/revoke" ,
"providers" : [
{
"name" : " virtualbox" ,
"hosted" : true ,
"hosted_token" : null ,
"original_url" : null ,
"created_at" : " 2017-10-16T19:31:03.277Z" ,
"updated_at" : " 2017-10-16T19:31:03.277Z" ,
"download_url" : " https://vagrantcloud.com/justin_hashicorp/boxes/test/versions/0.1.0/providers/virtualbox.box"
}
]
}