The TurboFiles API follows the JSON:API specification and requires HTTPS for all requests.
All requests must be sent to https://api.turbofiles.io
using HTTPS. Any HTTP requests will be rejected. Authenticated endpoints require valid API credentials, and all requests must include these JSON:API headers:
Accept: application/vnd.api+json Content-Type: application/vnd.api+json
Here's an example authenticated request:
curl "https://api.turbofiles.io/v1/users/me" \ -H 'Accept: application/vnd.api+json' \ -H 'Content-Type: application/vnd.api+json' \ -H 'Authorization: Bearer {api_key}'
{ "links": { "next": "https://api.turbofiles.io/v1/files?page%5Bafter%5D=2024-11-22T16%3A20%3A28.048315893Z", "prev": "https://api.turbofiles.io/v1/files?page%5Bbefore%5D=2024-11-22T16%3A19%3A28.048315893Z" } }
Navigate through results using the links.next
URL.
Each response also includes pagination metadata:
{ "meta": { "rangeTruncated": true } }
You can customize pagination using two parameters:
page[size]
: Number of results per page (default: 10, range: 1-100)page[after]
: Cursor for fetching results after this pointpage[before]
: Cursor for fetching results before this point