Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Exporting topology with REST API or SDK

Hi, I am trying to export topology using REST API call but I am getting an error:

    "ISSUES": [
            "code": "TOPOLOGY_13",
            "message": "Cannot export topology 'topologyID' due to 'null'"

My code in python:

url = control_hub_url + "/topology/rest/v1/topologies/exportTopologies"

body = "[\"toplogyID\"]"
headers = {
    'content-type': "application/json",
    'x-ss-rest-call': "true",
    'x-ss-user-auth-token': "token from login call",
    'x-requested-by': "SCH",
    'accept-encoding': "application/gzip",
    'accept': "*/*",

response = requests.request("POST", url, data=body, headers=headers)

I tried changing values for accept and accept-encoding but I was still getting the same error. If I try to export from the Streamsets app, it works and I get the zip file. Did anyone manage to export topology using API or SDK?