Views¶
A View is a combination of resources for a particular presentation. It is suitable for anonymous viewing of content. It uses the flexibility of the JSON API specification to include a basket of related resources in a response, but doesn’t use the official method of Inclusion of Related Resources.
View a Feature¶
This view collects the data for a feature, including the related resources needed to display it on MDN.
Here is a simple example, the view for the CSS property float:
GET /api/v2/view_features/5 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
{
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5"
},
"data": {
"type": "features",
"id": "5",
"attributes": {
"slug": "web-css-float",
"mdn_uri": {
"en": "https://developer.mozilla.org/en-US/docs/Web/CSS/float",
"de": "https://developer.mozilla.org/de/docs/Web/CSS/float",
"es": "https://developer.mozilla.org/es/docs/Web/CSS/float",
"ja": "https://developer.mozilla.org/ja/docs/Web/CSS/float",
"ru": "https://developer.mozilla.org/ru/docs/Web/CSS/float"
},
"experimental": false,
"standardized": true,
"stable": true,
"obsolete": false,
"name": "float"
},
"relationships": {
"parent": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/parent",
"related": "https://browsercompat.org/api/v2/view_features/5/parent"
},
"data": {
"type": "features",
"id": "2"
}
},
"children": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/children",
"related": "https://browsercompat.org/api/v2/view_features/5/children"
},
"data": [
{
"type": "features",
"id": "6"
}
]
},
"sections": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/sections",
"related": "https://browsercompat.org/api/v2/view_features/5/sections"
},
"data": [
{
"type": "sections",
"id": "1"
},
{
"type": "sections",
"id": "2"
},
{
"type": "sections",
"id": "3"
}
]
},
"supports": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/supports",
"related": "https://browsercompat.org/api/v2/view_features/5/supports"
},
"data": []
},
"history_current": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/history_current",
"related": "https://browsercompat.org/api/v2/view_features/5/history_current"
},
"data": {
"type": "historical_features",
"id": "5"
}
},
"history": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/history",
"related": "https://browsercompat.org/api/v2/view_features/5/history"
},
"data": [
{
"type": "historical_features",
"id": "5"
}
]
}
}
},
"included": [
{
"type": "browsers",
"id": "1",
"attributes": {
"slug": "android",
"name": {
"en": "Android Browser"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/1"
}
},
{
"type": "browsers",
"id": "2",
"attributes": {
"slug": "android_webview",
"name": {
"en": "Android Webview"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/2"
}
},
{
"type": "browsers",
"id": "4",
"attributes": {
"slug": "chrome_desktop",
"name": {
"en": "Chrome for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "4"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "4"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/4"
}
},
{
"type": "browsers",
"id": "6",
"attributes": {
"slug": "firefox_android",
"name": {
"en": "Firefox for Android"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "6"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "6"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/6"
}
},
{
"type": "browsers",
"id": "7",
"attributes": {
"slug": "firefox_desktop",
"name": {
"en": "Firefox for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "7"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "7"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/7"
}
},
{
"type": "browsers",
"id": "9",
"attributes": {
"slug": "ie_desktop",
"name": {
"en": "Internet Explorer for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "24"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "24"
},
{
"type": "historical_browsers",
"id": "23"
},
{
"type": "historical_browsers",
"id": "22"
},
{
"type": "historical_browsers",
"id": "21"
},
{
"type": "historical_browsers",
"id": "20"
},
{
"type": "historical_browsers",
"id": "19"
},
{
"type": "historical_browsers",
"id": "9"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/9"
}
},
{
"type": "browsers",
"id": "10",
"attributes": {
"slug": "ie_mobile",
"name": {
"en": "Internet Explorer Mobile"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "10"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "10"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/10"
}
},
{
"type": "browsers",
"id": "11",
"attributes": {
"slug": "opera_desktop",
"name": {
"en": "Opera for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "11"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "11"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/11"
}
},
{
"type": "browsers",
"id": "14",
"attributes": {
"slug": "safari_desktop",
"name": {
"en": "Safari for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "14"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "14"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/14"
}
},
{
"type": "browsers",
"id": "15",
"attributes": {
"slug": "safari_ios",
"name": {
"en": "Safari for iOS"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "15"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "15"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/15"
}
},
{
"type": "versions",
"id": "2",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/2"
}
},
{
"type": "versions",
"id": "4",
"attributes": {
"version": "current",
"release_day": null,
"retirement_day": null,
"status": "current",
"release_notes_uri": null,
"note": null,
"order": 0
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "2"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "4"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "4"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/4"
}
},
{
"type": "versions",
"id": "9",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "4"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "9"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "9"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/9"
}
},
{
"type": "versions",
"id": "15",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "15"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "15"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/15"
}
},
{
"type": "versions",
"id": "18",
"attributes": {
"version": "1.0",
"release_day": "2004-11-09",
"retirement_day": "2005-11-29",
"status": "retired",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "7"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "18"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "18"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/18"
}
},
{
"type": "versions",
"id": "26",
"attributes": {
"version": "4.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "9"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "26"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "26"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/26"
}
},
{
"type": "versions",
"id": "32",
"attributes": {
"version": "6.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 2
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "10"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "32"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "32"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/32"
}
},
{
"type": "versions",
"id": "34",
"attributes": {
"version": "7.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "11"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "34"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "34"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/34"
}
},
{
"type": "versions",
"id": "42",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "14"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "42"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "42"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/42"
}
},
{
"type": "versions",
"id": "44",
"attributes": {
"version": "5.1",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 3
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "14"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "44"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "44"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/44"
}
},
{
"type": "versions",
"id": "46",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "15"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "46"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "46"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/46"
}
},
{
"type": "supports",
"id": "1",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "2"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/1"
}
},
{
"type": "supports",
"id": "2",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "9"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/2"
}
},
{
"type": "supports",
"id": "3",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "15"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/3"
}
},
{
"type": "supports",
"id": "4",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "18"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "4"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "4"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/4"
}
},
{
"type": "supports",
"id": "5",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "26"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "5"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "5"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/5"
}
},
{
"type": "supports",
"id": "6",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "32"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "6"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "6"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/6"
}
},
{
"type": "supports",
"id": "7",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "34"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "7"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "7"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/7"
}
},
{
"type": "supports",
"id": "8",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "42"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "8"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "8"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/8"
}
},
{
"type": "supports",
"id": "9",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "44"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "9"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "9"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/9"
}
},
{
"type": "supports",
"id": "10",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "46"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "10"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "10"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/10"
}
},
{
"type": "supports",
"id": "27",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "4"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "27"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "27"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/27"
}
},
{
"type": "maturities",
"id": "1",
"attributes": {
"slug": "REC",
"name": {
"en": "Recommendation",
"de": "Empfehlung",
"ja": "勧告",
"ru": "Рекомендация"
}
},
"relationships": {
"history_current": {
"data": {
"type": "historical_maturities",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_maturities",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/maturities/1"
}
},
{
"type": "maturities",
"id": "2",
"attributes": {
"slug": "WD",
"name": {
"en": "Working Draft",
"de": "Arbeitsentwurf",
"ja": "草案",
"ru": "Рабочий черновик"
}
},
"relationships": {
"history_current": {
"data": {
"type": "historical_maturities",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_maturities",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/maturities/2"
}
},
{
"type": "specifications",
"id": "1",
"attributes": {
"slug": "css1",
"mdn_key": "CSS1",
"name": {
"en": "CSS Level 1"
},
"uri": {
"en": "http://www.w3.org/TR/CSS1/"
}
},
"relationships": {
"maturity": {
"data": {
"type": "maturities",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_specifications",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_specifications",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/specifications/1"
}
},
{
"type": "specifications",
"id": "2",
"attributes": {
"slug": "css2_1",
"mdn_key": "CSS2.1",
"name": {
"en": "CSS Level 2 (Revision 1)"
},
"uri": {
"en": "http://www.w3.org/TR/CSS2/"
}
},
"relationships": {
"maturity": {
"data": {
"type": "maturities",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_specifications",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_specifications",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/specifications/2"
}
},
{
"type": "specifications",
"id": "3",
"attributes": {
"slug": "css3_box",
"mdn_key": "CSS3 Box",
"name": {
"en": "CSS Basic Box Model"
},
"uri": {
"en": "http://dev.w3.org/csswg/css3-box/"
}
},
"relationships": {
"maturity": {
"data": {
"type": "maturities",
"id": "2"
}
},
"history_current": {
"data": {
"type": "historical_specifications",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_specifications",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/specifications/3"
}
},
{
"type": "sections",
"id": "1",
"attributes": {
"number": {
"en": "5.5.25"
},
"name": {
"en": "'float'"
},
"subpath": {
"en": "#float"
},
"note": {
"en": "Initial definition."
}
},
"relationships": {
"specification": {
"data": {
"type": "specifications",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_sections",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_sections",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/sections/1"
}
},
{
"type": "sections",
"id": "2",
"attributes": {
"number": {
"en": "9.5.1"
},
"name": {
"en": "Positioning the float: the 'float' property"
},
"subpath": {
"en": "visuren.html#float-position"
},
"note": {
"en": "No change."
}
},
"relationships": {
"specification": {
"data": {
"type": "specifications",
"id": "2"
}
},
"history_current": {
"data": {
"type": "historical_sections",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_sections",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/sections/2"
}
},
{
"type": "sections",
"id": "3",
"attributes": {
"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."
}
},
"relationships": {
"specification": {
"data": {
"type": "specifications",
"id": "3"
}
},
"history_current": {
"data": {
"type": "historical_sections",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_sections",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/sections/3"
}
},
{
"type": "features",
"id": "6",
"attributes": {
"slug": "web-css-float_basic-support",
"mdn_uri": null,
"experimental": false,
"standardized": true,
"stable": true,
"obsolete": false,
"name": {
"en": "Basic Support",
"ja": "基本サポート"
}
},
"relationships": {
"parent": {
"data": {
"type": "features",
"id": "5"
}
},
"children": {
"data": []
},
"sections": {
"data": []
},
"supports": {
"data": [
{
"type": "supports",
"id": "1"
},
{
"type": "supports",
"id": "2"
},
{
"type": "supports",
"id": "3"
},
{
"type": "supports",
"id": "4"
},
{
"type": "supports",
"id": "5"
},
{
"type": "supports",
"id": "6"
},
{
"type": "supports",
"id": "7"
},
{
"type": "supports",
"id": "8"
},
{
"type": "supports",
"id": "9"
},
{
"type": "supports",
"id": "10"
},
{
"type": "supports",
"id": "27"
}
]
},
"history_current": {
"data": {
"type": "historical_features",
"id": "6"
}
},
"history": {
"data": [
{
"type": "historical_features",
"id": "6"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/features/6"
}
}
],
"meta": {
"compat_table": {
"supports": {
"5": {},
"6": {
"1": [
"1"
],
"2": [
"27"
],
"4": [
"2"
],
"6": [
"3"
],
"7": [
"4"
],
"9": [
"5"
],
"10": [
"6"
],
"11": [
"7"
],
"14": [
"8"
],
"15": [
"10"
]
}
},
"tabs": [
{
"name": {
"en": "Desktop Browsers"
},
"browsers": [
"4",
"7",
"9",
"11",
"14"
]
},
{
"name": {
"en": "Mobile Browsers"
},
"browsers": [
"1",
"2",
"6",
"10",
"15"
]
}
],
"child_pages": false,
"pagination": {
"linked.features": {
"previous": null,
"next": null,
"count": 1
}
},
"languages": [
"en",
"de",
"es",
"ja",
"ru"
],
"notes": {}
}
}
}
Generating a Compatibility Table¶
One way to use this representation is:
Parse /data and /included into an in-memory object store, so that you can load a resource given the type and ID.
- Create the “Specifications” section:
Add the
Specifications
headerCreate an HTML table with a header row “Specification”, “Status”, “Comment”
- For each id in /data/relationships/sections (
"1"
,"2"
,"3"`
): - Load the section, specification, and maturity
- Add the first column: a link to (specification).attributes.uri.(lang or en) + (section).attributes.subpath.(lang or en), with link text (specification).attributes.name.(lang or en), with title based on (section).attributes.name.(lang or en) or data.attributes.name.(lang or en).
- Add the second column: A span with class “spec-” + (maturity).attributes.slug, and the text (maturity).attributes.name.(lang or en).
- Add the third column: (maturity).attributes.notes.(lang or en), or empty string
- For each id in /data/relationships/sections (
Close the table, and add an edit button.
- Create the Browser Compatibility section:
Add The “Browser compatibility” header
- For each item in /meta/compat_table/tabs:
- Create a table with the proper name (“Desktop”, “Mobile”)
- Load the browser by ID in /browsers
- Add a column the translated browser name
- For the main feature in /data and each feature in /data/relationships/children:
Add the first column: the feature name (attributes/name). If it is a string, then wrap in
<code>
. Otherwise, use the best translation of name, in alang=(lang)
block. A good name for the main feature is “Basic Support”.Add any feature flags, such as an obsolete or experimental icon, based on the feature flags.
Load the supports reference list in /meta/compat_table/supports/(feature ID)/(browser ID)/(support IDs)
- For each browsers’ supports reference list:
- If no supports, then display ”?”
- If just one support, display “<
version
>”, or “<support
>”, depending on the defined attributes - If multiple supports, display as subcells
- Add prefixes, alternate names, config, and notes link as appropriate
Close each table, add an edit button
Add notes for displayed supports
This may be done by including the JSON in the page as sent over the wire, or loaded asynchronously, with the tables built after initial page load.
This can also be used by a “caniuse” table layout by ignoring the meta
section and displaying all the included data. This will require more
client-side processing to generate, or additional data in the <meta>
section.
Including Child Pages¶
By default, view_feature
only includes row children, which are
subfeatures that are represented as rows in the MDN table. These row children
are identified by not having a value for mdn_uri
.
There can also be page children, which are represented as more detailed
page on MDN. For example, Web/CSS has the page child Web/CSS/Display.
By default, these are not included, but can be included by setting the query
parameter child_pages=1
:
GET /api/v2/view_features/2?child_pages=1 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Updating Views with Changesets¶
Updating the page requires a sequence of requests. For example, if a user
wants to change Chrome support for <address>
from an unknown version to
version 2, you’ll have to create the version for that version,
then add the support for the support.
The first step is to create a changeset as an authenticated user:
POST /api/v2/changesets HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 173
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
"data": {
"type": "changesets",
"attributes": {
"target_resource_type": "features",
"target_resource_id": "6"
}
}
}
A sample response is:
HTTP/1.1 201 CREATED
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://browsercompat.org/api/v2/changesets"
},
"data": {
"type": "changesets",
"id": "56",
"attributes": {
"created": "2016-01-14T08:16:02.171000Z",
"modified": "2016-01-14T08:16:06.763000Z",
"closed": false,
"target_resource_type": "features",
"target_resource_id": 6
},
"relationships": {
"user": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/user",
"related": "https://browsercompat.org/api/v2/changesets/user"
},
"data": {
"type": "users",
"id": "1"
}
},
"historical_browsers": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_browsers",
"related": "https://browsercompat.org/api/v2/changesets/historical_browsers"
},
"data": []
},
"historical_features": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_features",
"related": "https://browsercompat.org/api/v2/changesets/historical_features"
},
"data": []
},
"historical_maturities": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_maturities",
"related": "https://browsercompat.org/api/v2/changesets/historical_maturities"
},
"data": []
},
"historical_sections": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_sections",
"related": "https://browsercompat.org/api/v2/changesets/historical_sections"
},
"data": []
},
"historical_specifications": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_specifications",
"related": "https://browsercompat.org/api/v2/changesets/historical_specifications"
},
"data": []
},
"historical_supports": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_supports",
"related": "https://browsercompat.org/api/v2/changesets/historical_supports"
},
"data": []
},
"historical_versions": {
"links": {
"self": "https://browsercompat.org/api/v2/changesets/relationships/historical_versions",
"related": "https://browsercompat.org/api/v2/changesets/historical_versions"
},
"data": []
}
}
}
}
Next, use the changeset ID when creating the version:
POST /api/v2/versions?changeset=56 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 338
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
"data": {
"type": "versions",
"attributes": {
"version": "2.0",
"status": "retired"
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "3"
}
}
}
}
}
A sample response is:
HTTP/1.1 201 CREATED
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://browsercompat.org/api/v2/versions?changeset=56"
},
"data": {
"type": "versions",
"id": "50",
"attributes": {
"version": "2.0",
"release_day": null,
"retirement_day": null,
"status": "retired",
"release_notes_uri": null,
"note": null,
"order": 3
},
"relationships": {
"browser": {
"links": {
"self": "https://browsercompat.org/api/v2/versions/relationships/browser",
"related": "https://browsercompat.org/api/v2/versions/browser"
},
"data": {
"type": "browsers",
"id": "3"
}
},
"supports": {
"links": {
"self": "https://browsercompat.org/api/v2/versions/relationships/supports",
"related": "https://browsercompat.org/api/v2/versions/supports"
},
"data": []
},
"history_current": {
"links": {
"self": "https://browsercompat.org/api/v2/versions/relationships/history_current",
"related": "https://browsercompat.org/api/v2/versions/history_current"
},
"data": {
"type": "historical_versions",
"id": "54"
}
},
"history": {
"links": {
"self": "https://browsercompat.org/api/v2/versions/relationships/history",
"related": "https://browsercompat.org/api/v2/versions/history"
},
"data": [
{
"type": "historical_versions",
"id": "54"
}
]
}
}
}
}
Finally, create the support:
POST /api/v2/supports?changeset=56 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 396
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
"data": {
"type": "supports",
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "50"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
}
}
}
}
A sample response is:
HTTP/1.1 201 CREATED
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://browsercompat.org/api/v2/supports?changeset=56"
},
"data": {
"type": "supports",
"id": "29",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"links": {
"self": "https://browsercompat.org/api/v2/supports/relationships/version",
"related": "https://browsercompat.org/api/v2/supports/version"
},
"data": {
"type": "versions",
"id": "50"
}
},
"feature": {
"links": {
"self": "https://browsercompat.org/api/v2/supports/relationships/feature",
"related": "https://browsercompat.org/api/v2/supports/feature"
},
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"links": {
"self": "https://browsercompat.org/api/v2/supports/relationships/history_current",
"related": "https://browsercompat.org/api/v2/supports/history_current"
},
"data": {
"type": "historical_supports",
"id": "32"
}
},
"history": {
"links": {
"self": "https://browsercompat.org/api/v2/supports/relationships/history",
"related": "https://browsercompat.org/api/v2/supports/history"
},
"data": [
{
"type": "historical_supports",
"id": "32"
}
]
}
}
}
}
The historical_versions and historical_supports resources will both refer to changeset 56, and this changeset is linked to feature 6, despite the fact that no changes were made to the feature. This will facilitate displaying a history of the compatibility tables, for the purpose of reviewing changes and reverting vandalism.
Updating View with PUT¶
view_features
supports PUT for bulk updates of support data. Here is a simple
example that adds a new subfeature without support:
PATCH /api/v2/view_features/5 HTTP/1.1
Host: browsercompat.org
Accept: application/vnd.api+json
Content-Length: 590
Content-Type: application/vnd.api+json
Cookie: csrftoken=p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn; sessionid=wurexa2wq416ftlvd5plesngwa28183h
X-Csrftoken: p7FqFyNp6hZS0FJYKyQxVmLrZILldjqn
{
"data": {
"id": "5",
"type": "features"
},
"included": [
{
"type": "features",
"id": "_New Subfeature",
"attributes": {
"slug": "web-css-float_new-subfeature",
"name": {
"en": "New Subfeature"
}
},
"relationships": {
"parent": {
"data": {
"type": "features",
"id": "5"
}
}
}
}
]
}
A sample response is:
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5"
},
"data": {
"type": "features",
"id": "5",
"attributes": {
"slug": "web-css-float",
"mdn_uri": {
"en": "https://developer.mozilla.org/en-US/docs/Web/CSS/float",
"de": "https://developer.mozilla.org/de/docs/Web/CSS/float",
"es": "https://developer.mozilla.org/es/docs/Web/CSS/float",
"ja": "https://developer.mozilla.org/ja/docs/Web/CSS/float",
"ru": "https://developer.mozilla.org/ru/docs/Web/CSS/float"
},
"experimental": false,
"standardized": true,
"stable": true,
"obsolete": false,
"name": "float"
},
"relationships": {
"parent": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/parent",
"related": "https://browsercompat.org/api/v2/view_features/5/parent"
},
"data": {
"type": "features",
"id": "2"
}
},
"children": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/children",
"related": "https://browsercompat.org/api/v2/view_features/5/children"
},
"data": [
{
"type": "features",
"id": "6"
},
{
"type": "features",
"id": "19"
}
]
},
"sections": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/sections",
"related": "https://browsercompat.org/api/v2/view_features/5/sections"
},
"data": [
{
"type": "sections",
"id": "1"
},
{
"type": "sections",
"id": "2"
},
{
"type": "sections",
"id": "3"
}
]
},
"supports": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/supports",
"related": "https://browsercompat.org/api/v2/view_features/5/supports"
},
"data": []
},
"history_current": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/history_current",
"related": "https://browsercompat.org/api/v2/view_features/5/history_current"
},
"data": {
"type": "historical_features",
"id": "27"
}
},
"history": {
"links": {
"self": "https://browsercompat.org/api/v2/view_features/5/relationships/history",
"related": "https://browsercompat.org/api/v2/view_features/5/history"
},
"data": [
{
"type": "historical_features",
"id": "27"
},
{
"type": "historical_features",
"id": "5"
}
]
}
}
},
"included": [
{
"type": "browsers",
"id": "1",
"attributes": {
"slug": "android",
"name": {
"en": "Android Browser"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/1"
}
},
{
"type": "browsers",
"id": "2",
"attributes": {
"slug": "android_webview",
"name": {
"en": "Android Webview"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/2"
}
},
{
"type": "browsers",
"id": "3",
"attributes": {
"slug": "blackberry",
"name": {
"en": "BlackBerry Browser"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/3"
}
},
{
"type": "browsers",
"id": "4",
"attributes": {
"slug": "chrome_desktop",
"name": {
"en": "Chrome for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "4"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "4"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/4"
}
},
{
"type": "browsers",
"id": "6",
"attributes": {
"slug": "firefox_android",
"name": {
"en": "Firefox for Android"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "6"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "6"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/6"
}
},
{
"type": "browsers",
"id": "7",
"attributes": {
"slug": "firefox_desktop",
"name": {
"en": "Firefox for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "7"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "7"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/7"
}
},
{
"type": "browsers",
"id": "9",
"attributes": {
"slug": "ie_desktop",
"name": {
"en": "Internet Explorer for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "24"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "24"
},
{
"type": "historical_browsers",
"id": "23"
},
{
"type": "historical_browsers",
"id": "22"
},
{
"type": "historical_browsers",
"id": "21"
},
{
"type": "historical_browsers",
"id": "20"
},
{
"type": "historical_browsers",
"id": "19"
},
{
"type": "historical_browsers",
"id": "9"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/9"
}
},
{
"type": "browsers",
"id": "10",
"attributes": {
"slug": "ie_mobile",
"name": {
"en": "Internet Explorer Mobile"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "10"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "10"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/10"
}
},
{
"type": "browsers",
"id": "11",
"attributes": {
"slug": "opera_desktop",
"name": {
"en": "Opera for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "11"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "11"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/11"
}
},
{
"type": "browsers",
"id": "14",
"attributes": {
"slug": "safari_desktop",
"name": {
"en": "Safari for Desktop"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "14"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "14"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/14"
}
},
{
"type": "browsers",
"id": "15",
"attributes": {
"slug": "safari_ios",
"name": {
"en": "Safari for iOS"
},
"note": null
},
"relationships": {
"history_current": {
"data": {
"type": "historical_browsers",
"id": "15"
}
},
"history": {
"data": [
{
"type": "historical_browsers",
"id": "15"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/browsers/15"
}
},
{
"type": "versions",
"id": "2",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/2"
}
},
{
"type": "versions",
"id": "4",
"attributes": {
"version": "current",
"release_day": null,
"retirement_day": null,
"status": "current",
"release_notes_uri": null,
"note": null,
"order": 0
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "2"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "4"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "4"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/4"
}
},
{
"type": "versions",
"id": "9",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "4"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "9"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "9"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/9"
}
},
{
"type": "versions",
"id": "15",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "15"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "15"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/15"
}
},
{
"type": "versions",
"id": "18",
"attributes": {
"version": "1.0",
"release_day": "2004-11-09",
"retirement_day": "2005-11-29",
"status": "retired",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "7"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "18"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "18"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/18"
}
},
{
"type": "versions",
"id": "26",
"attributes": {
"version": "4.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "9"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "26"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "26"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/26"
}
},
{
"type": "versions",
"id": "32",
"attributes": {
"version": "6.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 2
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "10"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "32"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "32"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/32"
}
},
{
"type": "versions",
"id": "34",
"attributes": {
"version": "7.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "11"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "34"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "34"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/34"
}
},
{
"type": "versions",
"id": "42",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "14"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "42"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "42"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/42"
}
},
{
"type": "versions",
"id": "44",
"attributes": {
"version": "5.1",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 3
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "14"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "44"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "44"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/44"
}
},
{
"type": "versions",
"id": "46",
"attributes": {
"version": "1.0",
"release_day": null,
"retirement_day": null,
"status": "unknown",
"release_notes_uri": null,
"note": null,
"order": 1
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "15"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "46"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "46"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/46"
}
},
{
"type": "versions",
"id": "50",
"attributes": {
"version": "2.0",
"release_day": null,
"retirement_day": null,
"status": "retired",
"release_notes_uri": null,
"note": null,
"order": 3
},
"relationships": {
"browser": {
"data": {
"type": "browsers",
"id": "3"
}
},
"history_current": {
"data": {
"type": "historical_versions",
"id": "54"
}
},
"history": {
"data": [
{
"type": "historical_versions",
"id": "54"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/versions/50"
}
},
{
"type": "supports",
"id": "1",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "2"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/1"
}
},
{
"type": "supports",
"id": "2",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "9"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/2"
}
},
{
"type": "supports",
"id": "3",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "15"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/3"
}
},
{
"type": "supports",
"id": "4",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "18"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "4"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "4"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/4"
}
},
{
"type": "supports",
"id": "5",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "26"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "5"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "5"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/5"
}
},
{
"type": "supports",
"id": "6",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "32"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "6"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "6"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/6"
}
},
{
"type": "supports",
"id": "7",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "34"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "7"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "7"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/7"
}
},
{
"type": "supports",
"id": "8",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "42"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "8"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "8"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/8"
}
},
{
"type": "supports",
"id": "9",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "44"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "9"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "9"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/9"
}
},
{
"type": "supports",
"id": "10",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "46"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "10"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "10"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/10"
}
},
{
"type": "supports",
"id": "27",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "4"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "27"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "27"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/27"
}
},
{
"type": "supports",
"id": "29",
"attributes": {
"support": "yes",
"prefix": null,
"prefix_mandatory": false,
"alternate_name": null,
"alternate_mandatory": false,
"requires_config": null,
"default_config": null,
"protected": false,
"note": null
},
"relationships": {
"version": {
"data": {
"type": "versions",
"id": "50"
}
},
"feature": {
"data": {
"type": "features",
"id": "6"
}
},
"history_current": {
"data": {
"type": "historical_supports",
"id": "32"
}
},
"history": {
"data": [
{
"type": "historical_supports",
"id": "32"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/supports/29"
}
},
{
"type": "maturities",
"id": "1",
"attributes": {
"slug": "REC",
"name": {
"en": "Recommendation",
"de": "Empfehlung",
"ja": "勧告",
"ru": "Рекомендация"
}
},
"relationships": {
"history_current": {
"data": {
"type": "historical_maturities",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_maturities",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/maturities/1"
}
},
{
"type": "maturities",
"id": "2",
"attributes": {
"slug": "WD",
"name": {
"en": "Working Draft",
"de": "Arbeitsentwurf",
"ja": "草案",
"ru": "Рабочий черновик"
}
},
"relationships": {
"history_current": {
"data": {
"type": "historical_maturities",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_maturities",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/maturities/2"
}
},
{
"type": "specifications",
"id": "1",
"attributes": {
"slug": "css1",
"mdn_key": "CSS1",
"name": {
"en": "CSS Level 1"
},
"uri": {
"en": "http://www.w3.org/TR/CSS1/"
}
},
"relationships": {
"maturity": {
"data": {
"type": "maturities",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_specifications",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_specifications",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/specifications/1"
}
},
{
"type": "specifications",
"id": "2",
"attributes": {
"slug": "css2_1",
"mdn_key": "CSS2.1",
"name": {
"en": "CSS Level 2 (Revision 1)"
},
"uri": {
"en": "http://www.w3.org/TR/CSS2/"
}
},
"relationships": {
"maturity": {
"data": {
"type": "maturities",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_specifications",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_specifications",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/specifications/2"
}
},
{
"type": "specifications",
"id": "3",
"attributes": {
"slug": "css3_box",
"mdn_key": "CSS3 Box",
"name": {
"en": "CSS Basic Box Model"
},
"uri": {
"en": "http://dev.w3.org/csswg/css3-box/"
}
},
"relationships": {
"maturity": {
"data": {
"type": "maturities",
"id": "2"
}
},
"history_current": {
"data": {
"type": "historical_specifications",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_specifications",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/specifications/3"
}
},
{
"type": "sections",
"id": "1",
"attributes": {
"number": {
"en": "5.5.25"
},
"name": {
"en": "'float'"
},
"subpath": {
"en": "#float"
},
"note": {
"en": "Initial definition."
}
},
"relationships": {
"specification": {
"data": {
"type": "specifications",
"id": "1"
}
},
"history_current": {
"data": {
"type": "historical_sections",
"id": "1"
}
},
"history": {
"data": [
{
"type": "historical_sections",
"id": "1"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/sections/1"
}
},
{
"type": "sections",
"id": "2",
"attributes": {
"number": {
"en": "9.5.1"
},
"name": {
"en": "Positioning the float: the 'float' property"
},
"subpath": {
"en": "visuren.html#float-position"
},
"note": {
"en": "No change."
}
},
"relationships": {
"specification": {
"data": {
"type": "specifications",
"id": "2"
}
},
"history_current": {
"data": {
"type": "historical_sections",
"id": "2"
}
},
"history": {
"data": [
{
"type": "historical_sections",
"id": "2"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/sections/2"
}
},
{
"type": "sections",
"id": "3",
"attributes": {
"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."
}
},
"relationships": {
"specification": {
"data": {
"type": "specifications",
"id": "3"
}
},
"history_current": {
"data": {
"type": "historical_sections",
"id": "3"
}
},
"history": {
"data": [
{
"type": "historical_sections",
"id": "3"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/sections/3"
}
},
{
"type": "features",
"id": "6",
"attributes": {
"slug": "web-css-float_basic-support",
"mdn_uri": null,
"experimental": false,
"standardized": true,
"stable": true,
"obsolete": false,
"name": {
"en": "Basic Support",
"ja": "基本サポート"
}
},
"relationships": {
"parent": {
"data": {
"type": "features",
"id": "5"
}
},
"children": {
"data": []
},
"sections": {
"data": []
},
"supports": {
"data": [
{
"type": "supports",
"id": "1"
},
{
"type": "supports",
"id": "2"
},
{
"type": "supports",
"id": "3"
},
{
"type": "supports",
"id": "4"
},
{
"type": "supports",
"id": "5"
},
{
"type": "supports",
"id": "6"
},
{
"type": "supports",
"id": "7"
},
{
"type": "supports",
"id": "8"
},
{
"type": "supports",
"id": "9"
},
{
"type": "supports",
"id": "10"
},
{
"type": "supports",
"id": "27"
},
{
"type": "supports",
"id": "29"
}
]
},
"history_current": {
"data": {
"type": "historical_features",
"id": "6"
}
},
"history": {
"data": [
{
"type": "historical_features",
"id": "6"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/features/6"
}
},
{
"type": "features",
"id": "19",
"attributes": {
"slug": "web-css-float_new-subfeature",
"mdn_uri": null,
"experimental": false,
"standardized": true,
"stable": true,
"obsolete": false,
"name": {
"en": "New Subfeature"
}
},
"relationships": {
"parent": {
"data": {
"type": "features",
"id": "5"
}
},
"children": {
"data": []
},
"sections": {
"data": []
},
"supports": {
"data": []
},
"history_current": {
"data": {
"type": "historical_features",
"id": "28"
}
},
"history": {
"data": [
{
"type": "historical_features",
"id": "28"
}
]
}
},
"links": {
"self": "https://browsercompat.org/api/v2/features/19"
}
}
],
"meta": {
"compat_table": {
"supports": {
"5": {},
"6": {
"1": [
"1"
],
"2": [
"27"
],
"3": [
"29"
],
"4": [
"2"
],
"6": [
"3"
],
"7": [
"4"
],
"9": [
"5"
],
"10": [
"6"
],
"11": [
"7"
],
"14": [
"8"
],
"15": [
"10"
]
},
"19": {}
},
"tabs": [
{
"name": {
"en": "Desktop Browsers"
},
"browsers": [
"4",
"7",
"9",
"11",
"14"
]
},
{
"name": {
"en": "Mobile Browsers"
},
"browsers": [
"1",
"2",
"3",
"6",
"10",
"15"
]
}
],
"child_pages": true,
"pagination": {
"linked.features": {
"previous": null,
"next": null,
"count": 2
}
},
"languages": [
"en",
"de",
"es",
"ja",
"ru"
],
"notes": {}
}
}
}
The response is the feature view with new and updated items, or an error response.
This is a trivial use case, which would be better implemented by creating the feature directly, but it can be extended to bulk updates of existing feature views, or for first-time importing of subfeatures and support data. It has some quirks:
- New items should be identified with an ID starting with an underscore
(
_
). Relations to new items should use the underscored IDs. - Only feature, support, and section resources can be added or updated. Features must be the target feature or a descendant, and supports and sections are restricted to those features.
- Deletions are not supported.
- Other resources (browsers, versions, etc) can not be added or changed. This includes adding links to new resources.
Once the MDN import is complete, this PUT interface will be deprecated in favor of direct POST and PUT to the standard resource API.