Commit Graph

23 Commits

Author SHA1 Message Date
Katie Knister
6e14267c3c Added a basic api interface for events 2015-02-26 14:14:25 -08:00
Rohit Jnagal
28984d7811 Add spec to v2.0 API. 2015-02-19 17:59:41 +00:00
Rohit Jnagal
7201af3ca5 Expose a minimal 2.0 API with the first summary endpoint.
Right now, we just do raw container name. More types to follow.
We'll re-do the older endpoint in 2.0 before we publish it.
2015-02-19 05:27:44 +00:00
Rohit Jnagal
e06e65f987 Map request for 'api/v1.2/docker/' to 'api/v1.2/docker'
Presently, we just fail this request:
$ curl 0:8080/api/v1.2/docker/
failed to get Docker container "" with error: unable to find Docker container ""
2015-02-18 07:25:42 +00:00
Victor Marmol
77283196f6 Refactoring API version handling.
This should make it easier to add future API versions and makes it a bit
simpler to look through the API.
2015-02-09 15:16:45 -08:00
Victor Marmol
e3ab15417c Ignore update errors for dead containers.
This adds an Exists() interface to detect when the container is dead.
Before reporting an update error we check is Exists() is true.

Some documentation was added as well.
2014-11-22 05:31:11 +08:00
Victor Marmol
181e12dda2 Refactoring and fixes of /docker API endpoint.
This canges the output of the Docker endpoint to be a map so that it is
more consistent from single to multiple returns. It also refactors
internally how we handle both types of requests.

Without this PR the /docker API endpoint is broken completely so this
change in format has no effect anyways.

These changes are tested by the upcoming integration tests.
2014-11-19 03:36:18 -08:00
Darren Shepherd
bce92c2a0b When an unknown error occurs set the HTTP status code to 500 2014-11-08 14:56:28 -07:00
Victor Marmol
9961e0f4d6 Output correct content-type with API responses.
Fixes #281
2014-10-27 08:33:22 -07:00
Victor Marmol
8aa05b0c39 Add API version v1.2 with /docker endpoint.
The /docker endpoint lists all Docker containers under one unified
namespace.
2014-10-20 22:24:01 -07:00
Satnam Singh
f3c92c381a More if undos. 2014-09-24 11:07:48 -07:00
Satnam Singh
bae82a583d A few minor Go style suggestions. 2014-09-24 10:53:52 -07:00
Satnam Singh
87768a047c Minor Go-style suggeston: move decode and error assignment into if clause check. 2014-09-22 15:21:06 -07:00
Victor Marmol
9dd8621686 Remove remaining parts of samples and percentiles. 2014-09-15 14:38:51 -07:00
Vishnu Kannan
3e390e0f33 Use glog instead of 'log' library.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-07 18:38:58 +00:00
Victor Marmol
41e27e40ef Adding v1.1 remote API.
Main addition is the "subcontainers" resource which provides
ContainerInfo for all subcontainers (recursively and including
self) of the specified container.
2014-08-01 16:17:43 -07:00
Victor Marmol
d2397e5ab7 Refactor API http handlers to prepare for versioning. 2014-08-01 10:13:58 -07:00
Nan Deng
55b65f4eb9 Retrieve 0 stats/samples when user asked for zero stats/samples 2014-07-23 17:28:41 -07:00
Nan Deng
6818ac9b9f gofmt -r "ContainerInfoQuery->ContainerInfoRequest" 2014-07-08 18:04:57 -07:00
Nan Deng
c1ecbc94a6 fmt.Errorf() 2014-07-08 17:30:35 -07:00
Nan Deng
38c5f0e29f empty query means default values 2014-07-07 22:10:25 -07:00
Nan Deng
4d0b365d43 let users decide how many stats/samples they want to retrieve 2014-07-07 22:04:30 -07:00
Victor Marmol
712f9fb32f Migrating cAdvisor code from lmctfy 2014-06-09 12:12:07 -07:00