Skip to Content

Get a template project Git repository

Returns the credential-free HTTPS remote and default branch for the template project repository.

GET
/v1/templates/{id}/repository

Returns the credential-free HTTPS remote and default branch for the template project repository.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Response Body

Success

application/json
  1. response
remote*string
Match^https:\/\/|^http:\/\/127\.0\.0\.1:(?:[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\/git\/[a-z0-9-]+\/[a-z0-9-]+\.git$
defaultBranch*string
Length1 <= length <= 255
Example Request
import { createClient } from "samva";

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

const result = await samva.templates.getGitRepository({
  "id": "example"
});
Example Response
{
  "remote": "string",
  "defaultBranch": "string"
}

Related documentation