Docker Community Forums

Share and learn in the Docker community.

JSON spec or schema for remote API

docker

(Jeffmaury) #1

I’m am looking for the format of remote API JSON responses and fail to find a spec of a schema. Any pointer(s) ?


(David Maze) #2

https://docs.docker.com/engine/reference/api/docker_remote_api/

I’d highly recommend using a prebuilt library for this if you can. In Python, I’ve used https://pypi.python.org/pypi/docker-py/1.9.0 for this before.

To reiterate a key security point, access to the Docker daemon is root access to the host system. Opening port 2375 for remote access is giving unrestricted root access to anyone who can reach your system. I’ve seen mentions of a couple of tools that only work with a TCP-based API, which is unfortunate given the massive security implications. The standard libraries can access Docker via a Unix socket, which is much better.


(Jeffmaury) #3

I’ve seen this doc but where do you see the exact definition of the responses payload. Only examples are given.


(Dvohra) #4

For example request and response refer


(Jeffmaury) #5

I am looking for a reference not examples