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 \
|
||||
--header "Content-Type: application/json" \
|
||||
--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 \
|
||||
--data '
|
||||
{
|
||||
|
@ -1266,7 +1266,7 @@ Response body is identical to [Reading a provider](#read-a-provider).
|
|||
"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: {
|
||||
name: "virtualbox",
|
||||
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
|
||||
response=$(curl \
|
||||
--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
|
||||
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']}"
|
||||
)
|
||||
|
||||
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?
|
||||
# Success, you can now upload the box image to the returned URL
|
||||
|
|
Loading…
Reference in New Issue