Sites

Manage your sites via the API

get
List all sites

https://app.1pilot.io/api/v1/sites
Request
Response
Request
Response
200: OK
{
"data": [
{
"id": 1,
"name": "Example.com",
"url": "http://example.com",
"admin_url": "http://example.com/backend",
"notes": "Demo site",
"status": "Ok",
"published": 1,
"tags": [
{
"id": 1,
"name": "Test",
"created_at": "2018-01-31T10:27:39+00:00",
"updated_at": "2018-01-31T10:27:39+00:00"
},
{
"id": 5,
"name": "Tag",
"created_at": "2018-02-01T13:46:53+00:00",
"updated_at": "2018-02-14T15:10:59+00:00"
}
],
"server": {
"ip": "1.1.1.1",
"web": "nginx/1.13.7",
"php": "7.0.26-1~dotdeb+8.1",
"mysql": "10.0.33-MariaDB-1~jessie"
},
"updates_count": 4,
"created_at": "2018-01-31T08:12:42+00:00",
"updated_at": "2018-06-15T09:01:04+00:00",
"last_check_at": "2018-06-15T09:01:03+00:00"
},
{
"id": 2,
"name": "Second test site",
"url": "http://dev.example.com/",
"admin_url": "http://dev.example.com/backend",
"notes": "",
"status": "Ok",
"published": 1,
"tags": [],
"server": {
"ip": "8.8.8.8",
"web": "nginx/1.13.7",
"php": "7.1.12-1+0~20171129100550.11+stretch~1.gbp8ded15",
"mysql": "10.0.33-MariaDB-1~jessie"
},
"updates_count": 2,
"created_at": "2018-01-31T08:13:29+00:00",
"updated_at": "2018-06-15T08:50:05+00:00",
"last_check_at": "2018-06-15T08:50:04+00:00"
},
[...]
],
"links": {
"first": "https://app.1pilot.io/api/v1/sites?page=1",
"last": "https://app.1pilot.io/api/v1/sites?page=2",
"prev": null,
"next": "https://app.1pilot.io/api/v1/sites?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"path": "https://app.1pilot.io/api/v1/sites",
"per_page": 15,
"to": 15,
"total": 18
}
}

get
Get one site

https://app.1pilot.io/api/v1/sites/:id
Request
Response
Request
Path Parameters
id
required
integer
Site ID
Response
200: OK
{
"data": {
"id": 1,
"name": "Example.com",
"url": "http://example.com",
"admin_url": "http://example.com/backend",
"notes": "Demo site",
"status": "Ok",
"published": 1,
"tags": [
{
"id": 1,
"name": "Test",
"created_at": "2018-01-31T10:27:39+00:00",
"updated_at": "2018-01-31T10:27:39+00:00"
},
{
"id": 5,
"name": "Tag",
"created_at": "2018-02-01T13:46:53+00:00",
"updated_at": "2018-02-14T15:10:59+00:00"
}
],
"server": {
"ip": "8.8.8.8",
"web": "nginx/1.13.7",
"php": "7.0.26-1~dotdeb+8.1",
"mysql": "10.0.33-MariaDB-1~jessie"
},
"updates_count": 2,
"created_at": "2018-01-31T08:12:42+00:00",
"updated_at": "2018-06-15T09:01:04+00:00",
"last_check_at": "2018-06-15T09:01:03+00:00"
}
}

post
Create a site

https://app.1pilot.io/api/v1/sites
Request
Response
Request
Form Data Parameters
name
required
string
cms_id
required
integer
url
required
string
admin_url
optional
string
private_key
optional
string
notes
optional
string
monitor[look_for_string]
optional
string
If provided the monitor will check if the response contain the provided string and trigger an error if he not find it
Response
200: OK
{
"data": {
"id": 43,
"name": "Test from API",
"url": "http://example.com/",
"admin_url": "http://example.com/admin",
"notes": "my demo site",
"status": "Ok",
"published": null,
"tags": [],
"server": {
"ip": null,
"web": null,
"php": null,
"mysql": null
},
"created_at": "2018-06-18T08:49:36+00:00",
"updated_at": "2018-06-18T08:49:36+00:00",
"last_check_at": null
}
}

delete
Delete a site

https://app.1pilot.io/api/v1/sites/:id
Request
Response
Request
Path Parameters
id
required
integer
Site ID
Response
200: OK