Skip to content

Validate git repository access

POST
/api/v1/projects/validate-git
curl --request POST \
--url https://api.deploybase.eu/api/v1/api/v1/projects/validate-git \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "git_provider": "github", "git_repo_url": "example", "git_token": "example", "project_id": "example" }'

Tests whether a git repository URL is accessible, optionally with an access token

Git repository details

Media type application/json
object
git_provider
string
Allowed values: github gitlab bitbucket codeberg
git_repo_url
required
string
git_token
string
<= 500 characters
project_id

ProjectID, when set, lets validation fall back to the project’s stored token if git_token is omitted — so a saved credential can be tested.

string

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"data": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Git validation failed

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}