VMware Cloud Community
mlec
Contributor
Contributor
Jump to solution

vRA 8.1 "Sync Images" via Rest API

Does anyone know how to trigger Image synchronization for a vCenter cloud account via REST API?

Reply
0 Kudos
1 Solution

Accepted Solutions
lnairn
VMware Employee
VMware Employee
Jump to solution

Hi mlec​,

As per vRealize Automation Infrastructure as a Service (IaaS) API - VMware API Explorer - VMware {code} , you can use /iaas/api/cloud-accounts/{id}/private-image-enumeration (POST)

Just keep in mind that running Image Sync can generate load in the system

Regards,

Leandro.

View solution in original post

Reply
0 Kudos
5 Replies
lnairn
VMware Employee
VMware Employee
Jump to solution

Hi mlec​,

As per vRealize Automation Infrastructure as a Service (IaaS) API - VMware API Explorer - VMware {code} , you can use /iaas/api/cloud-accounts/{id}/private-image-enumeration (POST)

Just keep in mind that running Image Sync can generate load in the system

Regards,

Leandro.

Reply
0 Kudos
mlec
Contributor
Contributor
Jump to solution

I missed that one... it worked perfectly thank you.

I appreciate the warning about load on the system. I plan to use this during a pipeline that rebuilds our images early morning so, we shouldn't have an issue with the load during that time.

Thanks again for the assist.

Reply
0 Kudos
wolficool
Contributor
Contributor
Jump to solution

Hi gives there a chance to see the Status when the Sync Job is finished??

I see in the API over Postman that the status and ID also the Name will be ouput

See her for example:

 

 

{
    "progress": 0,
    "status": "INPROGRESS",
    "name": "Private image enumeration",
    "id": "12340815-c3fb-4986-822c-12340815dsjiojjsd",
    "selfLink": "/iaas/api/request-tracker/adfiojh-c3fb-4986-dfs90-90f9ufsdu90dfas"
}

 

Reply
0 Kudos
ronaldod
Enthusiast
Enthusiast
Jump to solution

Hi,

I think the answer is already in your post. Tried the selflink ?

 

Reply
0 Kudos
wolficool
Contributor
Contributor
Jump to solution

Hi ronaldod,

i missed that link.. your'e right there is the id were i can check the status of the Request.

Reply
0 Kudos