Ploi API

Robot access

Ability to set the robot access from search robots. Obviously, it is up to the robot to honor this request.

PATCH api/servers/{server}/sites/{id}

Parameters

Parameter Type Status Description
disable_robots boolean required Whether the robots should be blocked or not

Example request:

curl -X PATCH "https://ploi.io/api/servers/{server}/sites/{id}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
   --data '{"disable_robots": true}'

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": {
        "id": 1,
        "status": "active",
        "server_id": 1,
        "domain": "awesome.com",
        "test_domain": null,
        "deploy_script": "cd /home/ploi/awesome.com\ngit pull origin master\ncomposer install --no-interaction --prefer-dist --optimize-autoloader\necho \"\" | sudo -S service php8.0-fpm reload\n\necho \"? Application deployed!\"",
        "web_directory": "/public",
        "project_type": "laravel",
        "project_root": "/",
        "last_deploy_at": "2021-09-20 08:39:46",
        "system_user": "ploi",
        "php_version": "8.0",
        "health_url": null,
        "disable_robots": true,
        "has_repository": true,
        "zero_downtime_deployment": false,
        "has_staging": false,
        "fastcgi_cache": false,
        "created_at": "2021-01-01 00:00:00"
    }
}