Resources

Resources are simple objects supporting CRUD operations. Read operations can be done anonymously. Creating and updating require account permissions, and deleting requires admin account permissions.

All resources support similar operations using HTTP methods:

  • GET /api/v1/<type> - List or search instances (paginated)
  • POST /api/v1/<type> - Create a new instance
  • GET /api/v1/<type>/<id> - Retrieve an instance
  • PUT /api/v1/<type>/<id> - Update an instance
  • DELETE /api/v1/<type>/<id> - Delete an instance

Because the operations are similar, only browsers has complete examples, and others just show retrieving an instance (GET /api/v1/<type>/<id>). Full requests and responses are generated and stored in the source repository

Browsers

A browser is a brand of web client that has one or more versions. This follows most users’ understanding of browsers, i.e., firefox_desktop represents desktop Firefox, safari_desktop represents desktop Safari, and firefox_android represents Firefox on Android.

The browsers representation includes:

  • attributes
    • id (server selected) - Database ID
    • slug (write-once) - Unique, human-friendly slug
    • name (localized) - Browser name
    • note (localized) - Notes, intended for related data like OS, applicable device, engines, etc.
  • links
    • versions (many) - Associated versions, ordered roughly from earliest to latest. User can change the order.
    • history_current (one) - Current historical_browsers. Can be set to a value from history to revert changes.
    • history (many) - Associated historical_browsers in time order (most recent first). Changes are ignored.

Note: bug 1078699 is proposing that select users will be able to modify slugs

List

To request the paginated list of browsers:

GET /api/v1/browsers HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": [
        {
            "id": "1",
            "slug": "android",
            "name": {
                "en": "Android Browser"
            },
            "note": null,
            "links": {
                "versions": [
                    "1",
                    "2",
                    "3"
                ],
                "history_current": "1",
                "history": [
                    "1"
                ]
            }
        },
        {
            "id": "2",
            "slug": "android_webview",
            "name": {
                "en": "Android Webview"
            },
            "note": null,
            "links": {
                "versions": [
                    "4"
                ],
                "history_current": "2",
                "history": [
                    "2"
                ]
            }
        },
        {
            "id": "3",
            "slug": "blackberry",
            "name": {
                "en": "BlackBerry Browser"
            },
            "note": null,
            "links": {
                "versions": [
                    "5",
                    "6",
                    "7"
                ],
                "history_current": "3",
                "history": [
                    "3"
                ]
            }
        },
        {
            "id": "4",
            "slug": "chrome_desktop",
            "name": {
                "en": "Chrome for Desktop"
            },
            "note": null,
            "links": {
                "versions": [
                    "8",
                    "9",
                    "10"
                ],
                "history_current": "4",
                "history": [
                    "4"
                ]
            }
        },
        {
            "id": "5",
            "slug": "chrome_for_android",
            "name": {
                "en": "Chrome for Android"
            },
            "note": null,
            "links": {
                "versions": [
                    "11",
                    "12",
                    "13"
                ],
                "history_current": "5",
                "history": [
                    "5"
                ]
            }
        },
        {
            "id": "6",
            "slug": "firefox_android",
            "name": {
                "en": "Firefox for Android"
            },
            "note": null,
            "links": {
                "versions": [
                    "14",
                    "15",
                    "16"
                ],
                "history_current": "6",
                "history": [
                    "6"
                ]
            }
        },
        {
            "id": "7",
            "slug": "firefox_desktop",
            "name": {
                "en": "Firefox for Desktop"
            },
            "note": null,
            "links": {
                "versions": [
                    "17",
                    "18",
                    "19",
                    "20",
                    "21"
                ],
                "history_current": "7",
                "history": [
                    "7"
                ]
            }
        },
        {
            "id": "8",
            "slug": "firefox_os",
            "name": {
                "en": "Firefox OS"
            },
            "note": null,
            "links": {
                "versions": [
                    "22",
                    "23",
                    "24"
                ],
                "history_current": "8",
                "history": [
                    "8"
                ]
            }
        },
        {
            "id": "9",
            "slug": "ie_desktop",
            "name": {
                "en": "Internet Explorer for Desktop"
            },
            "note": null,
            "links": {
                "versions": [
                    "25",
                    "26",
                    "27",
                    "28",
                    "29"
                ],
                "history_current": "9",
                "history": [
                    "9"
                ]
            }
        },
        {
            "id": "10",
            "slug": "ie_mobile",
            "name": {
                "en": "Internet Explorer Mobile"
            },
            "note": null,
            "links": {
                "versions": [
                    "30",
                    "31",
                    "32"
                ],
                "history_current": "10",
                "history": [
                    "10"
                ]
            }
        }
    ],
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    },
    "meta": {
        "pagination": {
            "browsers": {
                "previous": null,
                "next": "https://browsercompat.org/api/v1/browsers?page=2",
                "count": 15
            }
        }
    }
}

