Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
http.setRequestHeader("Authorization", value: "API-Key {{api_key}}")
let sbResponseBody = CkoStringBuilder()!
success = http.quickGetSb("https://api.pandadoc.com/public/v1/logs", sbContent: sbResponseBody)
if success == false {
print("\(http.lastErrorText!)")
return
}
print("Response status code = \(http.lastStatus.intValue)")
print("\(sbResponseBody.getAsString()!)")
}
Curl Command
curl -X GET
-H "Authorization: Bearer {{access_token}}"
-H "Authorization: API-Key {{api_key}}"
https://api.pandadoc.com/public/v1/logs
Postman Collection Item JSON
{
"name": "List API Logs",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{access_token}}",
"type": "text",
"disabled": true
},
{
"key": "Authorization",
"value": "API-Key {{api_key}}",
"type": "text"
}
],
"url": {
"raw": "https://api.pandadoc.com/public/v1/logs",
"protocol": "https",
"host": [
"api",
"pandadoc",
"com"
],
"path": [
"public",
"v1",
"logs"
]
}
},
"response": [
]
}