{"action":"created","issue":{"url":"https://api.github.com/repos/docker/distribution/issues/1624","repository_url":"https://api.github.com/repos/docker/distribution","labels_url":"https://api.github.com/repos/docker/distribution/issues/1624/labels{/name}","comments_url":"https://api.github.com/repos/docker/distribution/issues/1624/comments","events_url":"https://api.github.com/repos/docker/distribution/issues/1624/events","html_url":"https://github.com/docker/distribution/issues/1624","id":147657813,"number":1624,"title":"[proposal] Add metadata to the `/v2/` endpoint","user":{"login":"mssola","id":767943,"avatar_url":"https://avatars.githubusercontent.com/u/767943?v=3","gravatar_id":"","url":"https://api.github.com/users/mssola","html_url":"https://github.com/mssola","followers_url":"https://api.github.com/users/mssola/followers","following_url":"https://api.github.com/users/mssola/following{/other_user}","gists_url":"https://api.github.com/users/mssola/gists{/gist_id}","starred_url":"https://api.github.com/users/mssola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mssola/subscriptions","organizations_url":"https://api.github.com/users/mssola/orgs","repos_url":"https://api.github.com/users/mssola/repos","events_url":"https://api.github.com/users/mssola/events{/privacy}","received_events_url":"https://api.github.com/users/mssola/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-12T07:20:16Z","updated_at":"2016-04-12T16:49:59Z","closed_at":null,"body":"As discussed in the PR #1555, it can be useful to determine what are the capabilities of the running registry. One possible approach to this is to be able to fetch the version of the registry: either locally with the binary, or by adding the version to the `/v2/` endpoint. However, this is ugly (we don't want version-based trickery at the API-level) and insecure.\r\n\r\nTherefore, it would be best that the `/v2/` endpoint included a metadata object so remote clients can fetch which are the capabilities of the running registry. The proposed syntax is:\r\n\r\n```json\r\n{\r\n  \"features\": {\r\n    \"gc\": {\r\n      \"enabled\": true\r\n    },\r\n    \"readonly\": {\r\n      \"enabled\": true\r\n    }\r\n  },\r\n  \"manifest\" : {\r\n    \"types\": [\r\n      \"application/vnd.docker.distribution.manifest.v2+json\",\r\n      \"application/vnd.docker.distribution.manifest.v1+json\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\nIn the `features` object we've got features from the registry that are relevant for client-registry communications. For now this object would just consist of the `enabled` attribute. The `enabled` attribute will be `true` if the feature has been implemented in the registry *and* if this feature has been activated at the configuration if applicable (for example, `readonly` will be marked as `false` if it hasn't been enabled in the configuration).\r\n\r\nThe `manifest` object contains only the `types` attribute for now. This attribute is an array with the supported version schema."},"comment":{"url":"https://api.github.com/repos/docker/distribution/issues/comments/209003191","html_url":"https://github.com/docker/distribution/issues/1624#issuecomment-209003191","issue_url":"https://api.github.com/repos/docker/distribution/issues/1624","id":209003191,"user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T16:49:59Z","updated_at":"2016-04-12T16:49:59Z","body":"Looks good except I would think \"manifest\" would also be feature. Features wouldn't be limited to enabled/disabled."}}