Retrieve by ID

Note: bug 1230306 is proposing switching IDs to UUIDs.

To request a single browser with a known ID:

GET /api/v1/browsers/7 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "7",
        "slug": "firefox_desktop",
        "name": {
            "en": "Firefox for Desktop"
        },
        "note": null,
        "links": {
            "versions": [
                "17",
                "18",
                "19",
                "20",
                "21"
            ],
            "history_current": "7",
            "history": [
                "7"
            ]
        }
    },
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    }
}

Retrieve by Slug

Note: bug 1078699 is proposing an alternate URL format.

To request a browser by slug:

GET /api/v1/browsers?slug=firefox_desktop HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

The response includes the desired browser, in list format:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": [
        {
            "id": "7",
            "slug": "firefox_desktop",
            "name": {
                "en": "Firefox for Desktop"
            },
            "note": null,
            "links": {
                "versions": [
                    "17",
                    "18",
                    "19",
                    "20",
                    "21"
                ],
                "history_current": "7",
                "history": [
                    "7"
                ]
            }
        }
    ],
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    },
    "meta": {
        "pagination": {
            "browsers": {
                "previous": null,
                "next": null,
                "count": 1
            }
        }
    }
}

Create

Creating browser instances require authentication with create privileges. To create a new browser instance, POST a representation with at least the required parameters. Some items (such as the id attribute and the history_current link) will be picked by the server, and will be ignored if included.

Here’s an example of creating a browser instance, with cookie-based authentication:

POST /api/v1/browsers HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Authorization: Bearer xxQLNiTUFjRL5En8nBWzSDc5tLWkV2
Content-Length: 132
Content-Type: application/vnd.api+json
{
    "browsers": {
        "slug": "amazon-silk-mobile",
        "name": {
            "en": "Amazon Silk Mobile"
        }
    }
}

A sample response is:

HTTP/1.1 201 CREATED
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "16",
        "slug": "amazon-silk-mobile",
        "name": {
            "en": "Amazon Silk Mobile"
        },
        "note": null,
        "links": {
            "versions": [],
            "history_current": "16",
            "history": [
                "16"
            ]
        }
    },
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    }
}

This, and other methods that change resources, will create a new changeset, and associate the new historical_browsers with that changeset. To assign to an existing changeset, add it to the URI:

POST /api/v1/browsers?use_changeset=4 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Authorization: Bearer xxQLNiTUFjRL5En8nBWzSDc5tLWkV2
Content-Length: 220
Content-Type: application/vnd.api+json
{
    "browsers": {
        "slug": "nintendo-ds",
        "name": {
            "en": "Nintendo DS Browser",
            "ja": "\u30cb\u30f3\u30c6\u30f3\u30c9\u30fc\uff24\uff33\u30d6\u30e9\u30a6\u30b6"
        }
    }
}

A sample response is:

HTTP/1.1 201 CREATED
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "18",
        "slug": "nintendo-ds",
        "name": {
            "en": "Nintendo DS Browser",
            "ja": "ニンテンドーDSブラウザ"
        },
        "note": null,
        "links": {
            "versions": [],
            "history_current": "18",
            "history": [
                "18"
            ]
        }
    },
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    }
}

