website: Fix incorrect URLs in some API examples

This commit is contained in:
Phoenix09 2018-01-09 18:38:59 +00:00 committed by GitHub
parent 885d66e9c3
commit 48bf280d47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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