Skip to main content

Export StackSpot Connection Interfaces

In this page, you will find the steps to export the Connection Interfaces from your StackSpot account.

The StackSpot Connection Interface Exporter Action lets you export all Connection Interfaces configured in your StackSpot account. With this Action, you can back up your interfaces, review configurations across Workspaces, or migrate your connections. Use it to maintain a secure and organized record of all your Connection Interfaces.

Prerequisites

Before you begin, make sure you have:

  1. An active StackSpot account;

  2. Account Holder or Account Admin permission to access all Connection Interfaces in your account;

  3. STK CLI installed;

  4. Authenticate in the STK CLI, run the command below:

    stk login
    stk exit workspace

How to use

Execution

  1. In your project directory, run:

    stk run action stackspot-core/stackspot-connection-interface-exporter
  2. The Action will automatically start the export process.

  3. You can monitor the progress on your screen, with real-time updates about each Workspace being processed:

    2026-04-24 11:03:37,636 - INFO - ## 69 of 1042. Processing workspace 01HQM9FAM9842VJ4BTF5P58ARE
    2026-04-24 11:03:38,721 - INFO - ## 1 of 7. Processing Connection Interfaces bucket-hello-word
    2026-04-24 11:03:40,145 - INFO - ## 2 of 7. Processing Connection Interfaces eks-operation
    ...
  4. Files will be saved in the output/ directory within the folder where you ran the command.

Idempotency

The Action uses a safety mechanism to avoid reprocessing the same data. The action always fetches all workspaces from your account and begins processing the Connection Interfaces for each one. Whenever it finishes processing a workspace, it saves a file with a standard name in the output/ folder in the directory where you ran the command.

How it works:

  • The first time you run the Action, it exports all Connection Interfaces from every Workspace.
  • If an error occurs during execution, you can run the Action again. It will automatically skip all workspaces that already have saved files in /output, saving time and resources.
  • Only new Workspaces, or those without a saved file, will be processed.
  • To reprocess everything from scratch: Delete the /output folder before running again. This will remove all saved files and force a complete reprocessing of all workspaces.

Structure of exported files

Exported files are organized in the output/ directory with one JSON file per workspace. The output/ directory will be created automatically in the directory where you ran the stk run action command.

File naming

Each file follows the pattern:

workspace_{workspaceId}_{sanitizedName}.json

Example:

output/
├── workspace_01J8JJ98MD68VSP5HF2WXN53H0_idp.json
├── workspace_01HQM9FAM9842VJ4BTF5P58ARE_cli-eng.json
├── workspace_01HJ16VY5V95XEQ4KD4DC90DVW_Front.json
└── workspace_01J4MC0FC1VF3SGAEE23FKQPC6_chiaretto-workspace.json

JSON file schema

Each JSON file contains the complete structure of the Workspace and its Connection Interfaces:

{
"id": "unique-workspace-id",
"name": "workspace-name",
"connectionInterfaces": [
{
"connectionInterfaceId": "connection-interface-identifier",
"slug": "connection-interface-slug",
"automaticallyGenerated": false,
"sharedInfraId": "optional-shared-infrastructure-id",
"applicationId": null,
"targets": [
{
"targetId": "target-resource-id",
"targetType": "APP|SHARED_INFRA",
"environment": {
"id": "environment-id",
"name": "environment-name",
"description": "environment-description",
"isProductive": false
},
"name": "resource-name",
"workspaceId": "resource-workspace-id"
}
],
"attributesByEnv": [
{
"environment": {
"id": "environment-id",
"name": "environment-name",
"description": "environment-description",
"isProductive": false
},
"attributes": [
{
"key": "attribute-name",
"value": "attribute-value",
"sensitive": "False|True"
}
]
}
],
"type": {
"typeId": "connection-type-id",
"slug": "connection-type-slug",
"output": [
{
"name": "output-name",
"type": "STRING|NUMBER|OBJECT",
"sensitive": false
}
]
}
}
]
}

Field details

Workspace

  • id: Unique identifier of the workspace in StackSpot.
  • name: Name of the workspace.

