{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Version API","type":"basic","slug":"version-api","excerpt":"","body":"The Version API provides endpoints for your application to read the current application version, release notes, pending updates and apply updates.\n\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Version API\",\n  \"body\": \"The Version API is part of the [Integration API](doc:integration-api-reference).  To discover the Integration API base endpoint, query the `REPLICATED_INTEGRATIONAPI` environment variable from inside your container.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/version/v1/current\"\n}\n[/block]\nReturns information describing the current version of the application running.\n\n### Example request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k $REPLICATED_INTEGRATIONAPI/version/v1/current\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n### Example response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"version\\\": \\\"100\\\",\\n  \\\"release_sequence\\\": 51,\\n  \\\"release_notes\\\": \\\"The release notes\\\",\\n  \\\"release_date\\\":\\\"2015-12-01T00:00:00.0000000Z\\\",\\n  \\\"install_date\\\":\\\"2016-01-01T21:00:00.0000000Z\\\"\\n}\\n\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/version/v1/updates\"\n}\n[/block]\nReturns a list of available updates to install.\n[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"/version/v1/:sequence\"\n}\n[/block]\nApply a pending update to the installation.  Note that this will install the update immediately and could cause downtime.","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5702deb796fc8d2b001a663b","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Integration API","slug":"integration-api","order":7,"from_sync":false,"reference":false,"_id":"5702deb696fc8d2b001a661d","project":"550f1e4021de720d005b8cbb","version":"5702deb696fc8d2b001a6615","createdAt":"2015-03-22T20:15:45.359Z","__v":0},"project":"550f1e4021de720d005b8cbb","createdAt":"2016-03-28T21:28:37.459Z","githubsync":"","parentDoc":null,"user":"550f1e3161d9d30d00af9dc8","version":{"version":"2.0","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5702deb696fc8d2b001a6616","5702deb696fc8d2b001a6617","5702deb696fc8d2b001a6618","5702deb696fc8d2b001a6619","5702deb696fc8d2b001a661a","5702deb696fc8d2b001a661b","5702deb696fc8d2b001a661c","5702deb696fc8d2b001a661d","5702deb696fc8d2b001a661e"],"_id":"5702deb696fc8d2b001a6615","createdAt":"2016-04-04T21:37:58.778Z","hasReference":true,"releaseDate":"2016-04-04T21:37:58.778Z","__v":1,"project":"550f1e4021de720d005b8cbb","hasDoc":true},"__v":0}
The Version API provides endpoints for your application to read the current application version, release notes, pending updates and apply updates. [block:callout] { "type": "info", "title": "Version API", "body": "The Version API is part of the [Integration API](doc:integration-api-reference). To discover the Integration API base endpoint, query the `REPLICATED_INTEGRATIONAPI` environment variable from inside your container." } [/block] [block:api-header] { "type": "get", "title": "/version/v1/current" } [/block] Returns information describing the current version of the application running. ### Example request: [block:code] { "codes": [ { "code": "curl -k $REPLICATED_INTEGRATIONAPI/version/v1/current", "language": "curl" } ] } [/block] ### Example response: [block:code] { "codes": [ { "code": "{\n \"version\": \"100\",\n \"release_sequence\": 51,\n \"release_notes\": \"The release notes\",\n \"release_date\":\"2015-12-01T00:00:00.0000000Z\",\n \"install_date\":\"2016-01-01T21:00:00.0000000Z\"\n}\n", "language": "http" } ] } [/block] [block:api-header] { "type": "get", "title": "/version/v1/updates" } [/block] Returns a list of available updates to install. [block:api-header] { "type": "put", "title": "/version/v1/:sequence" } [/block] Apply a pending update to the installation. Note that this will install the update immediately and could cause downtime.