Skip to main content

/topologies/{topologyName}/clone

The /topologies/{topologyName}/clone endpoint allows you to clone a topology. You can use the clone and replace topologies endpoints to update a copy of an existing topology and then replace a topology with the updated version.

To replace an existing topology with a cloned topology, see /topologies/{topologyName}/replace.

Back to Topologies API Endpoint Reference.

POST

Clones a topology.

Request arguments

The POST request takes the following request payload:

Name

Type

Required

Description

name

String

Yes

Name for the cloned topology.

Response

The POST request returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

name

String

Name of the topology.

description

String

Description of the topology.

active

Boolean

Whether the topology is active (true) or inactive (false). Topology clones are set to inactive. To change the active status send a PUT request to the /topologies endpoint.

Example

The following example demonstrates making a POST request to the /topologies/{topologyName}/clone endpoint.

Request example

Example cURL POST request to clone the "host" topology and name the clone "host_new":

curl -X POST 'https://example.com/api/v1/topologies/host/clone' \
--header 'Content-Type: application/json; charset=UTF-8' \
-u phil:password123 \
-d '{"name":"host_new"}'

Response example

Example response returning the cloned topology:

[
    {
        "name": "host_new",
        "description: "Host-based topology",
        "active: false
    }
]