> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.docs.modulards.com/modular-ds-public-api/uptime-monitor/monitoring-results/retrieve-a-website-s-uptime/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server. # Retrieve a website's uptime GET https://api.modulards.com/api/public/v1/sites/{site}/uptime Returns one website's uptime summary: whether it is monitored and switched on, its current status and since when, its last ping, and its availability over the last day, week and month (the percentage of successful pings and how many pings that covers). A website without Uptime Monitor settings answers `configured: false` with everything else null. A paused monitor reports `status: "unknown"` but keeps its historical last ping and availability. A window with no pings reports `percentage: null`, never a made-up 100. This read is heavier than "Retrieve a website": fetch it for the website you are inspecting, not in a loop over your whole website list. Reference: https://api.docs.modulards.com/modular-ds-public-api/uptime-monitor/monitoring-results/retrieve-a-website-s-uptime ## Authentication - `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints. ## Request ### Path parameters - `site` (string, required) ## Response ### 200 200 - Uptime summary - `jsonapi` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaJsonapi, optional) - `meta` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMeta, optional) ## Types ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaJsonapi - `version` (string, optional) ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMeta - `availability` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailability, optional, nullable) — Availability over rolling windows. - `configured` (boolean, optional) — Whether the website has Uptime Monitor settings; when false, every other field is null. - `enabled` (boolean, optional, nullable) — Whether the monitor is on. - `last_ping` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaLastPing, optional, nullable) — The last ping, kept while the monitor is paused. - `site_id` (integer, optional) — Website id. - `status` (enum, optional, nullable) — Current status: up, down or unknown (a paused monitor reads unknown). - Allowed values: `up`, `down`, `unknown` - `status_since` (string, optional, nullable) — When the website entered its current status (ISO 8601). ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailability Availability over rolling windows. - `day` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailabilityDay, optional) - `month` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailabilityMonth, optional) - `week` (ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailabilityWeek, optional) ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaLastPing The last ping, kept while the monitor is paused. - `at` (string, optional) — When the ping ran (ISO 8601). - `error` (string, optional, nullable) — Error recorded for a failed ping. - `response_time_ms` (integer, optional, nullable) — Response time in milliseconds; null when there was no answer. - `status` (enum, optional) — up, down or unknown. - Allowed values: `up`, `down`, `unknown` - `status_code` (integer, optional, nullable) — HTTP status the website answered; null when it did not answer. ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailabilityDay - `percentage` (double, optional, nullable) — Percentage of successful pings in the last day; null when the window has no pings. - `total_pings` (integer, optional) — Pings in the last day. ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailabilityMonth - `percentage` (double, optional, nullable) — Percentage of successful pings in the last month; null when the window has no pings. - `total_pings` (integer, optional) — Pings in the last month. ### ApiPublicV1SitesSiteUptimeGetResponsesContentApplicationJsonSchemaMetaAvailabilityWeek - `percentage` (double, optional, nullable) — Percentage of successful pings in the last week; null when the window has no pings. - `total_pings` (integer, optional) — Pings in the last week. ## Examples **Response** ```json { "jsonapi": { "version": "1.1" }, "meta": { "availability": { "day": { "percentage": 100, "total_pings": 288 }, "month": { "percentage": 99.72, "total_pings": 8640 }, "week": { "percentage": 99.86, "total_pings": 2016 } }, "configured": true, "enabled": true, "last_ping": { "at": "2026-09-21T09:55:00.000000Z", "error": null, "response_time_ms": 312, "status": "up", "status_code": 200 }, "site_id": 12, "status": "up", "status_since": "2026-09-10T06:00:00.000000Z" } } ``` **SDK Code** ```python 200 - Uptime summary import requests url = "https://api.modulards.com/api/public/v1/sites/site/uptime" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript 200 - Uptime summary const url = 'https://api.modulards.com/api/public/v1/sites/site/uptime'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 - Uptime summary package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/sites/site/uptime" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 - Uptime summary require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/sites/site/uptime") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java 200 - Uptime summary import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.modulards.com/api/public/v1/sites/site/uptime") .header("Authorization", "Bearer ") .asString(); ``` ```php 200 - Uptime summary request('GET', 'https://api.modulards.com/api/public/v1/sites/site/uptime', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 200 - Uptime summary using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/sites/site/uptime"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 200 - Uptime summary import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/sites/site/uptime")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```