Introduction
Starting guide for 1Pilot API
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.
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 :
Authorization: Bearer $YOUR_TOKEN
get
https://app.1pilot.io/api/v1
/ping
Test call
All list results are paginated with "links" & "meta" informations in the response body
{
"data": [
[...]
],
"links": {
"first": "https://app.1pilot.io/api/v1/sites/1/logs?page=1",
"last": "https://app.1pilot.io/api/v1/sites/1/logs?page=4",
"prev": "https://app.1pilot.io/api/v1/sites/1/logs?page=1",
"next": "https://app.1pilot.io/api/v1/sites/1/logs?page=3"
},
"meta": {
"current_page": 2,
"from": 16,
"last_page": 4,
"path": "https://app.1pilot.io/api/v1/sites/1/logs",
"per_page": 15,
"to": 30,
"total": 53
}
}
You can use the
page
query parameters for follow the pagination.
Last modified 4yr ago