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 instances (paginated)
  • POST /api/v1/<type> - Create new instance
  • GET /api/v1/<type>/<id> - Retrieve an instance
  • PUT /api/v1/<type>/<id> - Update an instance
  • DELETE /api/v1/<type>/<id> - Delete instance

Additional features may be added as needed. See the JSON API docs for ideas and what format they will take.

Because the operations are similar, only browsers has complete operations examples, and others just show retrieving an instance (GET /api/v1/<type>/<id>).

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 represents desktop Firefox, safari represents desktop Safari, and firefox-mobile represents Firefox Mobile.

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.

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"
            },
            "note": null,
            "links": {
                "history": [
                    "1"
                ],
                "history_current": "1",
                "versions": [
                    "1",
                    "2",
                    "3"
                ]
            }
        },
        {
            "id": "2",
            "slug": "blackberry",
            "name": {
                "en": "BlackBerry"
            },
            "note": null,
            "links": {
                "history": [
                    "2"
                ],
                "history_current": "2",
                "versions": [
                    "4",
                    "5",
                    "6"
                ]
            }
        },
        {
            "id": "3",
            "slug": "chrome",
            "name": {
                "en": "Chrome"
            },
            "note": null,
            "links": {
                "history": [
                    "3"
                ],
                "history_current": "3",
                "versions": [
                    "7",
                    "8",
                    "9"
                ]
            }
        },
        {
            "id": "4",
            "slug": "chrome_for_android",
            "name": {
                "en": "Chrome for Android"
            },
            "note": null,
            "links": {
                "history": [
                    "4"
                ],
                "history_current": "4",
                "versions": [
                    "10",
                    "11",
                    "12"
                ]
            }
        },
        {
            "id": "5",
            "slug": "chrome_mobile",
            "name": {
                "en": "Chrome Mobile"
            },
            "note": null,
            "links": {
                "history": [
                    "5"
                ],
                "history_current": "5",
                "versions": [
                    "13"
                ]
            }
        },
        {
            "id": "6",
            "slug": "firefox",
            "name": {
                "en": "Firefox"
            },
            "note": null,
            "links": {
                "history": [
                    "6"
                ],
                "history_current": "6",
                "versions": [
                    "14",
                    "15",
                    "16",
                    "17",
                    "18"
                ]
            }
        },
        {
            "id": "7",
            "slug": "firefox_mobile",
            "name": {
                "en": "Firefox Mobile"
            },
            "note": null,
            "links": {
                "history": [
                    "7"
                ],
                "history_current": "7",
                "versions": [
                    "19",
                    "20",
                    "21"
                ]
            }
        },
        {
            "id": "8",
            "slug": "firefox_os",
            "name": {
                "en": "Firefox OS"
            },
            "note": null,
            "links": {
                "history": [
                    "8"
                ],
                "history_current": "8",
                "versions": [
                    "22",
                    "23",
                    "24"
                ]
            }
        },
        {
            "id": "9",
            "slug": "ie_mobile",
            "name": {
                "en": "IE Mobile"
            },
            "note": null,
            "links": {
                "history": [
                    "9"
                ],
                "history_current": "9",
                "versions": [
                    "25",
                    "26",
                    "27"
                ]
            }
        },
        {
            "id": "10",
            "slug": "internet_explorer",
            "name": {
                "en": "Internet Explorer"
            },
            "note": null,
            "links": {
                "history": [
                    "10"
                ],
                "history_current": "10",
                "versions": [
                    "28",
                    "29",
                    "30",
                    "31",
                    "32"
                ]
            }
        }
    ],
    "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}"
        }
    },
    "meta": {
        "pagination": {
            "browsers": {
                "previous": null,
                "next": "https://browsercompat.org/api/v1/browsers?page=2",
                "count": 15
            }
        }
    }
}

Retrieve by ID

To request a single browser with a known ID:

GET /api/v1/browsers/6 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": "6",
        "slug": "firefox",
        "name": {
            "en": "Firefox"
        },
        "note": null,
        "links": {
            "history": [
                "6"
            ],
            "history_current": "6",
            "versions": [
                "14",
                "15",
                "16",
                "17",
                "18"
            ]
        }
    },
    "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}"
        }
    }
}

Retrieve by Slug

To request a browser by slug:

GET /api/v1/browsers?slug=firefox 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": "6",
            "slug": "firefox",
            "name": {
                "en": "Firefox"
            },
            "note": null,
            "links": {
                "history": [
                    "6"
                ],
                "history_current": "6",
                "versions": [
                    "14",
                    "15",
                    "16",
                    "17",
                    "18"
                ]
            }
        }
    ],
    "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}"
        }
    },
    "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:

