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/1002 HTTP/1.1
Host: browsersupports.org
Accept: application/vnd.api+json

A sample response is:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
    "historical_browsers": {
        "id": "1002",
        "timestamp": "1404919464.559140",
        "event": "created",
        "browsers": {
            "id": "2",
            "slug": "firefox",
            "icon": "https://cdn.browsersupports.org/media/img/browsers/firefox.png",
            "name": {
                "en": "Firefox"
            },
            "note": {
                "en": "Uses Gecko for its web browser engine."
            },
            "links": {
                "history_current": "1002",
            }
        },
        "links": {
            "browser": "1",
            "changeset": "1",
        }
    },
    "links": {
        "historical_browsers.browser": {
            "href": "https://browsersupports.org/api/v1/historical_browsers/{historical_browsers.browser}",
            "type": "browsers"
        },
        "historical_browsers.changeset": {
            "href": "https://browsersupports.org/api/v1/changesets/{historical_browsers.changeset}",
            "type": "changeset"
        }
    }
}

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 Supports

A historical_supports resource represents a 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.