For the complete documentation index, see llms.txt. This page is also available as Markdown.

List website Git repositories

Lists the Git repositories linked to directories of the website, with Deploy website Git repository or in the Git section of hPanel: clone URL, branch and directory of each one.

List website Git repositories

get

Lists the Git repositories linked to directories of the website, with Deploy website Git repository or in the Git section of hPanel: clone URL, branch and directory of each one. A repository whose clone failed stays listed; deploying it again retries the clone. GitHub and GitLab auto-deployments are not listed here; see Get Git auto-deployment settings.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Responses
200

Success response

application/json
repository_urlstringRequired

Clone URL of the repository. A username, password or token in an HTTP(S) URL, or a password in any URL, is shown as ***.

Example: git@github.com:octocat/my-site.git
branchstringRequired

Branch that is cloned and pulled

Example: main
directorystringRequired

Directory under the website document root. Empty means the document root.

Example: my-site
get/api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories
GET /api/hosting/v1/accounts/{username}/websites/{domain}/git/repositories HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "repository_url": "git@github.com:octocat/my-site.git",
    "branch": "main",
    "directory": "my-site",
    "webhook": {
      "url": "https://webhooks.hostinger.com/deploy/6f1ed002ab5595859014ebf0951522d9",
      "provider": "Github",
      "setup_url": "https://github.com/octocat/my-site/settings/hooks/new",
      "tutorial_url": "https://developer.github.com/webhooks/creating/"
    }
  }
]

Last updated

Was this helpful?