History Resources

History Resources are created when a Resource is created, updated, or deleted. By navigating the history chain, a caller can see the changes of a resource over time.

All history representations are similar, so one example should be enough to determine the pattern.

Historical Browsers

A historical_browser resource represents the state of a browser at a point in time, and who is responsible for that state. The representation includes:

  • attributes
    • id (server selected) - Database ID
    • date (server selected) - The time of this change in ISO 8601
    • event (server selected) - The type of event, one of "created", "changed", or "deleted"
    • browsers - The browsers representation at this point in time
  • links
    • browser (one) - Associated browser, can not be changed
    • changeset (one) - Associated changeset, can not be changed.

To get a single historical_browsers representation:

GET /api/v1/historical_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
{
    "historical_browsers": {
        "id": "6",
        "date": "2015-04-20T18:44:09.905824Z",
        "event": "created",
        "browsers": {
            "id": "6",
            "slug": "firefox",
            "name": {
                "en": "Firefox"
            },
            "note": null,
            "links": {
                "history_current": "6"
            }
        },
        "links": {
            "changeset": "1",
            "browser": "6"
        }
    },
    "links": {
        "historical_browsers.changeset": {
            "type": "changesets",
            "href": "https://browsercompat.org/api/v1/changesets/{historical_browsers.changeset}"
        },
        "historical_browsers.browser": {
            "type": "browsers",
            "href": "https://browsercompat.org/api/v1/browsers/{historical_browsers.browser}"
        }
    }
}

Historical Versions

A historical_versions resource represents the state of a version at a point in time, and who is responsible for that representation. See historical_browsers and versions for an idea of the represention.

Historical Features

A historical_features resource represents the state of a feature at a point in time, and who is responsible for that representation. See historical_browsers and features for an idea of the represention.

Historical Sections

A historical_sections resource represents the state of a section at a point in time, and who is responsible for that representation. See historical_browsers and sections for an idea of the represention.

Historical Specifications

A historical_specifications resource represents the state of a specification at a point in time, and who is responsible for that representation. See historical_browsers and specifications for an idea of the represention.

Historical Supports

A historical_supports resource represents the state of a support at a point in time, and who is responsible for that representation. See historical_browsers and supports for an idea of the represention.

Historical Maturities

A historical_maturities resource represents the state of a maturity at a point in time, and who is responsible for that representation. See historical_browsers and maturities for an idea of the represention.