Update

Updating a browser instance require authentication with create privileges. Some items (such as the id attribute and history links) can not be changed, and will be ignored if included. A successful update will return a 200 OK, add a new ID to the history links list, and update the history_current link.

This update changes the English name from “Internet Explorer” to “Microsoft Internet Explorer”:

PUT /api/v1/browsers/9 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Authorization: Bearer xxQLNiTUFjRL5En8nBWzSDc5tLWkV2
Content-Length: 1000
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "9",
        "slug": "ie_desktop",
        "name": {
            "en": "Microsoft Internet Explorer"
        },
        "note": null,
        "links": {
            "history": [
                "9"
            ],
            "history_current": "9",
            "versions": [
                "25",
                "26",
                "27",
                "28",
                "29"
            ]
        }
    },
    "links": {
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        }
    }
}

With this response:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "9",
        "slug": "ie_desktop",
        "name": {
            "en": "Microsoft Internet Explorer"
        },
        "note": null,
        "links": {
            "versions": [
                "25",
                "26",
                "27",
                "28",
                "29"
            ],
            "history_current": "19",
            "history": [
                "19",
                "9"
            ]
        }
    },
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    }
}

Partial Update

An update can just update the target fields. This is a further request to change the English name for the Internet Explorer browser.

PUT /api/v1/browsers/9 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Authorization: Bearer xxQLNiTUFjRL5En8nBWzSDc5tLWkV2
Content-Length: 78
Content-Type: application/vnd.api+json
{
    "browsers": {
        "name": {
            "en": "IE"
        }
    }
}

With this response:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "9",
        "slug": "ie_desktop",
        "name": {
            "en": "IE"
        },
        "note": null,
        "links": {
            "versions": [
                "25",
                "26",
                "27",
                "28",
                "29"
            ],
            "history_current": "20",
            "history": [
                "20",
                "19",
                "9"
            ]
        }
    },
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    }
}

Reverting to a previous instance

To revert to an earlier instance, set the history_current link to a previous value. This resets the content and creates a new historical_browsers object:

PUT /api/v1/browsers/9 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Authorization: Bearer xxQLNiTUFjRL5En8nBWzSDc5tLWkV2
Content-Length: 91
Content-Type: application/vnd.api+json
{
    "browsers": {
        "links": {
            "history_current": "9"
        }
    }
}

With this response (note that the name and version order have reverted to the original values):

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "9",
        "slug": "ie_desktop",
        "name": {
            "en": "Internet Explorer for Desktop"
        },
        "note": null,
        "links": {
            "versions": [
                "25",
                "26",
                "27",
                "29",
                "28"
            ],
            "history_current": "22",
            "history": [
                "22",
                "21",
                "20",
                "19",
                "9"
            ]
        }
    },
    "links": {
        "browsers.versions": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{browsers.versions}"
        },
        "browsers.history_current": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history_current}"
        },
        "browsers.history": {
            "type": "historical_browsers",
            "href": "https://browsercompat.org/api/v1/historical_browsers/{browsers.history}"
        }
    }
}

Deletion

To delete a browser:

DELETE /api/v1/browsers/16 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Authorization: Bearer xxQLNiTUFjRL5En8nBWzSDc5tLWkV2
Content-Length: 0

The response has no body:

HTTP/1.1 204 NO CONTENT

Reverting a deletion

Reverting deletions is not currently possible, and is tracked in bug 1159349.

Versions

A version is a specific release of a Browser.

The versions representation includes:

  • attributes
    • id (server selected) - Database ID
    • version (write-once) - Version of browser. Numeric or text string, depending on the status (see table below).
    • release_day - Day that browser was released in ISO 8601 format, or null if unknown.
    • retirement_day - Approximate day the browser was “retired” (stopped being a current browser), in ISO 8601 format, or null if unknown.
    • status - One of beta, current, future, retired-beta, retired, or unknown (see table below).
    • release_notes_uri (localized) - URI of release notes for this version, or null if none.
    • note (localized) - Engine, OS, etc. information, or null
    • order (read-only) - The relative order among versions for this browser. The order can be changed on the browser resource.
  • links
    • browser - The related browser
    • supports (many) - Associated supports, in ID order. Changes are ignored; work on the supports to add, change, or remove.
    • history_current (one) - Current historical_versions. Set to a value from history to revert to that version.
    • history (many) - Associated historical_versions, in time order (most recent first). Changes are ignored.

