Install Statamic
This endpoint allows you to install Statamic to your website
POST api/servers/{server}/sites/{id}/statamic
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
type | string | optional | When set to repository , it will also require repository details |
provider | string | required when type is set to repository |
The repository provider uses, could be any of: github , bitbucket , gitlab , you will need to have either of these providers attached to your profile |
name | string | required when type is set to repository |
The name for your new repository |
private | boolean | optional when setting type to repository , defaults to false |
Whether your new repository should be private |
description | string | optional when type is set to repository |
The description for your new repository |
installation_type | string | optional when type is set to repository , defaults to default |
Use any of the starter kits, more info on those: https://statamic.dev/installation#starter-kits, more info on the available values below |
Installation type values
Value | Description |
---|---|
default |
Default's to a clean Statamic installation |
starters-creek |
https://github.com/statamic/starter-kit-starters-creek |
cool-writings |
https://github.com/statamic/starter-kit-cool-writings |
doogie-browser |
https://github.com/statamic/starter-kit-doogie-browser |
community-docs |
https://github.com/doublethreedigital/docs-starter-kit |
community-simple-commerce |
https://github.com/doublethreedigital/sc-starter-kit |
community-butik |
https://github.com/jonassiewertsen/statamic-butik-starter-kit |
community-peak |
https://github.com/studio1902/statamic-peak |
This call could potentially take longer than usual. This is because the repository is being created inside this request for validation reasons via the API of the Git provider which might be slower at times.
Example request:
curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/statamic" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
--data '{"type": "repository", "name": "my_new_repository", "private": true, "description": "My new awesome Statamic installation"}'
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 1,
"status": "statamic-installing",
"server_id": 1,
"domain": "example.com",
"test_domain": null,
"deploy_script": false,
"web_directory": "/public",
"project_type": "statamic",
"project_root": "/",
"last_deploy_at": null,
"system_user": "ploi",
"php_version": 7.4,
"health_url": null,
"has_repository": false,
"zero_downtime_deployment": false,
"fastcgi_cache": false,
"created_at": "2021-01-01 00:00:00"
},
"message": "Statamic is being installed"
}