How to promote a content view with API?

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • How to promote a content view with API?

Resolution

  • Need to run below command to promote content view and replace the satellite.example.com with Satellite server's FQDN, 3 with Life Cycle Environment ID and 2 with Content View ID.

      # curl --header "Content-Type:application/json" --insecure --request POST --user admin:redhat -d "{\"environment_ids\":\"3\"}" -k https://satellite.example.com/katello/api/v2/content_view_versions/2/promote
    
        {"id":"096e10e6-b94d-4324-85c2-c72a073be28a","label":"Actions::Katello::ContentView::Promote","pending":true,"action":"Promote content view 'provisioning'; organization 'PB10'","username":"admin","started_at":"2021-31-12 10:46:42 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"content_view":{"id":2,"name":"provisioning","label":"provisioning"},"organization":{"id":1,"name":"PB10","label":"PB10"},"environments":["Testing"],"services_checked":["pulp","pulp_auth","candlepin","candlepin_auth"],"current_request_id":null,"current_timezone":"UTC","current_user_id":4,"current_organization_id":null,"current_location_id":null},"output":{},"humanized":{"action":"Promote","input":[["content_view",{"text":"content view 'provisioning'","link":"/content_views/2/versions"}],["organization",{"text":"organization 'PB10'","link":"/organizations/1/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2021-31-13 10:46:42 UTC","available_actions":{"cancellable":false,"resumable":false}}
    

For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues

For more KB articles/solutions related to Red Hat Satellite 6.x API Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x API Issues

SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.