The version is either a numeric value, such as "11.0", or text, such as "Nightly". The version format depends on the chosen status:

Status Version Meaning
beta numeric A release candidate suggested for early adopters or testers
current numeric or the text "current" A current and preferred release for most users
future text such as "Nightly" A named but unnumbered future release
retired-beta numeric An old beta version, replaced by a new beta or release
retired numeric An old released version no longer recommended for users
unknown numeric A release with an unknown status

To get a single version:

GET /api/v1/versions/21 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "versions": {
        "id": "21",
        "version": "16.0",
        "release_day": "2012-10-09",
        "retirement_day": "2012-11-20",
        "status": "retired",
        "release_notes_uri": {
            "en": "https://developer.mozilla.org/en/Firefox/Releases/16",
            "de": "https://developer.mozilla.org/de/Firefox/Releases/16",
            "es": "https://developer.mozilla.org/es/Firefox/Releases/16",
            "fr": "https://developer.mozilla.org/fr/Firefox/Versions/16",
            "ja": "https://developer.mozilla.org/ja/Firefox/Releases/16",
            "ko": "https://developer.mozilla.org/ko/Firefox/Releases/16",
            "pl": "https://developer.mozilla.org/pl/Firefox/Releases/16",
            "pt-PT": "https://developer.mozilla.org/pt-PT/Firefox/Releases/16",
            "ru": "https://developer.mozilla.org/ru/Firefox/Releases/16",
            "zh-CN": "https://developer.mozilla.org/zh-CN/Firefox/Releases/16",
            "zh-TW": "https://developer.mozilla.org/zh-TW/Firefox/Releases/16"
        },
        "note": null,
        "order": 4,
        "links": {
            "browser": "7",
            "supports": [
                "12",
                "22"
            ],
            "history_current": "21",
            "history": [
                "21"
            ]
        }
    },
    "links": {
        "versions.browser": {
            "type": "browsers",
            "href": "https://browsercompat.org/api/v1/browsers/{versions.browser}"
        },
        "versions.supports": {
            "type": "supports",
            "href": "https://browsercompat.org/api/v1/supports/{versions.supports}"
        },
        "versions.history_current": {
            "type": "historical_versions",
            "href": "https://browsercompat.org/api/v1/historical_versions/{versions.history_current}"
        },
        "versions.history": {
            "type": "historical_versions",
            "href": "https://browsercompat.org/api/v1/historical_versions/{versions.history}"
        }
    }
}

Features

A feature is a web technology. This could be a precise technology, such as the value cover for the CSS background-size property. It could be a hierarchical group of related technologies, such as the CSS background-size property or the set of all CSS properties. Some features correspond to a page on MDN, which will display the list of specifications and a browser compatibility table of the sub-features.

