Skip to Content

List template project commit history

Returns recent history from the template repository's default branch. Request: GET /v1/templates/{id}/workspace/history. Scope: templates:read.

GET
/v1/templates/{id}/workspace/history

Returns recent history from the template repository's default branch.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$

Query Parameters

limit?|null

Response Body

Success

application/json
  1. response
projectId*TemplateProjectId
Match^tproj_[0-9a-hjkmnp-tv-z]{16,24}$
head*string
Match^[a-f0-9]{40}$
commits*array<>
publication*|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.templates.workspaceHistory({
  "id": "example"
});
Example Response
{
  "projectId": "string",
  "head": "string",
  "commits": [
    {
      "commit": "string",
      "tree": "string",
      "parentCommit": "string",
      "message": "string",
      "committedAt": "string"
    }
  ],
  "publication": {
    "id": "string",
    "commit": "string"
  }
}

Related documentation