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:
- Call migration analysis to discover required resources
- Call this endpoint with mappings for each resource
Mapping rules:
connectionMapping— required for every connection. Connections cannot be auto-created.domainMapping/datamodelMapping/visualMapping— set the value to an existing target resource ID to reuse it, ornullto create a copy.visualMappingsupports"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. A newly created target copies the source
dashboard's canonical tags and remains non-public. A replacement keeps
the existing target dashboard's tags; this operation accepts no tag
override.
Provide commitMessage to commit the resulting target dashboard. The
target project's commit-on-save setting determines whether that message
is optional or required.
Authorization
BearerAuth 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
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
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": "dashboard_target",
"title": "Operations Dashboard",
"projectId": "project_target",
"secret": "dashboard_secret",
"tags": [
"audience:operations",
"product:inbound-ticketing"
]
},
"createdResources": {
"domains": [
{
"sourceId": "string",
"newId": "string",
"name": "string"
}
],
"datamodels": [
{
"sourceId": "string",
"newId": "string",
"name": "string"
}
],
"visuals": [
{
"sourceId": "string",
"newId": "string",
"name": "string"
}
]
},
"replaced": true,
"versionControl": {
"status": "committed",
"commitSha": "string",
"commitUrl": "http://example.com"
}
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"error": "string",
"code": "string",
"errorCode": "string",
"details": {},
"success": true
}{
"success": false,
"error": "string",
"errorCode": "COMMIT_FAILED",
"dashboardSaved": true,
"migration": {
"success": true,
"dashboard": {
"id": "dashboard_target",
"title": "Operations Dashboard",
"projectId": "project_target",
"secret": "dashboard_secret",
"tags": [
"audience:operations",
"product:inbound-ticketing"
]
},
"createdResources": {
"domains": [
{
"sourceId": "string",
"newId": "string",
"name": "string"
}
],
"datamodels": [
{
"sourceId": "string",
"newId": "string",
"name": "string"
}
],
"visuals": [
{
"sourceId": "string",
"newId": "string",
"name": "string"
}
]
},
"replaced": true,
"versionControl": {
"status": "committed",
"commitSha": "string",
"commitUrl": "http://example.com"
}
},
"versionControl": {
"status": "committed",
"commitSha": "string",
"commitUrl": "http://example.com"
}
}