POST /api/v1/browsers HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 132
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
    "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": {
            "history": [
                "16"
            ],
            "history_current": "16",
            "versions": []
        }
    },
    "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}"
        }
    }
}

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?changeset=4 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 220
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
    "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": {
            "history": [
                "18"
            ],
            "history_current": "18",
            "versions": []
        }
    },
    "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}"
        }
    }
}

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/10 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 1010
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
    "browsers": {
        "id": "10",
        "slug": "internet_explorer",
        "name": {
            "en": "Microsoft Internet Explorer"
        },
        "note": null,
        "links": {
            "history": [
                "10"
            ],
            "history_current": "10",
            "versions": [
                "28",
                "29",
                "30",
                "31",
                "32"
            ]
        }
    },
    "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": "10",
        "slug": "internet_explorer",
        "name": {
            "en": "Microsoft Internet Explorer"
        },
        "note": null,
        "links": {
            "history": [
                "19",
                "10"
            ],
            "history_current": "19",
            "versions": [
                "28",
                "29",
                "30",
                "31",
                "32"
            ]
        }
    },
    "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}"
        }
    }
}

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/10 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 78
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
    "browsers": {
        "name": {
            "en": "IE"
        }
    }
}

With this response:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "10",
        "slug": "internet_explorer",
        "name": {
            "en": "IE"
        },
        "note": null,
        "links": {
            "history": [
                "20",
                "19",
                "10"
            ],
            "history_current": "20",
            "versions": [
                "28",
                "29",
                "30",
                "31",
                "32"
            ]
        }
    },
    "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}"
        }
    }
}

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/10 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 92
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
    "browsers": {
        "links": {
            "history_current": "10"
        }
    }
}

With this response:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "browsers": {
        "id": "10",
        "slug": "internet_explorer",
        "name": {
            "en": "Internet Explorer"
        },
        "note": null,
        "links": {
            "history": [
                "22",
                "21",
                "20",
                "19",
                "10"
            ],
            "history_current": "22",
            "versions": [
                "28",
                "29",
                "30",
                "32",
                "31"
            ]
        }
    },
    "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}"
        }
    }
}

Deletion

To delete a browser:

DELETE /api/v1/browsers/16 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 0
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn

The response has no body:

HTTP/1.1 204 NO CONTENT

Reverting a deletion

Reverting deletions is not currently possible.

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 (a numbered release candidate suggested for early adopters or testers), current (current version, the preferred download or update for users), future (a named but unnumbered planned future release), retired-beta (old beta version, replaced by a new beta or release), retired (old version, no longer the preferred download for any platform), or unknown (status of this version is unknown)
    • 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 amoung 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
beta numeric
current numeric or the text "current"
future text
retired-beta numeric
retired numeric
unknown numeric

To get a single version:

GET /api/v1/versions/18 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": "18",
        "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": "6",
            "supports": [
                "12",
                "22"
            ],
            "history": [
                "18"
            ],
            "history_current": "18"
        }
    },
    "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": {
            "type": "historical_versions",
            "href": "https://browsercompat.org/api/v1/historical_versions/{versions.history}"
        },
        "versions.history_current": {
            "type": "historical_versions",
            "href": "https://browsercompat.org/api/v1/historical_versions/{versions.history_current}"
        }
    }
}

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 heirarchical 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
    • sections (many) - Associated sections. 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/13 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": "13",
        "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": {
            "sections": [],
            "supports": [
                "20",
                "21",
                "22",
                "23",
                "24",
                "25",
                "26"
            ],
            "parent": "10",
            "children": [],
            "history_current": "13",
            "history": [
                "13"
            ]
        }
    },
    "links": {
        "features.sections": {
            "type": "sections",
            "href": "https://browsercompat.org/api/v1/sections/{features.sections}"
        },
        "features.supports": {
            "type": "supports",
            "href": "https://browsercompat.org/api/v1/supports/{features.supports}"
        },
        "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.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": {
            "sections": [
                "4"
            ],
            "supports": [],
            "parent": "2",
            "children": [
                "11",
                "13"
            ],
            "history_current": "10",
            "history": [
                "10"
            ]
        }
    },
    "links": {
        "features.sections": {
            "type": "sections",
            "href": "https://browsercompat.org/api/v1/sections/{features.sections}"
        },
        "features.supports": {
            "type": "supports",
            "href": "https://browsercompat.org/api/v1/supports/{features.supports}"
        },
        "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.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": "18",
            "feature": "13",
            "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.
    • note (localized, optional) - Notes for this section
  • links
    • specification (one) - The specification. Can be changed by the user.
    • features (many) - The associated features. 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"
        },
        "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": {
            "specification": "3",
            "features": [
                "5"
            ],
            "history_current": "3",
            "history": [
                "3"
            ]
        }
    },
    "links": {
        "sections.specification": {
            "type": "specifications",
            "href": "https://browsercompat.org/api/v1/specifications/{sections.specification}"
        },
        "sections.features": {
            "type": "features",
            "href": "https://browsercompat.org/api/v1/features/{sections.features}"
        },
        "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}"
        }
    }
}

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 applicabile, it match 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}"
        }
    }
}