Connection Interface

  • connectionInterfaceId: Unique identifier of the Connection Interface.
  • slug: Friendly textual identifier of the Connection Interface.
  • automaticallyGenerated: Indicates if the interface was automatically generated (true) or manually configured (false).
  • sharedInfraId: ID of the associated shared infrastructure (if applicable).
  • applicationId: ID of the associated application (if applicable).

Targets (Usage)

  • targetId: Identifier of the resource using the Connection Interface.
  • targetType: Type of resource (APP for applications, SHARED_INFRA for shared infrastructure).
  • environment: Object containing environment information:
    • id: Identifier of the environment.
    • name: Name of the environment.
    • description: Description of the environment.
    • isProductive: Boolean indicating if it's a productive environment.
  • name: Name of the target resource.
  • workspaceId: Workspace of the target resource.

Attributes By Environment

  • environment: Object containing environment information:
    • id: Identifier of the environment.
    • name: Name of the environment.
    • description: Description of the environment.
    • isProductive: Boolean indicating if it's a productive environment.
  • attributes: List of configuration attributes, each with:
    • key: Attribute name (e.g., "bucket_name", "region", "api_key").
    • value: Attribute value.
    • sensitive: Indicates if the value is sensitive (credentials, tokens, etc.).

Type (Connection Type)

  • typeId: Unique identifier of the connection type.
  • slug: Slug of the type (e.g., "aws-s3-conn", "aws-eks-conn", "aws-rds-conn").
  • output: Defines the attributes that this Connection Interface exports:
    • name: Name of the exported attribute.
    • type: Data type (STRING, NUMBER, OBJECT, etc.).
    • sensitive: Whether it's a sensitive value.

Complete example

Here is a real example of an exported file with Connection Interfaces in use:

{
"id": "01J8JJ98MD68VSP5HF2WXN53H0",
"name": "idp",
"connectionInterfaces": [
{
"connectionInterfaceId": "bucket-hello-word",
"slug": "bucket-hello-word",
"automaticallyGenerated": true,
"sharedInfraId": "01JA600D0EJ3ZMZEAPJR747VZG",
"applicationId": null,
"targets": [
{
"targetId": "01J8N92SDSRFNF7Q790003CVMX",
"targetType": "SHARED_INFRA",
"environment": {
"id": "01HE68EQV55FDN5095AHAS84BN",
"name": "dev",
"description": "Development environment",
"isProductive": false
},
"name": null,
"workspaceId": null
}
],
"attributesByEnv": [
{
"environment": {
"id": "01HNDPMW1876RHW0XJGS3A8MCN",
"name": "prod",
"description": "Production environment",
"isProductive": true
},
"attributes": [
{
"key": "arn",
"value": "arn:aws:s3:::300543077521-hello-world-v1",
"sensitive": "False"
},
{
"key": "bucket_name",
"value": "300543077521-hello-world-v1",
"sensitive": "False"
}
]
}
],
"type": {
"typeId": "01GSAJ7M83WD35TNHTTMQJD8P7",
"slug": "aws-s3-conn",
"output": [
{
"name": "arn",
"type": "STRING",
"sensitive": false
},
{
"name": "bucket_name",
"type": "STRING",
"sensitive": false
}
]
}
},
{
"connectionInterfaceId": "eks-operation",
"slug": "eks-operation",
"automaticallyGenerated": false,
"sharedInfraId": null,
"applicationId": null,
"targets": [],
"attributesByEnv": [
{
"environmentId": "01HNDPMW1876RHW0XJGS3A8MCN",
"attributes": [
{
"key": "cluster_name",
"value": "stackspot",
"sensitive": "False"
},
{
"key": "region",
"value": "sa-east-1",
"sensitive": "False"
}
]
}
],
"type": {
"typeId": "01GSAJ7M83WD35TNHTTMQJD8P2",
"slug": "aws-eks-conn",
"output": [
{
"name": "cluster_name",
"type": "STRING",
"sensitive": false
},
{
"name": "region",
"type": "STRING",
"sensitive": false
}
]
}
}
]
}
Debug tip

If an error occurs and you want more details, run the command below with the --debug or --trace flag:

stk run action stackspot-core/stackspot-connection-interface-exporter --debug

This generates a log file in the root of the command. Send it to StackSpot support for analysis.

You can also check the general log:

cat $HOME/.stk/logs/logs.log