Skip to navigation

Export a gateway configuration

Gateway Manager 1.1.1+

Export a gateway cluster’s configuration using the Gateway Manager UI or the Platform API. Exporting retrieves all services and resources from a running gateway instance and returns them as a configuration document you can store, version, or import into another environment.

Before you begin

  • The target gateway must be connected and active in Gateway Manager.
  • You must have the gateway:read role to export configurations via the Platform API.

Export via the UI

  1. In Gateway Manager, go to the cluster list.
  2. Locate the target cluster and select the three-dots overflow menu () on the cluster row.
  3. Select Export Configuration.
  4. In the dialog, select your preferred output format: JSON or YAML.
  5. Select Export to download the configuration file.

Export via the Platform API

The Platform API exposes export functionality through Gateway Manager. Call the export endpoint from your CI/CD pipeline or automation tooling to retrieve a configuration programmatically.

API-based exports only support JSON. To export in YAML, use the Gateway Manager UI.

Endpoint

GET /v1/gateways/:clusterId/configuration/export

Response

A successful export returns the full configuration for the specified cluster as a DSL document. You can pass this response directly as the content value in a future import request.

{
"decorators": [],
"repositories": [],
"services": []
}

Error handling

The API returns error messages for the following conditions:

ConditionDescription
Gateway not activeThe target gateway isn’t connected. Connect the gateway and retry the request.
Method does not existThe connected Itential Gateway version doesn’t support this operation. Update Itential Gateway to a version compatible with your Gateway Manager version.
Permission errorYour credentials don’t have the gateway:read role. Contact your platform administrator.
Network failureThe gateway couldn’t be reached during the export. Check connectivity and retry.

Exported file format

The export returns all decorators, repositories, and services configured in the gateway cluster. The following example shows the structure of an exported configuration file.

decorators:
- name: ansible-xr
schema:
$id: https://example.com/device.schema.json
$schema: https://json-schema.org/draft/2020-12/schema
properties:
device_type:
description: The type of device
enum:
- ios
- eos
- nxos
type: string
host:
description: The hostname or IP address of the device
type: string
title: Network Device
type: object
repositories:
- name: xr-resources
description: XR Resources for testing
url: git@gitlab.com:<org>/xr/resources.git
reference: main
tags:
- cisco
- xr
private-key-name: xr-gitlab-private
services:
- name: Ansible-Example
type: ansible-playbook
description: An ansible playbook to say hello-world
playbooks:
- hello-world.yml
working-directory: ./
repository: xr-resources
decorator: ansible-xr
tags:
- xr
- cisco
runtime:
check: true
diff: true
skip-tags: example-tag
inventory:
- ./inventory.ini
verbose-level: 6
- name: Hello-World
type: python-script
description: A simple hello-world script
filename: hello-world.py
working-directory: python-scripts
repository: xr-resources
decorator: my-special-decorator