Install repository
Install a repository on your site.
POST/api/servers/{server}/sites/{site}/repository
Install repository
This endpoint allows you to install a repository on your site.
Required parameters
- Name
provider- Type
- string
- Description
The repository provider. Must be:
bitbucket,github,gitlab, orcustom.
- Name
branch- Type
- string
- Description
The branch to use for deployments.
- Name
name- Type
- string
- Description
Either
username/repositoryor a custom GIT URL ending with.git.
Request
POST
/api/servers/{server}/sites/{site}/repositorycurl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/repository" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"provider": "bitbucket",
"branch": "master",
"name": "user/repository"
}'
Response
{
"data": {
"id": 90,
"domain": "domain.com",
"web_directory": "/public",
"wordpress": false,
"laravel": false,
"project_root": "/",
"last_deploy_at": "2018-09-14 20:36:05",
"created_at": "2018-09-14 11:40:01",
"repository": {
"branch": "master",
"user": "username",
"provider": "bitbucket"
}
}
}