website: Fix incorrect URLs in some API examples
This commit is contained in:
parent
885d66e9c3
commit
48bf280d47
|
@ -1245,7 +1245,7 @@ Response body is identical to [Reading a provider](#read-a-provider).
|
||||||
curl \
|
curl \
|
||||||
--header "Content-Type: application/json" \
|
--header "Content-Type: application/json" \
|
||||||
--header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
|
--header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
|
||||||
https://app.vagrantup.com/api/v1/box/myuser/test/version/1.2.3/virtualbox \
|
https://app.vagrantup.com/api/v1/box/myuser/test/version/1.2.3/provider/virtualbox \
|
||||||
--request PUT \
|
--request PUT \
|
||||||
--data '
|
--data '
|
||||||
{
|
{
|
||||||
|
@ -1266,7 +1266,7 @@ Response body is identical to [Reading a provider](#read-a-provider).
|
||||||
"Authorization" => "Bearer #{ENV['VAGRANT_CLOUD_TOKEN']}"
|
"Authorization" => "Bearer #{ENV['VAGRANT_CLOUD_TOKEN']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
response = api.put("/api/v1/box/myuser/test/version/1.2.3/virtualbox", json: {
|
response = api.put("/api/v1/box/myuser/test/version/1.2.3/provider/virtualbox", json: {
|
||||||
provider: {
|
provider: {
|
||||||
name: "virtualbox",
|
name: "virtualbox",
|
||||||
url: "https://example.com/virtualbox-1.2.3.box"
|
url: "https://example.com/virtualbox-1.2.3.box"
|
||||||
|
@ -1351,7 +1351,7 @@ Prepares the provider for upload, and returns a JSON blob containing an `upload_
|
||||||
```shell
|
```shell
|
||||||
response=$(curl \
|
response=$(curl \
|
||||||
--header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
|
--header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \
|
||||||
https://app.vagrantup.com/api/v1/box/myuser/test/version/1.2.3/virtualbox/upload)
|
https://app.vagrantup.com/api/v1/box/myuser/test/version/1.2.3/provider/virtualbox/upload)
|
||||||
|
|
||||||
# Requires the jq command
|
# Requires the jq command
|
||||||
upload_path=$(echo "$response" | jq .upload_path)
|
upload_path=$(echo "$response" | jq .upload_path)
|
||||||
|
@ -1370,7 +1370,7 @@ Prepares the provider for upload, and returns a JSON blob containing an `upload_
|
||||||
"Authorization" => "Bearer #{ENV['VAGRANT_CLOUD_TOKEN']}"
|
"Authorization" => "Bearer #{ENV['VAGRANT_CLOUD_TOKEN']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
response = api.get("/api/v1/box/myuser/test/version/1.2.3/virtualbox/upload")
|
response = api.get("/api/v1/box/myuser/test/version/1.2.3/provider/virtualbox/upload")
|
||||||
|
|
||||||
if response.status.success?
|
if response.status.success?
|
||||||
# Success, you can now upload the box image to the returned URL
|
# Success, you can now upload the box image to the returned URL
|
||||||
|
|
Loading…
Reference in New Issue