Install Statamic

This endpoint allows you to install Statamic to your website.


POST/api/servers/{server}/sites/{id}/statamic

Install Statamic

Installs Statamic on the specified site with optional repository creation and starter kit selection.

Optional attributes

  • Name
    type
    Type
    string
    Description

    When set to repository, it will also require repository details.

  • Name
    provider
    Type
    string
    Description

    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
    name
    Type
    string
    Description

    Required when type is set to repository. The name for your new repository.

  • Name
    private
    Type
    boolean
    Description

    Optional when setting type to repository, defaults to false. Whether your new repository should be private.

  • Name
    description
    Type
    string
    Description

    Optional when type is set to repository. The description for your new repository.

  • Name
    installation_type
    Type
    string
    Description

    Optional when type is set to repository, defaults to default. Use any of the starter kits. Available values: default (clean installation), starters-creek, cool-writings, doogie-browser, community-docs, community-simple-commerce, community-butik, community-peak. More info: Statamic Starter Kits

Request

POST
/api/servers/{server}/sites/{id}/statamic
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" \
  -d '{
    "type": "repository",
    "name": "my_new_repository",
    "private": true,
    "description": "My new awesome Statamic installation"
  }'

Response

{
  "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"
}