From 278d0a858b576de48edda26d4e2941b07f8f8c1f Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Wed, 1 Apr 2015 10:06:52 -0700 Subject: [PATCH] Add API v1.3 documentation. --- docs/api.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 3aaed094..d6b4a6d1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4,7 +4,34 @@ cAdvisor exposes its raw and processed stats via a versioned remote REST API: `http://:/api//` -The current version of the API is `v1.2`. +The current version of the API is `v1.3`. + +There is a beta release of the `v2.0` API [available](api_v2.md). + +## Version 1.3 + +This version exposes the same endpoints as `v1.2` with one additional read-only endpoint. + +### Events + +The resource name for Docker container information is as follows: + +`/api/v1.3/events/` + +Querying the endpoint receives a list of events which are a serialized `Event` JSON objects (found in [info/v1/container.go](../info/v1/container.go)). + +The endpoint accepts a certain number of query parameters: + +| Parameter | Description | Default | +|-------------------|--------------------------------------------------------------------------------|-------------------| +| `start_time` | Start time of events to query (for stream=false) | Beginning of time | +| `end_time` | End time of events to query (for stream=false) | Now | +| `stream` | Whether to stream new events as they occur. If false returns historical events | false | +| `subcontainers` | Whether to also return events for all subcontainers | false | +| `max_events` | The max number of events to return (for stream=false) | 10 | +| `oom_events` | Whether to include OOM events | false | +| `creation_events` | Whether to include container creation events | false | +| `deletion_events` | Whether to include container deletion events | false | ## Version 1.2