VMware Cloud Community
rlmitchell
Contributor
Contributor

Getting vapp template id from blocking task via rest api ?

Greetings,  I have a blocking task (on vapp create) dumped out below.  Is there a was to find what the vapp template/catalog id is that the vapp is being created from via REST?   Hoping I haven't over-looked it Smiley Happy

Thanks!

$VAR1 = {
          'vcloud:User' => {
                           'href' => 'https://10.9.184.20/api/admin/user/0e41e9c8-3561-44ac-b3e5-ac4b20643525',
                           'name' => 'bacon',
                           'type' => 'application/vnd.vmware.admin.user+xml'
                         },
          'timeoutAction' => 'abort',
          'xmlns:vmext' => 'http://www.vmware.com/vcloud/extension/v1.5',
          'vcloud:Organization' => {
                                   'href' => 'https://10.9.184.20/api/admin/org/d0bc3ec7-fadd-4c5b-a4ab-81a9d059a5d8',
                                   'name' => 'itdev2',
                                   'type' => 'application/vnd.vmware.admin.organization+xml'
                                 },
          'status' => 'active',
          'vcloud:Link' => [
                           {
                             'rel' => 'resume',
                             'href' => 'https://10.9.184.20/api/admin/extension/blockingTask/846dd73e-6ebb-4ad4-a89a-0c32aa2da45b/action/res...',
                             'type' => 'application/vnd.vmware.admin.blockingTaskOperationParams+xml'
                           },
                           {
                             'rel' => 'abort',
                             'href' => 'https://10.9.184.20/api/admin/extension/blockingTask/846dd73e-6ebb-4ad4-a89a-0c32aa2da45b/action/abo...',
                             'type' => 'application/vnd.vmware.admin.blockingTaskOperationParams+xml'
                           },
                           {
                             'rel' => 'fail',
                             'href' => 'https://10.9.184.20/api/admin/extension/blockingTask/846dd73e-6ebb-4ad4-a89a-0c32aa2da45b/action/fai...',
                             'type' => 'application/vnd.vmware.admin.blockingTaskOperationParams+xml'
                           },
                           {
                             'rel' => 'updateProgress',
                             'href' => 'https://10.9.184.20/api/admin/extension/blockingTask/846dd73e-6ebb-4ad4-a89a-0c32aa2da45b/action/upd...',
                             'type' => 'application/vnd.vmware.admin.blockingTaskUpdateProgressOperationParams+xml'
                           },
                           {
                             'rel' => 'up',
                             'href' => 'https://10.9.184.20/api/task/42ad06c6-04b1-463b-a196-892b93c5f276',
                             'type' => 'application/vnd.vmware.vcloud.task+xml'
                           }
                         ],
          'name' => 'vdcInstantiateVapp',
          'createdTime' => '2011-12-13T10:46:53.419-06:00',
          'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
          'xmlns:vcloud' => 'http://www.vmware.com/vcloud/v1.5',
          'type' => 'application/vnd.vmware.admin.blockingTask+xml',
          'id' => 'urn:vcloud:blockingTask:846dd73e-6ebb-4ad4-a89a-0c32aa2da45b',
          'vcloud:TaskOwner' => {
                                'href' => 'https://10.9.184.20/api/vApp/vapp-f70f8f16-1418-48ef-87dc-d0bc6fd33413',
                                'name' => '',
                                'type' => 'application/vnd.vmware.vcloud.vApp+xml'
                              },
          'timeoutDate' => '2011-12-15T10:46:53.419-06:00'
        };
