The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/1923

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Daniel Middleton <d...@monokal.io>
From 27b84d63adb961d9988fd2494a0bd38433621242 Mon Sep 17 00:00:00 2001
From: Daniel Middleton <mono...@users.noreply.github.com>
Date: Fri, 22 Apr 2016 21:01:59 +0100
Subject: [PATCH 1/2] Add basic REST API usage example to README.md

---
 README.md | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/README.md b/README.md
index e9c8983..5a77a74 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,39 @@ shell you're going to interact with lxd from.
 After you've got LXD installed and a session with the right permissions, you
 can take your [first steps](#first-steps).
 
+## Using the REST API directly
+Here's a simple example of REST API usage via cURL:
+```bash
+curl -k -L -I \
+    --cert ${LXD_API_CRT} \
+    --key ${LXD_API_KEY} \
+    -H "Content-Type: application/json" \
+    -X POST \
+    -d @hello-ubuntu.json \
+    "${LXD_API_URL}/containers"
+```
+where `hello-ubuntu.json` could contain:
+```json
+{
+    "name":"some-ubuntu",
+    "architecture":"x86_64",
+    "profiles":[
+        "default"
+    ],
+    "ephemeral":true,
+    "config":{
+        "limits.cpu":"2"
+    },
+    "source": {
+        "type":"image",
+        "mode":"pull",
+        "protocol":"simplestreams",
+        "server":"https://cloud-images.ubuntu.com/releases";,
+        "alias":"14.04"
+    }
+}
+```
+
 ## Building from source
 
 We recommend having the latest versions of liblxc (>= 1.1 required) and CRIU

From da786080b359dc9743ea9808f8c76725952ff971 Mon Sep 17 00:00:00 2001
From: Daniel Middleton <mono...@users.noreply.github.com>
Date: Fri, 22 Apr 2016 21:44:14 +0100
Subject: [PATCH 2/2] Signed-off-by: Daniel Middleton <d...@monokal.io>

Signed-off-by: Daniel Middleton <d...@monokal.io>
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 5a77a74..6e4bfda 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ shell you're going to interact with lxd from.
 After you've got LXD installed and a session with the right permissions, you
 can take your [first steps](#first-steps).
 
-## Using the REST API directly
+## Using the REST API
 Here's a simple example of REST API usage via cURL:
 ```bash
 curl -k -L -I \
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to