Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unfortunately this is not supported with SDK for Python yet. But, it should work with rest api. I just verified with valid topology id and got the zip content back. Since, you are already using python to make the rest api call, I would suggest converting the body to json string using json module instead

response = requests.post(contro_hub_url + '/topology/rest/v1/topologies/exportTopologies',
                                      data=json.dumps(['9f010cf6-099e-40f9-a4e3-9a2fbe9142ad:admin']),
                                      headers=headers)

Unfortunately this is not supported with SDK for Python yet. But, it should work with rest api. I just verified with valid topology commit id and got the zip content back. Since, you are already using python to make the rest api call, I would suggest converting the body to json string using json module instead

response = requests.post(contro_hub_url + '/topology/rest/v1/topologies/exportTopologies',
                                      data=json.dumps(['9f010cf6-099e-40f9-a4e3-9a2fbe9142ad:admin']),
                                      headers=headers)