The features representation includes:

  • attributes
    • id (server selected) - Database ID
    • slug (write-once) - Unique, human-friendly slug
    • mdn_uri (optional, localized) - The URI of the language-specific MDN page that this feature was first scraped from. If the path contains unicode, it should be percent-encoded as in RFC 3987. May be used in UX or for debugging import scripts.
    • experimental - True if a feature is considered experimental, such as being non-standard or part of an non-ratified spec.
    • standardized - True if a feature is described in a standards-track spec, regardless of the spec’s maturity.
    • stable - True if a feature is considered suitable for production websites.
    • obsolete - True if a feature should not be used in new development.
    • name (canonical or localized) - Feature name. If the name is the code used by a developer, then the value is a string, and should be wrapped in a <code> block when displayed. If the name is a description of the feature, then the value is the available translations, including at least an en translation, and may include HTML markup. For example, "display" and "display: none" are canonical names for the CSS display property and one of the values for that property, while "Basic support", "<code>none, inline</code> and <code>block</code>", and "CSS Properties" are non-canonical names that should be translated.
  • links
    • references (many) - Associated references. Order can be changed by the user.
    • supports (many) - Associated supports, Order is in ID order, changes are ignored.
    • parent (one or null) - The feature one level up, or null if top-level. Can be changed by user.
    • children (many) - The features that have this feature as parent, in display order. Can be an empty list, for “leaf” features. Can be re-ordered by the user.
    • history_current (one) - Current historical_features. User can set to a valid history to revert to that version.
    • history (many) - Associated historical_features, in time order (most recent first). Changes are ignored.

To get a specific feature (in this case, a leaf feature with a translated name):

GET /api/v1/features/12 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "features": {
        "id": "12",
        "slug": "web-css-transform-three-value-syntax",
        "mdn_uri": null,
        "experimental": false,
        "standardized": true,
        "stable": true,
        "obsolete": false,
        "name": {
            "en": "Three-value syntax",
            "es": "Sintaxis con tres valores",
            "ja": "3-値構文"
        },
        "links": {
            "parent": "10",
            "children": [],
            "references": [],
            "supports": [
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26"
            ],
            "history_current": "12",
            "history": [
                "12"
            ]
        }
    },
    "links": {
        "features.parent": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{features.parent}"
        },
        "features.children": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{features.children}"
        },
        "features.references": {
            "type": "references",
            "href": "https://browsercompat.org/api/v1/references/{features.references}"
        },
        "features.supports": {
            "type": "supports",
            "href": "https://browsercompat.org/api/v1/supports/{features.supports}"
        },
        "features.history_current": {
            "type": "historical_features",
            "href": "https://browsercompat.org/api/v1/historical_features/{features.history_current}"
        },
        "features.history": {
            "type": "historical_features",
            "href": "https://browsercompat.org/api/v1/historical_features/{features.history}"
        }
    }
}

Here’s an example of a branch feature with a canonical name (the parent of the previous example):

GET /api/v1/features/10 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "features": {
        "id": "10",
        "slug": "web-css-transform-origin",
        "mdn_uri": {
            "en": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin",
            "es": "https://developer.mozilla.org/es/docs/Web/CSS/transform-origin",
            "fr": "https://developer.mozilla.org/fr/docs/Web/CSS/transform-origin",
            "ja": "https://developer.mozilla.org/ja/docs/Web/CSS/transform-origin"
        },
        "experimental": false,
        "standardized": true,
        "stable": true,
        "obsolete": false,
        "name": "transform-origin",
        "links": {
            "parent": "2",
            "children": [
                "11",
                "12"
            ],
            "references": [
                "4"
            ],
            "supports": [],
            "history_current": "10",
            "history": [
                "10"
            ]
        }
    },
    "links": {
        "features.parent": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{features.parent}"
        },
        "features.children": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{features.children}"
        },
        "features.references": {
            "type": "references",
            "href": "https://browsercompat.org/api/v1/references/{features.references}"
        },
        "features.supports": {
            "type": "supports",
            "href": "https://browsercompat.org/api/v1/supports/{features.supports}"
        },
        "features.history_current": {
            "type": "historical_features",
            "href": "https://browsercompat.org/api/v1/historical_features/{features.history_current}"
        },
        "features.history": {
            "type": "historical_features",
            "href": "https://browsercompat.org/api/v1/historical_features/{features.history}"
        }
    }
}

Supports

A support is an assertion that a particular Version of a Browser supports (or does not support) a feature.

