Skip to content

Commit 54f6c65

Browse files
author
Sergey Sagan
committed
:Initial
0 parents  commit 54f6c65

File tree

3 files changed

+382
-0
lines changed

3 files changed

+382
-0
lines changed

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
MIT License © 2025 Prudent Dev LLC
2+
3+
4+
---
5+
6+
## 📜 LICENSE (MIT)
7+
```text
8+
MIT License
9+
10+
Copyright (c) 2025 Prudent Dev LLC
11+
12+
Permission is hereby granted, free of charge, to any person obtaining a copy
13+
of this software and associated documentation files (the "Software"), to deal
14+
in the Software without restriction, including without limitation the rights
15+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16+
copies of the Software, and to permit persons to whom the Software is
17+
furnished to do so, subject to the following conditions:
18+
19+
The above copyright notice and this permission notice shall be included in all
20+
copies or substantial portions of the Software.
21+
22+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28+
SOFTWARE.
29+
```

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Site Informant OpenAPI
2+
3+
Official OpenAPI specification for the **[Site Informant](https://siteinformant.com)** public JSON API —
4+
a simple, developer-friendly interface for website uptime, response time, and SSL expiration data.
5+
6+
---
7+
8+
## 📘 Overview
9+
10+
Site Informant provides affordable uptime and SSL monitoring for websites.
11+
Our **public JSON API** lets developers, dashboards, and AI tools access live monitoring data for sites that have opted into public visibility.
12+
13+
- **Base URL:** `https://api.siteinformant.com/api/public/`
14+
- **Docs:** [https://siteinformant.com/Developers](https://siteinformant.com/Developers)
15+
- **OpenAPI Spec:** [openapi-public.json](https://api.siteinformant.com/api/public/openapi.json)
16+
17+
---
18+
19+
## 🧠 Example
20+
21+
```bash
22+
GET https://api.siteinformant.com/api/public/status/prudentdev.com
23+
```
24+
```JSON
25+
{
26+
"domain": "prudentdev.com",
27+
"uptimePercent": 99.89,
28+
"isOnline": true,
29+
"lastCheckUtc": "2025-11-04T07:45:00Z",
30+
"averageResponseMs": 238,
31+
"sslExpiresUtc": "2026-01-04T00:00:00Z",
32+
"sslIssuer": "Let's Encrypt"
33+
}
34+
```
35+
## 💡 Use Cases
36+
Build custom uptime dashboards or client portals
37+
38+
Integrate uptime data into AI agents or chatbots
39+
40+
Automate alerts and reporting pipelines
41+
42+
Enhance DevOps observability systems
43+
44+
## 🛠️ Rate Limits
45+
60 requests / minute
46+
47+
Returns HTTP 429 with Retry-After header when exceeded
48+
49+
Please cache results responsibly (status endpoints ~60s TTL)
50+
51+
## ⚙️ Schema
52+
The openapi-public.json file defines:
53+
54+
/status/{domain} — site uptime & SSL data
55+
56+
/plans — current pricing tiers
57+
58+
/example — sample payload for crawlers/tests
59+
60+
You can import this file directly into Postman, Swagger UI, or any OpenAPI-compatible SDK generator.
61+
62+
## 🔗 Related Resources
63+
[Blog announcement: Free Website Uptime API – JSON for Developers and AI Integrations](https://siteinformant.com/blog/free-website-uptime-api)
64+
65+
66+
Dev.to post: [dev.to/saganmarketing](https://dev.to/saganmarketing/free-website-uptime-api-json-for-developers-and-ai-integrations-519m)
67+
68+
Medium article: [medium.com/@saganmarketing.com](https://dev.to/saganmarketing/free-website-uptime-api-json-for-developers-and-ai-integrations-519m)

openapi.json

Lines changed: 285 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,285 @@
1+
{
2+
"openapi": "3.0.3",
3+
"info": {
4+
"title": "Site Informant Public API",
5+
"version": "1.0.0",
6+
"description": "Read-only endpoints that expose website uptime status, SSL expiration info, and public plan details for Site Informant.",
7+
"contact": {
8+
"name": "Site Informant Support",
9+
"email": "informant@siteinformant.com",
10+
"url": "https://siteinformant.com"
11+
},
12+
"termsOfService": "https://siteinformant.com/terms",
13+
"license": {
14+
"name": "Proprietary",
15+
"url": "https://siteinformant.com"
16+
}
17+
},
18+
"servers": [
19+
{
20+
"url": "https://api.siteinformant.com",
21+
"description": "Production"
22+
},
23+
{
24+
"url": "http://localhost:5000",
25+
"description": "Local"
26+
}
27+
],
28+
"externalDocs": {
29+
"description": "Website & docs",
30+
"url": "https://siteinformant.com"
31+
},
32+
"tags": [
33+
{
34+
"name": "Public",
35+
"description": "Public, anonymous, read-only endpoints. Privacy is respected via per-site opt-in."
36+
}
37+
],
38+
"paths": {
39+
"/api/public/status/{domain}": {
40+
"get": {
41+
"tags": [ "Public" ],
42+
"summary": "Get public status for a monitored domain",
43+
"description": "Returns uptime percentage calculated from recent checks, current online/offline state, average response time, and SSL certificate details (if applicable). Only domains explicitly opted-in by the site owner are returned.",
44+
"parameters": [
45+
{
46+
"name": "domain",
47+
"in": "path",
48+
"required": true,
49+
"schema": {
50+
"type": "string",
51+
"example": "example.com"
52+
},
53+
"description": "Domain without scheme. If a full URL is provided, the host is extracted."
54+
}
55+
],
56+
"responses": {
57+
"200": {
58+
"description": "Status for the requested domain.",
59+
"headers": {
60+
"Cache-Control": {
61+
"description": "Clients may cache this response for a short period.",
62+
"schema": {
63+
"type": "string",
64+
"example": "public, max-age=30"
65+
}
66+
}
67+
},
68+
"content": {
69+
"application/json": {
70+
"schema": { "$ref": "#/components/schemas/PublicStatusResponse" },
71+
"examples": {
72+
"ok": {
73+
"summary": "Typical response",
74+
"value": {
75+
"domain": "example.com",
76+
"uptimePercent": 99.92,
77+
"isOnline": true,
78+
"lastCheckUtc": "2025-11-03T07:45:00Z",
79+
"averageResponseMs": 238,
80+
"sslExpiresUtc": "2026-01-04T00:00:00Z",
81+
"sslIssuer": "Let's Encrypt"
82+
}
83+
}
84+
}
85+
}
86+
}
87+
},
88+
"404": {
89+
"description": "Domain not found or not public.",
90+
"content": {
91+
"application/json": {
92+
"schema": { "$ref": "#/components/schemas/ErrorResponse" },
93+
"examples": { "notPublic": { "value": { "error": "Not found or not public." } } }
94+
}
95+
}
96+
},
97+
"400": {
98+
"description": "Invalid input.",
99+
"content": {
100+
"application/json": {
101+
"schema": { "$ref": "#/components/schemas/ErrorResponse" },
102+
"examples": { "bad": { "value": { "error": "Domain is required." } } }
103+
}
104+
}
105+
}
106+
}
107+
}
108+
},
109+
"/api/public/plans": {
110+
"get": {
111+
"tags": [ "Public" ],
112+
"summary": "List public pricing plans",
113+
"description": "Returns the current public plans, their monthly price, and included site counts.",
114+
"responses": {
115+
"200": {
116+
"description": "Plan list.",
117+
"headers": {
118+
"Cache-Control": {
119+
"description": "Clients may cache the plan list.",
120+
"schema": {
121+
"type": "string",
122+
"example": "public, max-age=3600"
123+
}
124+
}
125+
},
126+
"content": {
127+
"application/json": {
128+
"schema": { "$ref": "#/components/schemas/PublicPlansResponse" },
129+
"examples": {
130+
"plans": {
131+
"value": {
132+
"plans": [
133+
{
134+
"name": "Free",
135+
"monthlyPrice": 0.0,
136+
"includedSites": 1,
137+
"notes": "1 site free."
138+
},
139+
{
140+
"name": "Pay-As-You-Go",
141+
"monthlyPrice": 1.0,
142+
"includedSites": 5,
143+
"notes": "5-site blocks."
144+
},
145+
{
146+
"name": "Professional",
147+
"monthlyPrice": 9.99,
148+
"includedSites": 75,
149+
"notes": "Great for teams."
150+
},
151+
{
152+
"name": "Enterprise",
153+
"monthlyPrice": 29.99,
154+
"includedSites": 200,
155+
"notes": "Agencies & large portfolios."
156+
}
157+
]
158+
}
159+
}
160+
}
161+
}
162+
}
163+
}
164+
}
165+
}
166+
},
167+
"/api/public/example": {
168+
"get": {
169+
"tags": [ "Public" ],
170+
"summary": "Sample status payload",
171+
"description": "Provides a representative status response for testing and quick integration checks.",
172+
"responses": {
173+
"200": {
174+
"description": "Example status payload.",
175+
"headers": {
176+
"Cache-Control": {
177+
"description": "Clients may cache this example payload.",
178+
"schema": {
179+
"type": "string",
180+
"example": "public, max-age=300"
181+
}
182+
}
183+
},
184+
"content": {
185+
"application/json": {
186+
"schema": { "$ref": "#/components/schemas/PublicStatusResponse" }
187+
}
188+
}
189+
}
190+
}
191+
}
192+
}
193+
},
194+
"components": {
195+
"schemas": {
196+
"PublicStatusResponse": {
197+
"type": "object",
198+
"description": "Public view of recent availability and certificate data for a domain.",
199+
"properties": {
200+
"domain": {
201+
"type": "string",
202+
"description": "Normalized domain (host)."
203+
},
204+
"uptimePercent": {
205+
"type": "number",
206+
"format": "double",
207+
"description": "Percentage of successful checks across recent samples (0–100)."
208+
},
209+
"isOnline": {
210+
"type": "boolean",
211+
"description": "Latest check result."
212+
},
213+
"lastCheckUtc": {
214+
"type": "string",
215+
"format": "date-time",
216+
"nullable": true,
217+
"description": "Timestamp of the most recent check in UTC (null if unavailable)."
218+
},
219+
"averageResponseMs": {
220+
"type": "integer",
221+
"nullable": true,
222+
"description": "Average response time (ms) across recent samples, excluding zeros (null if unavailable)."
223+
},
224+
"sslExpiresUtc": {
225+
"type": "string",
226+
"format": "date-time",
227+
"nullable": true,
228+
"description": "SSL certificate expiration in UTC (null if not HTTPS or unknown)."
229+
},
230+
"sslIssuer": {
231+
"type": "string",
232+
"nullable": true,
233+
"description": "Certificate issuer if known."
234+
}
235+
},
236+
"required": [ "domain", "uptimePercent", "isOnline" ]
237+
},
238+
"PublicPlansResponse": {
239+
"type": "object",
240+
"properties": {
241+
"plans": {
242+
"type": "array",
243+
"items": { "$ref": "#/components/schemas/PublicPlan" },
244+
"description": "Available public plans."
245+
}
246+
},
247+
"required": [ "plans" ]
248+
},
249+
"PublicPlan": {
250+
"type": "object",
251+
"properties": {
252+
"name": {
253+
"type": "string",
254+
"description": "Plan name."
255+
},
256+
"monthlyPrice": {
257+
"type": "number",
258+
"format": "double",
259+
"description": "USD monthly price."
260+
},
261+
"includedSites": {
262+
"type": "integer",
263+
"description": "Included site count."
264+
},
265+
"notes": {
266+
"type": "string",
267+
"nullable": true,
268+
"description": "Short description."
269+
}
270+
},
271+
"required": [ "name", "monthlyPrice", "includedSites" ]
272+
},
273+
"ErrorResponse": {
274+
"type": "object",
275+
"properties": {
276+
"error": {
277+
"type": "string",
278+
"description": "Short error message."
279+
}
280+
},
281+
"required": [ "error" ]
282+
}
283+
}
284+
}
285+
}

0 commit comments

Comments
 (0)