-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathopenapi.json
More file actions
99 lines (99 loc) · 3.01 KB
/
Copy pathopenapi.json
File metadata and controls
99 lines (99 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"openapi": "3.0.3",
"info": {
"title": "Origin Errors API",
"version": "1.0.0",
"description": "API for retrieving CDN origin error logs."
},
"paths": {
"/{pullZoneId}/{dateTime}": {
"get": {
"summary": "Get origin error logs for a specific Pull Zone and date",
"description": "Retrieves origin error logs for the given Pull Zone and date.",
"parameters": [
{
"name": "pullZoneId",
"in": "path",
"required": true,
"schema": { "type": "integer" },
"description": "The ID of the Pull Zone."
},
{
"name": "dateTime",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^\\d{2}-\\d{2}-\\d{4}$",
"example": "10-29-2025"
},
"description": "The date for which to retrieve logs, formatted as MM-dd-yyyy."
}
],
"security": [{ "AccessKeyAuth": [] }, { "JWTAuth": [] }],
"responses": {
"200": {
"description": "Successful response with log data",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/LogResponse" }
}
}
},
"401": { "description": "Unauthorized - missing or invalid API key" }
}
}
}
},
"components": {
"securitySchemes": {
"AccessKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "AccessKey",
"description": "Send your Access Key in the AccessKey header."
},
"JWTAuth": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Send the JWT as the entire Authorization header value (no 'Bearer ' prefix)."
}
},
"schemas": {
"LogResponse": {
"type": "object",
"properties": {
"logs": {
"type": "array",
"items": { "$ref": "#/components/schemas/LogEntry" }
}
}
},
"LogEntry": {
"type": "object",
"properties": {
"logId": {
"type": "string",
"format": "uuid",
"example": "a6a6b755-b6a4-46be-b523-aa82a17d4bc5"
},
"timestamp": { "type": "integer", "example": 1728952065848 },
"log": {
"type": "string",
"example": "{\"RequestUrl\":\"/apikey\",\"PullZoneId\":308006,\"Message\":\"Origin DNS lookup failed...\",\"ErrorCode\":\"dns_lookup\",\"StatusCode\":502}"
},
"labels": {
"type": "object",
"properties": {
"ErrorCode": { "type": "string", "example": "dns_lookup" },
"StatusCode": { "type": "string", "example": "502" },
"ServerZone": { "type": "string", "example": "CA" }
}
}
}
}
}
},
"servers": [{ "url": "https://cdn-origin-logging.bunny.net" }]
}