Introduction
Starting guide for 1Pilot API

Generate Access Token

For use the API you need to have an Access Token, you can generate one from your Profile page by clicking on "Create New Token" button. On the modal set a name and choose if this token will have Write access to the API (write access mean you can create sites and tags via the API) once done click on create button and save securely the token: it's the only one time it will be shown.

Authentication

For use the API, you need to authenticate your requests by providing your previously generated token as a bearer token in the "Authorization" HTTP header like following :
1
Authorization: Bearer $YOUR_TOKEN
Copied!
get
https://app.1pilot.io/api/v1
/ping
Test call

Pagination

All list results are paginated with "links" & "meta" informations in the response body
1
2
{
3
"data": [
4
[...]
5
],
6
"links": {
7
"first": "https://app.1pilot.io/api/v1/sites/1/logs?page=1",
8
"last": "https://app.1pilot.io/api/v1/sites/1/logs?page=4",
9
"prev": "https://app.1pilot.io/api/v1/sites/1/logs?page=1",
10
"next": "https://app.1pilot.io/api/v1/sites/1/logs?page=3"
11
},
12
"meta": {
13
"current_page": 2,
14
"from": 16,
15
"last_page": 4,
16
"path": "https://app.1pilot.io/api/v1/sites/1/logs",
17
"per_page": 15,
18
"to": 30,
19
"total": 53
20
}
21
}
22
Copied!
You can use the page query parameters for follow the pagination.
Last modified 2yr ago