Diff a template project workspace
Returns exact added, modified, and deleted project files against the current Git base commit.
POST
Returns exact added, modified, and deleted project files against the current Git base commit.
apiKeyheader
x-api-key<token>id*stringMatch
^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
expectedRevision*stringSuccess
application/json- response
projectId*TemplateProjectIdMatch
^tproj_[0-9a-hjkmnp-tv-z]{16,24}$baseCommit*stringMatch
^[a-f0-9]{40}$revision*stringchanges*array<>assetChanges*array<>import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.templates.diffWorkspace({
"id": "example",
"expectedRevision": "example"
});Example Response
{
"projectId": "string",
"baseCommit": "string",
"revision": "string",
"changes": [
{
"path": "string",
"before": "string",
"after": "string",
"status": "added"
}
],
"assetChanges": [
{
"path": "string",
"status": "added",
"digest": "string"
}
]
}