Semaphor

Migrate a dashboard to another project

Copies a dashboard to a different project, remapping all resource references (connections, semantic domains, data models, and linked visuals) to their target-project equivalents.

Two-step workflow:

  1. Call migration analysis to discover required resources
  2. Call this endpoint with mappings for each resource

Mapping rules:

  • connectionMappingrequired for every connection. Connections cannot be auto-created.
  • domainMapping / datamodelMapping / visualMapping — set the value to an existing target resource ID to reuse it, or null to create a copy.
  • visualMapping supports "unlink" to remove the visual reference instead of copying it.

Set replaceExistingId to overwrite an existing dashboard in the target project instead of creating a new one.

POST
/api/management/v1/dashboards/{dashboardId}/migrate

Authorization

BearerAuth
AuthorizationBearer <token>

A project-scoped or dashboard-scoped access token. Generate one via the Token API using your project ID and project secret.

In: header

Path Parameters

dashboardId*string

Dashboard identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X post "https://semaphor.cloud/api/management/v1/dashboards/string/migrate" \  -H "Content-Type: application/json" \  -d '{    "targetProjectId": "string",    "connectionMapping": {      "property1": "string",      "property2": "string"    },    "domainMapping": {      "property1": "string",      "property2": "string"    },    "domainsToCreate": [      "string"    ],    "datamodelMapping": {      "property1": "string",      "property2": "string"    },    "datamodelsToCreate": [      "string"    ],    "visualMapping": {      "property1": "string",      "property2": "string"    },    "visualsToCreate": [      "string"    ]  }'
{
  "success": true,
  "dashboard": {
    "id": "string",
    "title": "string",
    "projectId": "string",
    "secret": "string"
  },
  "createdResources": {
    "domains": [
      {
        "sourceId": "string",
        "newId": "string",
        "name": "string"
      }
    ],
    "datamodels": [
      {
        "sourceId": "string",
        "newId": "string",
        "name": "string"
      }
    ],
    "visuals": [
      {
        "sourceId": "string",
        "newId": "string",
        "name": "string"
      }
    ]
  },
  "replaced": true
}
{
  "error": "string",
  "code": "string",
  "details": {},
  "success": true
}
{
  "error": "string",
  "code": "string",
  "details": {},
  "success": true
}
{
  "error": "string",
  "code": "string",
  "details": {},
  "success": true
}
{
  "error": "string",
  "code": "string",
  "details": {},
  "success": true
}