Merge pull request #9352 from Phoenix09/Phoenix09-patch-1

website: Fix incorrect URLs in some API examples
This commit is contained in:
Justin Campbell 2018-01-11 17:41:27 -05:00 committed by GitHub
commit b5e248d14a
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