Create Git Configuration
POST
/v1/environments/{id}/gitConfigure git for an environment.
Request
Path Params
id
integer
required
Header Params
Accept
string
required
Example:
application/json
Content-Type
string
required
Example:
application/json
Body Params application/json
data
object
required
attributes
object
required
Example
{
"data": {
"attributes": {
"repodef": "git@github.com:octocat/Hello-World.git",
"branch": "master"
}
}
}
Request samples
Responses
Created(201)
HTTP Code: 201
Content Type : JSONapplication/json
Data Schema
data
object
required
id
integer
required
type
string
required
attributes
object
required
Example
{
"data": {
"id": 106,
"type": "git",
"attributes": {
"localpath": "public",
"git_root": "public.git",
"repodef": "git@git.gitlab.com:test/repo.git",
"branch": "main",
"autopull": false,
"pre_script": null,
"post_script": null,
"repomodified": true,
"enabled": true,
"commit": "5d3404a67692e76f3fa6563163789b84245f26fb",
"commit_name": "Merge branch 'app' ...",
"step": "deploy-complete",
"last_trigger": "2024-10-26T09:21:59.000000Z",
"last_status": true,
"last_message": "Deployed: Merge branch ...",
"publickey": "ssh-rsa AAAAB3N..."
}
}
}
Last modified: 2 months ago