VMware Horizon Community
pieterheijms
Enthusiast
Enthusiast

Command line or API to create Application / Package

Hi,

Is there a way to create a Application and Package by command line or API?

We use a name convention and want's to automate the creating of an Application and a (empty) Package.

Greetz,

Pieter

Tags (2)
0 Kudos
2 Replies
chrisdhalstead
VMware Employee
VMware Employee

Here are the API calls - **note this is NOT supported by VMware**:

hope this helps

Create Application (update bolded items):

data[name]: Test

data[description]:Test

data[owner_guid]: GUID of Owner

Verb: Post

URL: https://AV_Manager/app_volumes/app_products

Form Data (URL Encoded):  data%5Bname%5D=Test&data%5Bdescription%5D=test&data%5Bowner_guid%5D=492871C4-508E-4804-BB51-941454702680

Response: {"data":{"id":20,"name":"Test","guid":"0700f1dd-5e87-4c79-83bd-a8bd7bb0537d","icon":null,"assignment_count":0,"description":"test","app_packages":[],"owner":{"id":11,"object_guid":"492871C4-508E-4804-BB51-941454702680","upn":"VMWEUC\\chalstead","upn_link":"\u003ca title=\"Chris Halstead\" href=\"/directory#/Users/11\"\u003eVMWEUC\\chalstead\u003c/a\u003e","name":"Chris Halstead","name_html":"Chris Halstead","enabled":true,"logins":10,"last_login":"2019-04-16T19:34:39Z","last_login_human":"Apr 16 2019 03:34PM","status":"Enabled"},"owner_guid":"492871C4-508E-4804-BB51-941454702680","status":"active","delete_status":null,"deleted_at":"","deleted_at_human":"","created_at":"2020-09-30 16:06:16 -0400","created_at_human":"Sep 30 2020","updated_at":"2020-09-30 16:06:16 -0400","updated_at_human":"Sep 30 2020"}}

Create Package (updated bolded items):

data[name]: Test Package

data[app_product_id]: 20 <--ID of the Associated application above

data[description]: This is a test package

data[lifecycle_stage_id]: 5

data[datacenter]: S1-DC

data[datastore]: datastore-985|S1-DC|1

data[path]: appvolumes/packages

data[background]: true

data[template_path]: appvolumes/packages_templates

data[template_name]: template.vmdk

Verb: Post

URL: https://AV_Manager/app_volumes/app_packages

Form Data (URL Encoded): data%5Bname%5D=Test+Package&data%5Bapp_product_id%5D=20&data%5Bdescription%5D=This+is+a+test+package&data%5Blifecycle_stage_id%5D=5&data%5Bdatacenter%5D=S1-DC&data%5Bdatastore%5D=datastore-985%7CS1-DC%7C1&data%5Bpath%5D=appvolumes%2Fpackages&data%5Bbackground%5D=true&data%5Btemplate_path%5D=appvolumes%2Fpackages_templates&data%5Btemplate_name%5D=template.vmdk

Response:  {"data":{"id":31,"name":"Test Package","guid":"be0c0064-6bb1-435f-b9b9-731d2e454aa6","app_product_id":20,"lifecycle_stage_id":5,"state":"Package","version":null,"description":"This is a test package","note":"This is a test package","status":"creating","programs_count":0,"icon":null,"operating_systems_count":0,"delete_status":null,"deleted_at":null,"deleted_at_human":null,"created_at":"2020-09-30 16:11:10 -0400","created_at_human":"Sep 30 2020","updated_at":"2020-09-30 16:11:10 -0400","updated_at_human":"Sep 30 2020","added_at":"2020-09-30 16:11:10 -0400","added_at_human":"Sep 30 2020","attachment_count":0,"path":"appvolumes/packages","filename":"Test!20!Package.vmdk","enabled":false,"writable":true,"datastore_name":"S1-AppVolumes1","files_count":1,"total_use_count":0,"provision_uuid":null,"provisioning":true,"provision_completed_at":null,"provision_started_at":null,"size_mb":null,"size_human":null,"assignment_count":0,"volume_guid":null,"snapvol_version_id":null,"mount_prefix":null,"mounted_at":null,"template_file_name":"[S1-AppVolumes1] appvolumes/packages_templates/template.vmdk","template_version":null,"missing":false,"protected":false,"agent_version":null,"capture_version":null,"free_mb":0,"total_mb":20480,"attachment_limit":null,"reachable":true,"type":"PackageVol","primordial_os_id":null,"primordial_os_name":null}}

Chris Halstead
Senior Staff Architect, EUC Technical Marketing
chalstead@vmware.com
Twitter: @chrisdhalstead
jyothi1
Contributor
Contributor

Hi Chris,

Is there any command or API for assign/unassign users group to Application, please share me.

Regards,

Jyothi

 

0 Kudos