How to download VCF Bundles using API
search cancel

How to download VCF Bundles using API

book

Article ID: 372387

calendar_today

Updated On:

Products

VMware SDDC Manager VMware Cloud Foundation 5.x VMware Cloud Foundation

Issue/Introduction

If bundles are not available to download through the SDDC Manager UI, you may need to download the bundles through the SDDC Manager API.

Environment

VMware Cloud Foundation 5.x

Resolution

  1. Create Token - Use Option (a) or Option (b)

    1. Using SDDC Manager API
      1. Open SDDC Manager UI > Developer Center > API Explorer.
      2. Browse to Tokens > POST /v1/tokens > Parameter
      3. Click on TokenCreationSpec on the right side to generate the spec
      4. Enter in the administrator username/password and press execute (you can leave the "apiKey" and "id Token" empty). 

    2. Using CLI
      1. SSH to SDDC Manager using vcf and su to root

      2. Run the below command to generate the Token
        curl -X POST -H "Content-Type: application/json" -d '{"username": "<sso_username>","password": "<sso_password>"}' https://<sddc_manager_IP>/v1/tokens | json_pp

         

  2. Get the Bundle ID from the KB VMware Cloud Foundation - Upgrade Bundle Details

  3. Download the bundle
    curl -k 'https://<sddc_manager_IP>/v1/bundles/<bundle id gathered from Step # 2>' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer <TOKEN receievd from Step # 1>' \
    -d '{
    "bundleDownloadSpec" : {
    "downloadNow" : true
    }
    }'

     

  4. The bundle should now be downloading and visible in the SDDC Manager UI