DefenceLevel

DefenceLevel public API

Public, read-only data of the DefenceLevel Index: the current DEFCON level and the daily levels. Data licence: CC BY 4.0, cite "DefenceLevel Index…

Identity & security#security

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Public, read-only data of the DefenceLevel Index: the current DEFCON level and the daily levels. Data licence: CC BY 4.0, cite "DefenceLevel Index (defencelevel.com)". Methodology: https://defencelevel.com/index/methodology. Responses are cached for a few minutes and can be read from any website (CORS).

Endpoints 4

  • GETCurrent DEFCON level/api/statusRecalculated after every automatic collection (about every 30 minutes) on the last 24 hours; raised immediately when an alert at a more severe level is sent.
  • GETEmbeddable badge with the current level/api/badge.svgSVG image (232 × 64) with the current DEFCON level and its name, attribution included. Embed it with a link to the Index: see /index/api.
  • GETDaily levels of the DefenceLevel Index/api/trendOne level per calendar day in UTC: the level set at 05:00 UTC with the daily briefing. Includes summary figures on fixed windows (last 30 days).
  • GETPreview image (1200×630 PNG) with the current level and the last 30 days/api/og

API details

Base URL
https://defencelevel.com
Authentication
None declared in the description
Operations
4 operations on 4 pathsGET 4
Response formats
application/json application/atom+xml image/png image/svg+xml
Description format
OpenAPI 3.1.0, API version 1.0.0

How to test the DefenceLevel public API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the DefenceLevel public API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “Current DEFCON level” (GET /api/status), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the DefenceLevel public API?

Public, read-only data of the DefenceLevel Index: the current DEFCON level and the daily levels. Data licence: CC BY 4.0, cite "DefenceLevel Index… It is listed under Identity & security and has 4 endpoints.

Who publishes the DefenceLevel public API?

It is listed from DefenceLevel's public API description (an OpenAPI document), not published by DefenceLevel on Swastik Codes. Anyone who controls defencelevel.com can claim the profile by adding a DNS TXT record.

What is the base URL of the DefenceLevel public API?

Requests go to https://defencelevel.com. Endpoint paths are added to this base URL.

How do I authenticate with the DefenceLevel public API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the DefenceLevel public API have?

4 operations on 4 paths (4 GET).

Is forking the DefenceLevel public API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.