Returns version information from the server. Similar to the ``docker version`` command. Returns: (dict): The server version information Raises: :py:class:`docker.errors.APIError` If the server returns an error.
(self, api_version=True)
| 166 | return self._result(self._get(self._url('/_ping'))) == 'OK' |
| 167 | |
| 168 | def version(self, api_version=True): |
| 169 | """ |
| 170 | Returns version information from the server. Similar to the ``docker |
| 171 | version`` command. |
| 172 | |
| 173 | Returns: |
| 174 | (dict): The server version information |
| 175 | |
| 176 | Raises: |
| 177 | :py:class:`docker.errors.APIError` |
| 178 | If the server returns an error. |
| 179 | """ |
| 180 | url = self._url("/version", versioned_api=api_version) |
| 181 | return self._result(self._get(url), json=True) |
no test coverage detected