Commit template to GitHub
Pushes the current saved template to your organization's connected GitHub repository. This lets you version-control your semantic domain definitions alongside your application code.
Important: This endpoint commits what is already saved -- it does
not accept template changes. Save your template first using
PUT /api/v1/domains/{domainId}/template, then commit.
The response includes both the commit result (SHA and URL) and the
template exactly as stored and committed. A domain that hasn't been
saved since the 2.1 release may still be stored, and committed, in
the 2.0 shape; save it once to store it as 2.1. If the stored
template can't be parsed, template is null and templateError
explains the issue.
Your organization must have a GitHub integration configured for this
endpoint to work. See the errorCode field in failure responses for
specific troubleshooting guidance.
Authorization
BearerAuth A project-scoped access token. Generate one via the Token API with your projectId and projectSecret.
In: header
Path Parameters
The unique identifier of the semantic domain.
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
application/json
curl -X post "https://semaphor.cloud/api/v1/domains/domain_abc123/template/commit" \ -H "Content-Type: application/json" \ -d '{ "commitMessage": "Update sales domain template" }'{
"commit": {
"success": true,
"commitSha": "abc123def456",
"commitUrl": "https://github.com/example/repo/commit/abc123def456"
},
"template": {},
"templateError": "string"
}{
"commit": {
"success": false,
"error": "string",
"errorCode": "NOT_CONFIGURED"
},
"template": {},
"templateError": "string"
}{
"error": "string",
"details": {},
"errors": [
{
"code": "row_expression_in_dataset_metric",
"message": "margin works row by row. Add it as a fact (to aggregate) or a dimension (to group by).",
"severity": "error",
"hint": "string",
"context": {}
}
],
"warnings": [
{
"code": "row_expression_in_dataset_metric",
"message": "margin works row by row. Add it as a fact (to aggregate) or a dimension (to group by).",
"severity": "error",
"hint": "string",
"context": {}
}
]
}{
"commit": {
"success": false,
"error": "string",
"errorCode": "NOT_CONFIGURED"
},
"template": {},
"templateError": "string"
}{
"commit": {
"success": false,
"error": "string",
"errorCode": "NOT_CONFIGURED"
},
"template": {},
"templateError": "string"
}{
"commit": {
"success": false,
"error": "string",
"errorCode": "NOT_CONFIGURED"
},
"template": {},
"templateError": "string"
}{
"commit": {
"success": false,
"error": "string",
"errorCode": "NOT_CONFIGURED"
},
"template": {},
"templateError": "string"
}{
"commit": {
"success": false,
"error": "string",
"errorCode": "NOT_CONFIGURED"
},
"template": {},
"templateError": "string"
}