List recent logs
import requests
url = "https://api.pdfshift.io/v3/logs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.pdfshift.io/v3/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pdfshift.io/v3/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.pdfshift.io/v3/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pdfshift.io/v3/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api.pdfshift.io/v3/logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.pdfshift.io/v3/logs")
.header("X-API-Key", "<api-key>")
.asString();curl --request GET \
--url https://api.pdfshift.io/v3/logs \
--header 'X-API-Key: <api-key>'{
"success": true,
"logs": {
"has_more": true,
"data": [
{
"id": 12345500,
"duration": 2191,
"executed": 1764753251000,
"credits": 1,
"sandbox": false,
"filesize": 305345,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "40bad9f3-0eb8-4de3-82de-3886ff9522ed",
"query": null
},
{
"id": 12345501,
"duration": 2385,
"executed": 1764753169000,
"credits": 1,
"sandbox": false,
"filesize": 310593,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "e8079824-f786-45b1-a8cb-a35fe916ea8d",
"query": null
},
{
"id": 12345502,
"duration": 2377,
"executed": 1764752870000,
"credits": 1,
"sandbox": false,
"filesize": 306883,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "22bf9320-455a-4e91-bda4-b90cfb0e4eb0",
"query": null
},
{
"id": 12345503,
"duration": 2209,
"executed": 1764752729000,
"credits": 1,
"sandbox": false,
"filesize": 334962,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "6ac98706-9dbe-4ba2-acaf-3ad2313048d6",
"query": null
},
{
"id": 12345504,
"duration": 1419,
"executed": 1764616844000,
"credits": 1,
"sandbox": false,
"filesize": 300952,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "63a0fdbf-a07c-4c65-a8f7-4ad09db5530c",
"query": null
}
],
"limit": 5,
"page": 0,
"total": 233
}
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}Logs
List recent logs
GET
/
logs
List recent logs
import requests
url = "https://api.pdfshift.io/v3/logs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.pdfshift.io/v3/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pdfshift.io/v3/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.pdfshift.io/v3/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pdfshift.io/v3/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api.pdfshift.io/v3/logs");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.pdfshift.io/v3/logs")
.header("X-API-Key", "<api-key>")
.asString();curl --request GET \
--url https://api.pdfshift.io/v3/logs \
--header 'X-API-Key: <api-key>'{
"success": true,
"logs": {
"has_more": true,
"data": [
{
"id": 12345500,
"duration": 2191,
"executed": 1764753251000,
"credits": 1,
"sandbox": false,
"filesize": 305345,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "40bad9f3-0eb8-4de3-82de-3886ff9522ed",
"query": null
},
{
"id": 12345501,
"duration": 2385,
"executed": 1764753169000,
"credits": 1,
"sandbox": false,
"filesize": 310593,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "e8079824-f786-45b1-a8cb-a35fe916ea8d",
"query": null
},
{
"id": 12345502,
"duration": 2377,
"executed": 1764752870000,
"credits": 1,
"sandbox": false,
"filesize": 306883,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "22bf9320-455a-4e91-bda4-b90cfb0e4eb0",
"query": null
},
{
"id": 12345503,
"duration": 2209,
"executed": 1764752729000,
"credits": 1,
"sandbox": false,
"filesize": 334962,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "6ac98706-9dbe-4ba2-acaf-3ad2313048d6",
"query": null
},
{
"id": 12345504,
"duration": 1419,
"executed": 1764616844000,
"credits": 1,
"sandbox": false,
"filesize": 300952,
"error": null,
"code": 200,
"user_agent": "Python/3.9 aiohttp/3.10.5",
"request_id": "63a0fdbf-a07c-4c65-a8f7-4ad09db5530c",
"query": null
}
],
"limit": 5,
"page": 0,
"total": 233
}
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}Authorizations
Query Parameters
Number of items to return (between 5 and 100, defaults to 20)
Required range:
5 <= x <= 100Filter logs by status: 'error', 'success', or 'all' (default: 'all')
Available options:
error, success, all API Key to filter the results to. Default is null, which includes all requests from all API keys.
Returns the items that occur after the given log ID.
Returns the events that occurred before the given time. Format is ISO datetime.
⌘I