$VAR1 = {
          'Tasks' => {
                     'Task' => {
                               'status' => 'preRunning',
                               'User' => {
                                         'href' => 'https://10.9.184.20/api/admin/user/0e41e9c8-3561-44ac-b3e5-ac4b20643525',
                                         'name' => 'bacon',
                                         'type' => 'application/vnd.vmware.admin.user+xml'
                                       },
                               'name' => 'task',
                               'expiryTime' => '2012-03-12T10:46:48.958-05:00',
                               'Owner' => {
                                          'href' => 'https://10.9.184.20/api/vApp/vapp-f70f8f16-1418-48ef-87dc-d0bc6fd33413',
                                          'name' => 'vApp_bacon_73',
                                          'type' => 'application/vnd.vmware.vcloud.vApp+xml'
                                        },
                               'operationName' => 'vdcInstantiateVapp',
                               'href' => 'https://10.9.184.20/api/task/42ad06c6-04b1-463b-a196-892b93c5f276',
                               'Progress' => '1',
                               'operation' => 'Creating Virtual Application vApp_bacon_73(f70f8f16-1418-48ef-87dc-d0bc6fd33413)',
                               'type' => 'application/vnd.vmware.vcloud.task+xml',
                               'id' => 'urn:vcloud:task:42ad06c6-04b1-463b-a196-892b93c5f276',
                               'startTime' => '2011-12-13T10:46:48.958-06:00',
                               'Organization' => {
                                                 'href' => 'https://10.9.184.20/api/org/d0bc3ec7-fadd-4c5b-a4ab-81a9d059a5d8',
                                                 'name' => 'itdev2',
                                                 'type' => 'application/vnd.vmware.vcloud.org+xml'
                                               },
                               'Link' => {
                                         'rel' => 'down',
                                         'href' => 'https://10.9.184.20/api/admin/extension/blockingTask/846dd73e-6ebb-4ad4-a89a-0c32aa2da45b',
                                         'type' => 'application/vnd.vmware.admin.blockingTask+xml'
                                       }
                             }
                   },
          'xmlns' => 'http://www.vmware.com/vcloud/v1.5',
          'status' => '0',
          'name' => 'vApp_bacon_73',
          'Owner' => {
                     'User' => {
                               'href' => 'https://10.9.184.20/api/admin/user/0e41e9c8-3561-44ac-b3e5-ac4b20643525',
                               'name' => 'bacon',
                               'type' => 'application/vnd.vmware.admin.user+xml'
                             },
                     'type' => 'application/vnd.vmware.vcloud.owner+xml'
                   },
          'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
          'type' => 'application/vnd.vmware.vcloud.vApp+xml',
          'id' => 'urn:vcloud:vapp:f70f8f16-1418-48ef-87dc-d0bc6fd33413',
          'InMaintenanceMode' => 'false',
          'Description' => {},
          'deployed' => 'false',
          'Link' => [
                    {
                      'rel' => 'down',
                      'href' => 'https://10.9.184.20/api/network/4e80160d-8660-4da4-9d0e-a5e0058ab19c',
                      'name' => 'itdev2 Ext Org Net',
                      'type' => 'application/vnd.vmware.vcloud.vAppNetwork+xml'
                    },
                    {
                      'rel' => 'down',
                      'type' => 'application/vnd.vmware.vcloud.controlAccess+xml'
                    },
                    {
                      'rel' => 'enterMaintenanceMode',
                    },
                    {
                      'rel' => 'up',
                      'href' => 'https://10.9.184.20/api/vdc/141d2404-2a7d-4ed8-8ddc-cf60d4d7f9ed',
                      'type' => 'application/vnd.vmware.vcloud.vdc+xml'
                    },
                    {
                      'rel' => 'down',
                      'href' => 'https://10.9.184.20/api/vApp/vapp-f70f8f16-1418-48ef-87dc-d0bc6fd33413/owner',
                      'type' => 'application/vnd.vmware.vcloud.owner+xml'
                    },
                    {
                      'rel' => 'down',
                      'href' => 'https://10.9.184.20/api/vApp/vapp-f70f8f16-1418-48ef-87dc-d0bc6fd33413/metadata',
                      'type' => 'application/vnd.vmware.vcloud.metadata+xml'
                    }
                  ]
        };
Reply
0 Kudos
2 Replies
Todor_Todorov
Hot Shot
Hot Shot

Hi,

Unfortunately this is not possible in the current implementation of the API.

Regards,

Todor

Reply
0 Kudos
daniyalahmad
Contributor
Contributor

Bumping an old thread, is there any update on this issue?

I need to find a template ID on "vdcInstantiateVapp" blocking task.

Please help

Reply
0 Kudos