The support representation includes:

  • attributes
    • id (server selected) - Database ID
    • support - Assertion of support of the version for the feature, one of "yes", "no", "partial", or "unknown"
    • prefix - Prefix used to enable support, such as “moz”
    • prefix_mandatory - True if the prefix is required
    • alternate_name - An alternate name associated with this feature, such as "RTCPeerConnectionIdentityEvent"
    • alternate_name_mandatory - True if the alternate name is required
    • requires_config - A configuration string required to enable the feature, such as "media.peerconnection.enabled=on"
    • default_config - The configuration string in the shipping browser, such as "media.peerconnection.enabled=off"
    • protected - True if the feature requires additional steps to enable in order to protect the user’s security or privacy, such as geolocation and the Bluetooth API.
    • note (localized) - Note on support, designed for display after a compatibility table, can contain HTML
  • links
    • version (one) - The associated version. Cannot be changed by the user after creation.
    • feature (one) - The associated feature. Cannot be changed by the user after creation. The version and feature combo must be unique.
    • history_current (one) - Current historical_supports. Can be changed to a valid history to revert to that version.
    • history (many) - Associated historical_supports in time order (most recent first). Changes are ignored.

To get a single support:

GET /api/v1/supports/22 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "supports": {
        "id": "22",
        "support": "yes",
        "prefix": null,
        "prefix_mandatory": false,
        "alternate_name": null,
        "alternate_mandatory": false,
        "requires_config": null,
        "default_config": null,
        "protected": false,
        "note": null,
        "links": {
            "version": "21",
            "feature": "12",
            "history_current": "22",
            "history": [
                "22"
            ]
        }
    },
    "links": {
        "supports.version": {
            "type": "versions",
            "href": "https://browsercompat.org/api/v1/versions/{supports.version}"
        },
        "supports.feature": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{supports.feature}"
        },
        "supports.history_current": {
            "type": "historical_supports",
            "href": "https://browsercompat.org/api/v1/historical_supports/{supports.history_current}"
        },
        "supports.history": {
            "type": "historical_supports",
            "href": "https://browsercompat.org/api/v1/historical_supports/{supports.history}"
        }
    }
}

Specifications

A specification is a standards document that specifies a web technology.

The specification representation includes:

  • attributes
    • id (server selected) - Database ID
    • slug - Unique, human-friendly key
    • mdn_key - Key used in the KumaScript macros SpecName and Spec2.
    • name (localized) - Specification name
    • uri (localized) - Specification URI, without subpath and anchor
  • links
    • maturity (one) - Associated maturity. Can be changed by the user.
    • sections (many) - Associated sections. The order can be changed by the user.
    • history_current (one) - Current historical_specifications. Can be changed to a valid history to revert to that version.
    • history (many) - Associated historical_specifications in time order (most recent first). Changes are ignored.

To get a single specification:

GET /api/v1/specifications/2 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "specifications": {
        "id": "2",
        "slug": "css2_1",
        "mdn_key": "CSS2.1",
        "name": {
            "en": "CSS Level&nbsp;2 (Revision&nbsp;1)"
        },
        "uri": {
            "en": "http://www.w3.org/TR/CSS2/"
        },
        "links": {
            "maturity": "1",
            "sections": [
                "2"
            ],
            "history_current": "2",
            "history": [
                "2"
            ]
        }
    },
    "links": {
        "specifications.maturity": {
            "type": "maturities",
            "href": "https://browsercompat.org/api/v1/maturities/{specifications.maturity}"
        },
        "specifications.sections": {
            "type": "sections",
            "href": "https://browsercompat.org/api/v1/sections/{specifications.sections}"
        },
        "specifications.history_current": {
            "type": "historical_specifications",
            "href": "https://browsercompat.org/api/v1/historical_specifications/{specifications.history_current}"
        },
        "specifications.history": {
            "type": "historical_specifications",
            "href": "https://browsercompat.org/api/v1/historical_specifications/{specifications.history}"
        }
    }
}

Sections

A section refers to a specific area of a specification document.

The section representation includes:

  • attributes
    • id (server selected) - Database ID
    • number (optional, localized) - The section number
    • name (localized) - Section name
    • subpath (localized, optional) - A subpage (possibly with an #anchor) to get to the subsection in the doc. Can be empty string.
  • links
    • specification (one) - The specification. Can be changed by the user.
    • references (many) - The associated references. In ID order, changes are ignored.
    • history_current (one) - Current historical_sections. Can be changed to a valid history to revert to that version.
    • history (many) - Associated historical_sections in time order (most recent first). Changes are ignored.

To get a single section:

GET /api/v1/sections/3 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "sections": {
        "id": "3",
        "number": {
            "en": "16"
        },
        "name": {
            "en": "The float property"
        },
        "subpath": {
            "en": "#the-float-property"
        },
        "links": {
            "references": [
                "3"
            ],
            "specification": "3",
            "history_current": "3",
            "history": [
                "3"
            ]
        }
    },
    "links": {
        "sections.references": {
            "type": "references",
            "href": "https://browsercompat.org/api/v1/references/{sections.references}"
        },
        "sections.specification": {
            "type": "specifications",
            "href": "https://browsercompat.org/api/v1/specifications/{sections.specification}"
        },
        "sections.history_current": {
            "type": "historical_sections",
            "href": "https://browsercompat.org/api/v1/historical_sections/{sections.history_current}"
        },
        "sections.history": {
            "type": "historical_sections",
            "href": "https://browsercompat.org/api/v1/historical_sections/{sections.history}"
        }
    }
}

References

A reference ties a specification section to a feature.

The reference representation includes:

  • attributes
    • id (server selected) - Database ID
    • note (localized, optional) - Notes for this reference
  • links
    • feature (one) - The feature. Can be changed by the user.
    • section (one) - The section. Can be changed by the user.
    • history_current (one) - Current historical_references. Can be changed to a valid history to revert to that version.
    • history (many) - Associated historical_references in time order (most recent first). Changes are ignored.

To get a single reference:

GET /api/v1/references/3 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "references": {
        "id": "3",
        "note": {
            "en": "Lots of new values, not all clearly defined yet. Any differences in behavior unrelated to new features are expected to be unintentional; please report."
        },
        "links": {
            "feature": "5",
            "section": "3",
            "history_current": "3",
            "history": [
                "3"
            ]
        }
    },
    "links": {
        "references.feature": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{references.feature}"
        },
        "references.section": {
            "type": "sections",
            "href": "https://browsercompat.org/api/v1/sections/{references.section}"
        },
        "references.history_current": {
            "type": "historical_references",
            "href": "https://browsercompat.org/api/v1/historical_references/{references.history_current}"
        },
        "references.history": {
            "type": "historical_references",
            "href": "https://browsercompat.org/api/v1/historical_references/{references.history}"
        }
    }
}

Maturities

A maturity refers to the maturity of a specification document.

The maturity representation includes:

  • attributes
    • id (server selected) - Database ID
    • slug - A human-friendly identifier for this maturity. When applicable, it matches the key in the KumaScript macro Spec2
    • name (localized) - Status name
  • links
    • specifications (many) - Associated specifications. In ID order, changes are ignored.
    • history_current (one) - Current historical_maturities. Can be changed to a valid history to revert to that version.
    • history (many) - Associated historical_maturities in time order (most recent first). Changes are ignored.

To get a single maturity:

GET /api/v1/maturities/1 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "maturities": {
        "id": "1",
        "slug": "REC",
        "name": {
            "en": "Recommendation",
            "de": "Empfehlung",
            "ja": "勧告",
            "ru": "Рекомендация"
        },
        "links": {
            "specifications": [
                "1",
                "2"
            ],
            "history_current": "1",
            "history": [
                "1"
            ]
        }
    },
    "links": {
        "maturities.specifications": {
            "type": "specifications",
            "href": "https://browsercompat.org/api/v1/specifications/{maturities.specifications}"
        },
        "maturities.history_current": {
            "type": "historical_maturities",
            "href": "https://browsercompat.org/api/v1/historical_maturities/{maturities.history_current}"
        },
        "maturities.history": {
            "type": "historical_maturities",
            "href": "https://browsercompat.org/api/v1/historical_maturities/{maturities.history}"
        }
    }
}