diff --git a/api/README.md b/api/README.md
new file mode 100644
index 000000000000..974855664f4a
--- /dev/null
+++ b/api/README.md
@@ -0,0 +1,12 @@
+# DRAFT #
+# OpenShift v3 REST API (Alpha)
+
+## Viewing the documentation ##
+Clone this repository and open oov3.html locally on your browser
+
+## Generating the API document
+Use [raml2html](https://www.npmjs.org/package/raml2html):
+```
+$ raml2html -i oov3.raml -o oov3.html
+```
+For additional documentation on raml go to [http://raml.org/](http://raml.org/)
diff --git a/api/build_flow.odg b/api/build_flow.odg
new file mode 100644
index 000000000000..29d245c4d97d
Binary files /dev/null and b/api/build_flow.odg differ
diff --git a/api/doc/controller-schema.json b/api/doc/controller-schema.json
new file mode 100644
index 000000000000..bec1d9ac1cbc
--- /dev/null
+++ b/api/doc/controller-schema.json
@@ -0,0 +1,50 @@
+{
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "A replicationController resource. A replicationController helps to create and manage a set of pods. It acts as a factory to create new pods based on a template. It ensures that there are a specific number of pods running. If fewer pods are running than `replicas` then the needed pods are generated using `podTemplate`. If more pods are running than `replicas`, then excess pods are deleted.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "desiredState": {
+ "type": "object",
+ "required": false,
+ "description": "The desired configuration of the replicationController",
+ "properties": {
+ "replicas": {
+ "type": "number",
+ "required": false,
+ "description": "Number of pods desired in the set"
+ },
+ "replicaSelector": {
+ "type": "object",
+ "required": false,
+ "description": "Required labels used to identify pods in the set"
+ },
+ "podTemplate": {
+ "type": "object",
+ "required": false,
+ "description": "Template from which to create new pods, as necessary. Identical to pod schema."
+ }
+ }
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
diff --git a/api/doc/image-streams.md b/api/doc/image-streams.md
new file mode 100644
index 000000000000..9ed75c739b03
--- /dev/null
+++ b/api/doc/image-streams.md
@@ -0,0 +1,9 @@
+An image stream is a collection of images that share the same metadata. It contains multiple
+versions of an image as it evolves over time with new builds of the codebase.
+
+An image stream is one of the sources of image metadata. Metadata for an image can come from one of three places:
+* The original image binary as specified by the Dockerfile - this includes environment variables, command to execute, ports exposed, etc.
+* The image definition in the OpenShift environment. This can be used to override metadata from the Dockerfile
+* The image stream which overrides individual image metadata.
+
+Some images can be used as services while others can be used as single execution jobs.
diff --git a/api/doc/manifest-schema.json b/api/doc/manifest-schema.json
new file mode 100644
index 000000000000..03546d3123bb
--- /dev/null
+++ b/api/doc/manifest-schema.json
@@ -0,0 +1,126 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema",
+ "type": "object",
+ "description": "Manifest describing group of [Docker containers](http://docker.io); also used by [Google Cloud Platform's container-vm images](https://developers.google.com/compute/docs/containers).",
+ "properties": {
+ "version": {
+ "type": "string",
+ "description": "The version of the manifest.",
+ "enum": [
+ "v1beta1"
+ ]
+ },
+ "containers": {
+ "type": "array",
+ "description": "The list of containers to launch.",
+ "items": {
+ "type": "object",
+ "required": [
+ "image"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description" : "A symbolic name used to create and track the container. Must be an RFC1035 compatible value (a single segment of a DNS name). All containers must have unique names."
+ },
+ "image": {
+ "type": "string",
+ "description" : "The container image to run."
+ },
+ "command": {
+ "type": "array",
+ "description" : "The command line to run. If this is omitted, the container is assumed to have a command embedded in it.",
+ "items": {
+ "type": "string"
+ }
+ },
+ "workingDir": {
+ "type": "string",
+ "description" : "The initial working directory for the command. Default is the container’s embedded working directory or else the Docker default."
+ },
+ "volumeMounts": {
+ "type": "array",
+ "description" : "Data volumes to expose into the container.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description" : "The name of the volume to mount. This must match the name of a volume defined in volumes[]."
+ },
+ "mountPath": {
+ "type": "string",
+ "description" : "The path at which to mount the volume inside the container. This must be an absolute path and no longer than 512 characters."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description" : "Whether this volume should be read-only. Default is false (read-write)."
+ }
+ }
+ }
+ },
+ "ports": {
+ "type": "array",
+ "description" : "Ports to expose from the container. All of these are exposed out through the public interface of the VM.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description" : "A symbolic name used to create and track the port. Must be an RFC1035 compatible value (a single segment of a DNS name)."
+ },
+ "containerPort": {
+ "type": "integer",
+ "description" : "The port on which the container is listening."
+ },
+ "hostPort": {
+ "type": "integer",
+ "description" : "The port on the host which maps to the containerPort. Default is auto-allocated."
+ },
+ "protocol": {
+ "type": "string",
+ "description" : "The protocol for this port. Valid options are TCP and UDP. Default is TCP."
+ }
+ }
+ }
+ },
+ "env": {
+ "type": "array",
+ "description" : "Environment variables to set before the container runs.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description" : "The name of the environment variable."
+ },
+ "value": {
+ "type": "string",
+ "description" : "The value of the environment variable."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "volumes": {
+ "type": "array",
+ "description" : "A list of volumes to share between containers.",
+ "uniqueItems": true,
+ "items": {
+ "type": "object",
+ "required": [
+ "name"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description" : "The name of the volume. Must be an RFC1035 compatible value (a single segment of a DNS name). All volumes must have unique names. These are referenced by `containers[].volumeMounts[].name`.",
+ "pattern": "^[a-z]([-a-z0-9]*[a-z0-9])*"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/api/doc/overview.md b/api/doc/overview.md
new file mode 100644
index 000000000000..9e4adc0fdbbb
--- /dev/null
+++ b/api/doc/overview.md
@@ -0,0 +1,10 @@
+The 3.x model attempts to expose underlying Docker and Google models as
+accurately as possible, with a focus on easy composition of applications
+by a developer (install Ruby, push code, add MySQL). Unlike 2.x, more
+flexibility of configuration is exposed after creation in all aspects
+of the model. Terminology is still being weighed, but the concept of an
+application as a separate object is being removed in favor of more flexible
+composition of "services" - allowing two web containers to reuse a DB,
+or expose a DB directly to the edge of the network.
+The existing API will continue to be supported through 3.x,
+with concepts mapped as closely as possible to the new model.
diff --git a/api/doc/pod-schema.json b/api/doc/pod-schema.json
new file mode 100644
index 000000000000..8d4279a07bd2
--- /dev/null
+++ b/api/doc/pod-schema.json
@@ -0,0 +1,87 @@
+{
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "Pod resource. A pod corresponds to a co-located group of [Docker containers](http://docker.io).",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "desiredState": {
+ "type": "object",
+ "required": false,
+ "description": "The desired configuration of the pod",
+ "properties": {
+ "manifest": {
+ "type": "object",
+ "required": false,
+ "description": "Manifest describing group of [Docker containers](http://docker.io); compatible with format used by [Google Cloud Platform's container-vm images](https://developers.google.com/compute/docs/containers)"
+ },
+ "status": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "host": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "hostIP": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "info": {
+ "type": "object",
+ "required": false,
+ "description": ""
+ }
+ }
+ },
+ "currentState": {
+ "type": "object",
+ "required": false,
+ "description": "The current configuration and status of the pod. Fields in common with desiredState have the same meaning.",
+ "properties": {
+ "manifest": {
+ "type": "object",
+ "required": false
+ },
+ "status": {
+ "type": "string",
+ "required": false
+ },
+ "host": {
+ "type": "string",
+ "required": false
+ },
+ "hostIP": {
+ "type": "string",
+ "required": false
+ },
+ "info": {
+ "type": "object",
+ "required": false
+ }
+ }
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
diff --git a/api/doc/projects.md b/api/doc/projects.md
new file mode 100644
index 000000000000..8354dc02afa5
--- /dev/null
+++ b/api/doc/projects.md
@@ -0,0 +1,3 @@
+Projects are a similar concept to v2 domains. A project is a grouping of services with shared
+access control and resource limits. Applications can be assembled from services in a project
+by linking them together via service endpoints.
diff --git a/api/doc/service-schema.json b/api/doc/service-schema.json
new file mode 100644
index 000000000000..097c95482c9d
--- /dev/null
+++ b/api/doc/service-schema.json
@@ -0,0 +1,40 @@
+{
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "A service resource.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "name": {
+ "type": "string",
+ "required": false
+ },
+ "port": {
+ "type": "number",
+ "required": false
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ },
+ "selector": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
diff --git a/api/examples/alias.json b/api/examples/alias.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/alias.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/aliases.json b/api/examples/aliases.json
new file mode 100644
index 000000000000..f5b7adc0f83c
--- /dev/null
+++ b/api/examples/aliases.json
@@ -0,0 +1,11 @@
+{
+ "list":
+ [
+ {
+ "id": "myalias",
+ "ssl_certificate": "-----BEGIN CERTIFICATE-----\nMIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl\nZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm\nBgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5\nMjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM\nAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE\nCwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW\nGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB\nDwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8\nba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD7sHm9Oc\nYj1H6YYJ57sIOf/oLDpJl6l3Rw8VC3+3W0/lzlVpA8qt7fpkiW7XQJCPplUSrdVC\n3okQ2T5NAod5+wVIOqELgE5bLX1LRs5VPsjytHkJ7rKXs55FHR3kpsoImn5xD0Ky\n6lRn8cIMolQoyN5HIGr8f5P+07hrHibve8jje/DKTssb5yEUAEmh6iGHQsRAnsUW\nQoIEUOLqQCu9re2No4G52Kl2xQIjyJF7rCfxAgMBAAEwDQYJKoZIhvcNAQEFBQAD\nggEBAGHrya/ZkiAje2kHsOajXMlO2+y1iLfUDcRLuEWpUa8sI5EM4YtemQrsupFp\n8lVYG5C4Vh8476oF9t8Wex5eH3ocwbSvPIUqE07hdmrubiMq4wxFVRYq7g9lHAnx\nl+bABuN/orbAcPcGAGg7AkXVoAc3Fza/ZcgMcw7NOtDTEss70V9OdgCfQUJL0KdO\nhCO8bQ1EaEiq6zEh8RpZe8mu+f/GYATX1I+eJUc6F6cn83oJjE9bqAVzk7TzTHeK\nEBKN50C14wWtXeG7n2+ugaVO+0xnvHeUrQBLHSRyOHqxXrQQ5XmzcaBiyI0f2IQM\nHst1BVXyX0n/L/ZoYYsv5juJmDo=\n-----END CERTIFICATE-----",
+ "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwBGx+DAot4iAz9R0vv18LvEo3UnOViV+obVe4SaZhWfB6IVf\n/G2tL+mjPSCSCLfrCHtietrf/Rt5XjnSBwcXgAjeH1dpf4gP378b5ZxSng+7B5vT\nnGI9R+mGCee7CDn/6Cw6SZepd0cPFQt/t1tP5c5VaQPKre36ZIlu10CQj6ZVEq3V\nQt6JENk+TQKHefsFSDqhC4BOWy19S0bOVT7I8rR5Ce6yl7OeRR0d5KbKCJp+cQ9C\nsupUZ/HCDKJUKMjeRyBq/H+T/tO4ax4m73vI43vwyk7LG+chFABJoeohh0LEQJ7F\nFkKCBFDi6kArva3tjaOBudipdsUCI8iRe6wn8QIDAQABAoIBAG/on4JVRRQSw8LU\nLiWt+jI7ryyoOUH2XL8JtzuGSwLwvomlVJT2rmbxQXx3Qr8zsgziHzIn30RRQrkF\nBXu0xRuDjzBBtSVqeJ1Mc4uoNncEAVxgjb5bewswZDnXPCGB8bosMtX4OPRXgdEo\nPwTtfjMOsrMaU3hd5Xu4m81tQA2BvwOlx8aYDyH0jeTnervc5uRGbeTBQG4Bu40E\nrWNmXvgNq2EzTAwbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG\nUwMbj/A038yAumYQtThTE/3e4W3rn7F2Vko900bC4aAC1KQOAzjIeQqzqkVxWTWq\n4SUFQAECgYEA/ODwifOTuI6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN\nZySAkpo5EW6DNraRJxNCOBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T\necET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb\nKrz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG\n8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5\nQ08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke\npWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu\n8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu\n1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi\nQv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f\ndy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----",
+ "pass_phrase": "abcd"
+ }
+ ]
+}
diff --git a/api/examples/build-results.json b/api/examples/build-results.json
new file mode 100644
index 000000000000..a3fd73270228
--- /dev/null
+++ b/api/examples/build-results.json
@@ -0,0 +1,19 @@
+{
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "startTime": "2014-07-15T03:58:40Z",
+ "endTime": "2014-07-15T03:59:40Z",
+ "result": "SUCCESS",
+ "logs": "http://url/to/build/logs"
+ },
+ {
+ "id": "53c4249f076573c0f4000002",
+ "startTime": "2014-07-15T04:58:40Z",
+ "endTime": "2014-07-15T04:59:40Z",
+ "result": "FAILURE",
+ "logs": "http://url/to/build/logs"
+ }
+ ]
+}
diff --git a/api/examples/build.json b/api/examples/build.json
new file mode 100644
index 000000000000..f338ed1a4c46
--- /dev/null
+++ b/api/examples/build.json
@@ -0,0 +1,9 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "imageStream": "server/name",
+ "type": "docker-build",
+ "repository": "openshift/dockerrepo"
+ }
+}
diff --git a/api/examples/builds.json b/api/examples/builds.json
new file mode 100644
index 000000000000..91795a17f128
--- /dev/null
+++ b/api/examples/builds.json
@@ -0,0 +1,13 @@
+{
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000002",
+ "imageStream": "server/name",
+ "type": "source-build",
+ "repository": "openshift/myapp"
+ "builderImageStream": "myserver/builderimage"
+ }
+ ]
+}
+
diff --git a/api/examples/controller-list.json b/api/examples/controller-list.json
new file mode 100644
index 000000000000..363177095786
--- /dev/null
+++ b/api/examples/controller-list.json
@@ -0,0 +1,30 @@
+{
+ "items": [
+ {
+ "id": "testRun",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "testRun"
+ },
+ "podTemplate": {
+ "desiredState": {
+ "image": "dockerfile/nginx",
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ]
+ },
+ "labels": {
+ "name": "testRun"
+ }
+ }
+ },
+ "labels": {
+ "name": "testRun"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/api/examples/controller.json b/api/examples/controller.json
new file mode 100644
index 000000000000..3ccc63520e5d
--- /dev/null
+++ b/api/examples/controller.json
@@ -0,0 +1,21 @@
+ {
+ "id": "nginxController",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {"name": "nginx"},
+ "podTemplate": {
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "nginxController",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }]
+ }
+ },
+ "labels": {"name": "nginx"}
+ }},
+ "labels": {"name": "nginx"}
+ }
diff --git a/api/examples/create-build.json b/api/examples/create-build.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/create-build.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/create-deployment.json b/api/examples/create-deployment.json
new file mode 100644
index 000000000000..42dcb501b506
--- /dev/null
+++ b/api/examples/create-deployment.json
@@ -0,0 +1,16 @@
+{
+ "object": {
+ "id": "1234235172374",
+ "serviceId": "the-service-id",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx/v2tag",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }]
+ }
+ }
+}
diff --git a/api/examples/create-image.json b/api/examples/create-image.json
new file mode 100644
index 000000000000..ed1cda894322
--- /dev/null
+++ b/api/examples/create-image.json
@@ -0,0 +1,17 @@
+{
+ "data":
+ {
+ "url":"https://registry.hub.docker.com/u/library/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ]
+ }
+}
diff --git a/api/examples/create-link.json b/api/examples/create-link.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/create-link.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/create-pod.json b/api/examples/create-pod.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/create-pod.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/create-service.json b/api/examples/create-service.json
new file mode 100644
index 000000000000..e9a472ea0d39
--- /dev/null
+++ b/api/examples/create-service.json
@@ -0,0 +1,26 @@
+{
+ "data":
+ {
+ "name": "service-name",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ]
+ }
+ }
+ }
+ }
+}
diff --git a/api/examples/deployment.json b/api/examples/deployment.json
new file mode 100644
index 000000000000..56888b2a00bd
--- /dev/null
+++ b/api/examples/deployment.json
@@ -0,0 +1,32 @@
+{
+ "object": {
+ "id": "1234235172374",
+ "serviceId": "the-service-id",
+ "replicationControllers": [
+ "replication-controller-id1",
+ "replication-controller-id2",
+ "replication-controller-id3"
+ ],
+ "currentState": {
+ "replicas": 1,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx/v2tag",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "status": "active"
+ }
+}
diff --git a/api/examples/deployments.json b/api/examples/deployments.json
new file mode 100644
index 000000000000..6a25577f2f71
--- /dev/null
+++ b/api/examples/deployments.json
@@ -0,0 +1,34 @@
+{
+ "list": [
+ {
+ "id": "1234235172374",
+ "serviceId": "the-service-id",
+ "replicationControllers": [
+ "replication-controller-id1",
+ "replication-controller-id2",
+ "replication-controller-id3"
+ ],
+ "currentState": {
+ "replicas": 1,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx/v2tag",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "status": "active"
+ }
+ ]
+}
diff --git a/api/examples/envvar.json b/api/examples/envvar.json
new file mode 100644
index 000000000000..492b46fa3403
--- /dev/null
+++ b/api/examples/envvar.json
@@ -0,0 +1,3 @@
+{
+ "data": { "name": "var1", "value": "value1" }
+}
diff --git a/api/examples/envvars.json b/api/examples/envvars.json
new file mode 100644
index 000000000000..d16f2bc59aaf
--- /dev/null
+++ b/api/examples/envvars.json
@@ -0,0 +1,7 @@
+{
+ "data":
+ [
+ { "name": "var1", "value": "value1" },
+ { "name": "var2", "value": "value2" }
+ ]
+}
diff --git a/api/examples/external-service.json b/api/examples/external-service.json
new file mode 100644
index 000000000000..e841b2e946b3
--- /dev/null
+++ b/api/examples/external-service.json
@@ -0,0 +1,11 @@
+{
+ "id": "example",
+ "port": 8000,
+ "labels": {
+ "name": "nginx"
+ },
+ "selector": {
+ "name": "nginx"
+ },
+ "createExternalLoadBalancer": true
+}
diff --git a/api/examples/image-repositories.json b/api/examples/image-repositories.json
new file mode 100644
index 000000000000..9900484ae9fd
--- /dev/null
+++ b/api/examples/image-repositories.json
@@ -0,0 +1,22 @@
+{
+ "list":
+ [
+ {
+ "visibility": "public",
+ "domain": "domain",
+ "name": "server/domain/nginx",
+ "environment":
+ {
+ "VAR1": "value1",
+ "VAR2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "latest":"v5"
+ }
+ ]
+}
diff --git a/api/examples/image-repository.json b/api/examples/image-repository.json
new file mode 100644
index 000000000000..8b9c5d71fe80
--- /dev/null
+++ b/api/examples/image-repository.json
@@ -0,0 +1,20 @@
+{
+ "data":
+ {
+ "visibility": "public",
+ "domain": "domain",
+ "name": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "latest":"v4"
+ }
+}
diff --git a/api/examples/image.json b/api/examples/image.json
new file mode 100644
index 000000000000..632dce47f5f6
--- /dev/null
+++ b/api/examples/image.json
@@ -0,0 +1,24 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "nginx-19273412433342",
+ "image-stream": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "commands": [
+ {
+ "memory-dump": "/bin/dump"
+ }
+ ]
+ }
+}
diff --git a/api/examples/images.json b/api/examples/images.json
new file mode 100644
index 000000000000..d33c7107340f
--- /dev/null
+++ b/api/examples/images.json
@@ -0,0 +1,26 @@
+{
+ "data":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "nginx-19273412433342",
+ "image-stream": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "commands": [
+ {
+ "memory-dump": "/bin/dump"
+ }
+ ]
+ }
+ ]
+}
diff --git a/api/examples/launch-build.json b/api/examples/launch-build.json
new file mode 100644
index 000000000000..62c8dc183ce9
--- /dev/null
+++ b/api/examples/launch-build.json
@@ -0,0 +1,6 @@
+{
+ "data":
+ {
+ "archiveUrl": "http://url/to/my/archive"
+ }
+}
diff --git a/api/examples/lbservice.json b/api/examples/lbservice.json
new file mode 100644
index 000000000000..f9616e62813f
--- /dev/null
+++ b/api/examples/lbservice.json
@@ -0,0 +1,10 @@
+{
+ "id": "example",
+ "port": 8000,
+ "labels": {
+ "name": "nginx"
+ },
+ "selector": {
+ "name": "nginx"
+ }
+}
diff --git a/api/examples/link.json b/api/examples/link.json
new file mode 100644
index 000000000000..56ab15cebfc7
--- /dev/null
+++ b/api/examples/link.json
@@ -0,0 +1,15 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+}
diff --git a/api/examples/links.json b/api/examples/links.json
new file mode 100644
index 000000000000..6390a547a440
--- /dev/null
+++ b/api/examples/links.json
@@ -0,0 +1,17 @@
+{
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+}
diff --git a/api/examples/pod-list.json b/api/examples/pod-list.json
new file mode 100644
index 000000000000..7f753a151b25
--- /dev/null
+++ b/api/examples/pod-list.json
@@ -0,0 +1,50 @@
+{
+ "items": [
+ {
+ "id": "my-pod-1",
+ "labels": {
+ "name": "testRun",
+ "replicationController": "testRun"
+ },
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "my-pod-1",
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "hostPort": 8080,
+ "containerPort": 80
+ }]
+ }
+ }
+ },
+ "currentState": {
+ "host": "host-1"
+ }
+ },
+ {
+ "id": "my-pod-2",
+ "labels": {
+ "name": "testRun",
+ "replicationController": "testRun"
+ },
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "my-pod-2",
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "hostPort": 8080,
+ "containerPort": 80
+ }]
+ }
+ }
+ },
+ "currentState": {
+ "host": "host-2"
+ }
+ }
+ ]
+}
diff --git a/api/examples/pod.json b/api/examples/pod.json
new file mode 100644
index 000000000000..5ab5bc461ae2
--- /dev/null
+++ b/api/examples/pod.json
@@ -0,0 +1,30 @@
+{
+ "id": "php",
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "php",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "containerPort": 80,
+ "hostPort": 8080
+ }],
+ "livenessProbe": {
+ "enabled": true,
+ "type": "http",
+ "initialDelaySeconds": 30,
+ "httpGet": {
+ "path": "/index.html",
+ "port": "8080"
+ }
+ }
+ }]
+ }
+ },
+ "labels": {
+ "name": "foo"
+ }
+}
+
diff --git a/api/examples/pods.json b/api/examples/pods.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/pods.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/project-list.json b/api/examples/project-list.json
new file mode 100644
index 000000000000..258e337ecb9d
--- /dev/null
+++ b/api/examples/project-list.json
@@ -0,0 +1,31 @@
+{
+ "data":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ },
+ {
+ "id": "54c4259f076573c0f4000023",
+ "suffix": "dev.rhcloud.com",
+ "name": "appdomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+ ]
+}
diff --git a/api/examples/project-post.json b/api/examples/project-post.json
new file mode 100644
index 000000000000..51544a453d22
--- /dev/null
+++ b/api/examples/project-post.json
@@ -0,0 +1,3 @@
+{
+ "templateId": "the-template-id"
+}
diff --git a/api/examples/project-put.json b/api/examples/project-put.json
new file mode 100644
index 000000000000..1ad392260cea
--- /dev/null
+++ b/api/examples/project-put.json
@@ -0,0 +1,7 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "newproject-name"
+ }
+}
diff --git a/api/examples/project.json b/api/examples/project.json
new file mode 100644
index 000000000000..bed6dfe6f968
--- /dev/null
+++ b/api/examples/project.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "myproject",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/service-list.json b/api/examples/service-list.json
new file mode 100644
index 000000000000..2d9dea5129d7
--- /dev/null
+++ b/api/examples/service-list.json
@@ -0,0 +1,26 @@
+{
+ "items": [
+ {
+ "id": "example1",
+ "port": 8000,
+ "labels": {
+ "name": "nginx"
+ }
+ "selector": {
+ "name": "nginx"
+ }
+ },
+ {
+ "id": "example2",
+ "port": 8080,
+ "labels": {
+ "env": "prod",
+ "name": "jetty"
+ }
+ "selector": {
+ "env": "prod",
+ "name": "jetty"
+ }
+ }
+ ]
+}
diff --git a/api/examples/service.json b/api/examples/service.json
new file mode 100644
index 000000000000..8f27e5b6c34f
--- /dev/null
+++ b/api/examples/service.json
@@ -0,0 +1,34 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+}
diff --git a/api/examples/services.json b/api/examples/services.json
new file mode 100644
index 000000000000..0b3742c7294e
--- /dev/null
+++ b/api/examples/services.json
@@ -0,0 +1,36 @@
+{
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/api/examples/template.json b/api/examples/template.json
new file mode 100644
index 000000000000..6db097e31846
--- /dev/null
+++ b/api/examples/template.json
@@ -0,0 +1,51 @@
+{
+ "data":
+ {
+ "services": [
+ {
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+ ],
+ "links": [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+ }
+}
diff --git a/api/examples/template_example_1.json b/api/examples/template_example_1.json
new file mode 100644
index 000000000000..c1ae3fbf2565
--- /dev/null
+++ b/api/examples/template_example_1.json
@@ -0,0 +1,138 @@
+{
+ "id": "example1",
+ "name": "my-awesome-php-app",
+ "description": "Example PHP application with PostgreSQL database",
+ "buildConfig": [
+ {
+ "name": "mfojtik/nginx-php-app",
+ "type": "docker",
+ "sourceUri": "https://raw.githubusercontent.com/mfojtik/phpapp/master/Dockerfile",
+ "imageRepository": "int.registry.com:5000/mfojtik/phpapp"
+ },
+ {
+ "name": "postgres",
+ "type": "docker",
+ "imageRepository": "registry.hub.docker.com/postgres",
+ "sourceUri": "https://raw.githubusercontent.com/docker-library/postgres/docker/9.2/Dockerfile"
+ }
+ ],
+ "imageRepository": [
+ {
+ "name": "mfojtik/nginx-php-app",
+ "url": "internal.registry.com:5000/mfojtik/phpapp"
+ },
+ {
+ "name": "postgres",
+ "url": "registry.hub.docker.com/postgres"
+ }
+ ],
+ "parameters": [
+ {
+ "name": "DB_PASSWORD",
+ "description": "PostgreSQL admin user password",
+ "type": "string",
+ "generate": "[a-zA-Z0-9]{8}"
+ },
+ {
+ "name": "DB_USER",
+ "description": "PostgreSQL username",
+ "type": "string",
+ "generate": "admin[a-zA-Z0-9]{4}"
+ },
+ {
+ "name": "DB_NAME",
+ "description": "PostgreSQL database name",
+ "type": "string",
+ "generate": "db[a-zA-Z0-9]{4}"
+ }
+ ],
+ "serviceLinks": [
+ {
+ "export": [
+ {
+ "name": "POSTGRES_ADMIN_USERNAME",
+ "value": "${DB_USER}"
+ },
+ {
+ "name": "POSTGRES_ADMIN_PASSWORD",
+ "value": "${DB_PASSWORD}"
+ },
+ {
+ "name": "POSTGRES_DATABASE_NAME",
+ "value": "${DB_NAME}"
+ }
+ ],
+ "from": "database",
+ "to": "frontend"
+ }
+ ],
+ "services": [
+ {
+ "name": "database",
+ "description": "Standalone PostgreSQL 9.2 database service",
+ "labels": {
+ "name": "database-service"
+ },
+ "deploymentConfig": {
+ "deployment": {
+ "podTemplate": {
+ "containers": [
+ {
+ "name": "postgresql-1",
+ "image": {
+ "name": "postgres",
+ "tag": "9.2"
+ },
+ "env": {
+ "PGPASSWORD": "${DB_PASSWORD}",
+ "PGUSER": "${DB_USER}",
+ "PGDATABASE": "${DB_NAME}"
+ },
+ "ports": [
+ {
+ "containerPort": 5432,
+ "hostPort": 5432
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "name": "frontend",
+ "description": "Sample PHP 5.2 application served by NGINX",
+ "labels": {
+ "name": "frontend-service"
+ },
+ "deploymentConfig": {
+ "deployment": {
+ "podTemplate": {
+ "containers": [
+ {
+ "name": "nginx-php-app",
+ "hooks": {
+ "prestart": {
+ "cmd": "import_database.sh"
+ },
+ "url": "git://github.com/user/myapp-hooks.git"
+ },
+ "image": {
+ "name": "mfojtik/nginx-php-app",
+ "tag": "latest"
+ },
+ "ports": [
+ {
+ "containerPort": 8080,
+ "hostPort": 8080
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/api/examples/template_example_2.json b/api/examples/template_example_2.json
new file mode 100644
index 000000000000..b5d9226c4345
--- /dev/null
+++ b/api/examples/template_example_2.json
@@ -0,0 +1,120 @@
+{
+ "id": "example2",
+ "name": "redis-cluster",
+ "description": "Example Redis cluster",
+ "buildConfig": [
+ {
+ "type": "docker",
+ "name": "kubernetes/redis-slave",
+ "imageRepository": "int.registry.com:5000/brendanburns/redis-slave",
+ "sourceUri": "https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/examples/guestbook/redis-slave/Dockerfile"
+ },
+ {
+ "name": "dockerfile/redis",
+ "type": "docker",
+ "imageRepository": "registry.hub.docker.com/dockerfile/redis",
+ "sourceUri": "https://raw.githubusercontent.com/dockerfile/redis/master/Dockerfile"
+ }
+ ],
+ "imageRepository": [
+ {
+ "name": "brendanburns/redis-slave",
+ "url": "registry.hub.docker.com/brendanburns/redis-slave"
+ },
+ {
+ "name": "dockerfile/redis",
+ "url": "registry.hub.docker.com/dockerfile/redis"
+ }
+ ],
+ "parameters": [
+ {
+ "name": "REDIS_PASSWORD",
+ "description": "Password to connect to the Redis server",
+ "type": "string",
+ "generate": "[a-zA-Z0-9]{8}"
+ }
+ ],
+ "serviceLinks": [
+ {
+ "export": [
+ {
+ "name": "REDIS_PASSWORD",
+ "value": "${REDIS_PASSWORD}"
+ }
+ ],
+ "from": "redismaster",
+ "to": "redisslaves"
+ }
+ ],
+ "services": [
+ {
+ "name": "redis-master",
+ "description": "Redis master service",
+ "labels": {
+ "name": "redis-master"
+ },
+ "deploymentConfig": {
+ "deployment": {
+ "podTemplate": {
+ "containers": [
+ {
+ "name": "redismaster",
+ "image": {
+ "name": "dockerfile/redis",
+ "tag": "latest"
+ },
+ "env": {
+ "REDIS_PASSWORD": "${REDIS_PASSWORD}"
+ },
+ "ports": [
+ {
+ "containerPort": 6379,
+ "hostPort": 6379
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ },
+ {
+ "name": "redisslaves",
+ "description": "A service with set of Redis slaves",
+ "labels": {
+ "name": "redis-slaves"
+ },
+ "deploymentConfig": {
+ "deployment": {
+ "podTemplate": {
+ "containers": [
+ {
+ "name": "redis-slave",
+ "image": {
+ "name": "brendanburns/redis-slave",
+ "tag": "latest"
+ },
+ "ports": [
+ {
+ "containerPort": 6379,
+ "hostPort": 6379
+ }
+ ]
+ }
+ ],
+ "replicas": 3,
+ "replicaSelector": {
+ "name": "redis-slave"
+ },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "labels": {
+ "name": "redis-slave"
+ }
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/api/examples/template_example_3.json b/api/examples/template_example_3.json
new file mode 100644
index 000000000000..a38ee5bf902b
--- /dev/null
+++ b/api/examples/template_example_3.json
@@ -0,0 +1,26 @@
+{
+ "description": "Example of PHP application project linked to a Redis cluster project",
+ "id": "example3",
+ "kind": "Project",
+ "name": "php-app-with-redis",
+ "projectLinks": [
+ {
+ "from": {
+ "project": "example2",
+ "services": [
+ {
+ "name": "redis-master",
+ "export": [{
+ "name": "REDIS_PASSWORD",
+ "value": "${REDIS_PASSWORD}"
+ }
+ ]
+ }
+ ]
+ },
+ "to": {
+ "project": "example1"
+ }
+ }
+ ]
+}
diff --git a/api/examples/templates.json b/api/examples/templates.json
new file mode 100644
index 000000000000..d7accc0508e0
--- /dev/null
+++ b/api/examples/templates.json
@@ -0,0 +1,53 @@
+{
+ "list":
+ [
+ {
+ "services": [
+ {
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+ ],
+ "links": [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+ }
+ ]
+}
diff --git a/api/examples/update-image.json b/api/examples/update-image.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/update-image.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/examples/update-link.json b/api/examples/update-link.json
new file mode 100644
index 000000000000..9835c275acdd
--- /dev/null
+++ b/api/examples/update-link.json
@@ -0,0 +1,16 @@
+{
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
diff --git a/api/oov3.html b/api/oov3.html
new file mode 100644
index 000000000000..4811817cd914
--- /dev/null
+++ b/api/oov3.html
@@ -0,0 +1,8496 @@
+
+
+
+ OpenShiftV3 API documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/projects
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List all projects for your account.
+
Projects are a similar concept to v2 domains. A project is a grouping of services
+with shared access control and resource limits. Applications can be assembled
+from services in a project by linking them together via service endpoints.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ },
+ {
+ "id": "54c4259f076573c0f4000023",
+ "suffix": "dev.rhcloud.com",
+ "name": "appdomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "myproject",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/project/{projectID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ projectID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "myproject",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ projectID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "newproject-name"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ projectID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instantiate a template in the given project
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ projectID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "templateId": "the-template-id"
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/image-repositories
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lists all image repositories that you have access to.
+
An image repository is a collection of images that share the same metadata. It contains
+multiple versions of an image as it evolves over time with new builds of the codebase.
+An image repository may be associated with a build which can be triggered by an event such
+as a commit to a source repository. The build will then push a new image on to the repository.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Query Parameters
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "visibility": "public",
+ "domain": "domain",
+ "name": "server/domain/nginx",
+ "environment":
+ {
+ "VAR1": "value1",
+ "VAR2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "latest":"v5"
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create a new image repository
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "visibility": "public",
+ "domain": "domain",
+ "name": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "latest":"v4"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/image-repository/{repositoryID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Get information about an image repository
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ repositoryID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "visibility": "public",
+ "domain": "domain",
+ "name": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "latest":"v4"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Update an image repository
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ repositoryID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "visibility": "public",
+ "domain": "domain",
+ "name": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "latest":"v4"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Delete an image repository
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ repositoryID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/images
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lists images visible to you
+
Images can be stored in Openshift servers or can be references to images from
+an external repository. The metadata that Openshift stores for an image will augment
+the metadata that has already been specified in the image through its Dockerfile.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Query Parameters
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "nginx-19273412433342",
+ "image-stream": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "commands": [
+ {
+ "memory-dump": "/bin/dump"
+ }
+ ]
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create a new image definition
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "url":"https://registry.hub.docker.com/u/library/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/image/{imageID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ imageID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "nginx-19273412433342",
+ "image-stream": "server/domain/nginx",
+ "environment":
+ {
+ "name1": "value1",
+ "name2": "value2"
+ },
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "commands": [
+ {
+ "memory-dump": "/bin/dump"
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/services
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lists all services that your account has access to
+
Services can be public or owned by a project. They contain a template of a pod and
+reference image repositories that supply the images for those templates. A service may
+be configured to react to an image being pushed to an image repository by initiating a
+deployment. Deployments are associated with a service and make use of
+Kubernetes replication controllers to manage pods in a cluster.
+For deployments, a service contains a policy that constrains how deployments can occur.
+For example, it may require that there exist at least 2 operational pods at all times.
+A deployment needs to operate under those constraints when making changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Query Parameters
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "name": "service-name",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ]
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/service/{serviceID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Get a specific service definition
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Environment variables associated with this service
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ [
+ { "name": "var1", "value": "value1" },
+ { "name": "var2", "value": "value2" }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create/update environment variables
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ [
+ { "name": "var1", "value": "value1" },
+ { "name": "var2", "value": "value2" }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Get environment variable
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+ -
+ variableName:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data": { "name": "var1", "value": "value1" }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Update an environment variable's value
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+ -
+ variableName:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data": { "name": "var1", "value": "value1" }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Delete an environment variable
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+ -
+ variableName:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/deployments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lists active deployments in the current project
+
Deployments effect change in a service such as scaling up, down, updating the
+current image, etc. Deployments may use different policies for carrying out
+the change. For example, a rolling update with a single pod change at a time, or
+a batch update, etc. Deployments make use of Kubernetes replicationControllers
+to bring about the changes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list": [
+ {
+ "id": "1234235172374",
+ "serviceId": "the-service-id",
+ "replicationControllers": [
+ "replication-controller-id1",
+ "replication-controller-id2",
+ "replication-controller-id3"
+ ],
+ "currentState": {
+ "replicas": 1,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx/v2tag",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "status": "active"
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create a new deployment
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "object": {
+ "id": "1234235172374",
+ "serviceId": "the-service-id",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx/v2tag",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }]
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/deployment/{deploymentID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ deploymentID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "object": {
+ "id": "1234235172374",
+ "serviceId": "the-service-id",
+ "replicationControllers": [
+ "replication-controller-id1",
+ "replication-controller-id2",
+ "replication-controller-id3"
+ ],
+ "currentState": {
+ "replicas": 1,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "nginx"
+ },
+ "containers": [{
+ "image": "dockerfile/nginx/v2tag",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }],
+ },
+ "status": "active"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/links
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List of links between services in your account
+
Unlike a Docker link, a Link in OpenShift defines a relationship between services
+which may be composed by multiple Docker images. A link may include additional metadata
+about the relationship such as the algorithm to use to distribute requests.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Query Parameters
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create a new link between this service and a different service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/link/{linkID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ linkID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ linkID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ linkID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/aliases
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List all aliases visible to you
+
Aliases in v3 perform the same function as aliases in v2. The main difference
+is that in v3 an alias is associated with a service, not an application.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Query Parameters
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "id": "myalias",
+ "ssl_certificate": "-----BEGIN CERTIFICATE-----\nMIIDoDCCAogCCQDzF8AJCHnrbjANBgkqhkiG9w0BAQUFADCBkTELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJl\nZGhhdDESMBAGA1UECwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAm\nBgkqhkiG9w0BCQEWGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wHhcNMTMwMjE5\nMjExMTQ4WhcNMTQwMjE5MjExMTQ4WjCBkTELMAkGA1UEBhMCVVMxCzAJBgNVBAgM\nAkNBMRIwEAYDVQQHDAlTdW5ueXZhbGUxDzANBgNVBAoMBnJlZGhhdDESMBAGA1UE\nCwwJb3BlbnNoaWZ0MRIwEAYDVQQDDAlvcGVuc2hpZnQxKDAmBgkqhkiG9w0BCQEW\nGWluZm9Ab3BlbnNoaWZ0LnJlZGhhdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB\nDwAwggEKAoIBAQDAEbH4MCi3iIDP1HS+/Xwu8SjdSc5WJX6htV7hJpmFZ8HohV/8\nba0v6aM9IJIIt+sIe2J62t/9G3leOdIHBxeACN4fV2l/iA/fvxvlnFKeD7sHm9Oc\nYj1H6YYJ57sIOf/oLDpJl6l3Rw8VC3+3W0/lzlVpA8qt7fpkiW7XQJCPplUSrdVC\n3okQ2T5NAod5+wVIOqELgE5bLX1LRs5VPsjytHkJ7rKXs55FHR3kpsoImn5xD0Ky\n6lRn8cIMolQoyN5HIGr8f5P+07hrHibve8jje/DKTssb5yEUAEmh6iGHQsRAnsUW\nQoIEUOLqQCu9re2No4G52Kl2xQIjyJF7rCfxAgMBAAEwDQYJKoZIhvcNAQEFBQAD\nggEBAGHrya/ZkiAje2kHsOajXMlO2+y1iLfUDcRLuEWpUa8sI5EM4YtemQrsupFp\n8lVYG5C4Vh8476oF9t8Wex5eH3ocwbSvPIUqE07hdmrubiMq4wxFVRYq7g9lHAnx\nl+bABuN/orbAcPcGAGg7AkXVoAc3Fza/ZcgMcw7NOtDTEss70V9OdgCfQUJL0KdO\nhCO8bQ1EaEiq6zEh8RpZe8mu+f/GYATX1I+eJUc6F6cn83oJjE9bqAVzk7TzTHeK\nEBKN50C14wWtXeG7n2+ugaVO+0xnvHeUrQBLHSRyOHqxXrQQ5XmzcaBiyI0f2IQM\nHst1BVXyX0n/L/ZoYYsv5juJmDo=\n-----END CERTIFICATE-----",
+ "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwBGx+DAot4iAz9R0vv18LvEo3UnOViV+obVe4SaZhWfB6IVf\n/G2tL+mjPSCSCLfrCHtietrf/Rt5XjnSBwcXgAjeH1dpf4gP378b5ZxSng+7B5vT\nnGI9R+mGCee7CDn/6Cw6SZepd0cPFQt/t1tP5c5VaQPKre36ZIlu10CQj6ZVEq3V\nQt6JENk+TQKHefsFSDqhC4BOWy19S0bOVT7I8rR5Ce6yl7OeRR0d5KbKCJp+cQ9C\nsupUZ/HCDKJUKMjeRyBq/H+T/tO4ax4m73vI43vwyk7LG+chFABJoeohh0LEQJ7F\nFkKCBFDi6kArva3tjaOBudipdsUCI8iRe6wn8QIDAQABAoIBAG/on4JVRRQSw8LU\nLiWt+jI7ryyoOUH2XL8JtzuGSwLwvomlVJT2rmbxQXx3Qr8zsgziHzIn30RRQrkF\nBXu0xRuDjzBBtSVqeJ1Mc4uoNncEAVxgjb5bewswZDnXPCGB8bosMtX4OPRXgdEo\nPwTtfjMOsrMaU3hd5Xu4m81tQA2BvwOlx8aYDyH0jeTnervc5uRGbeTBQG4Bu40E\nrWNmXvgNq2EzTAwbbN6Ma97gw9KgXnM4Nlh29Fxb5TBeUU9lkzuTZAZIDXKIm7AG\nUwMbj/A038yAumYQtThTE/3e4W3rn7F2Vko900bC4aAC1KQOAzjIeQqzqkVxWTWq\n4SUFQAECgYEA/ODwifOTuI6hdZK6JRgc4wp6Rc0fkqHuxLzABXoIGuSVlWyimqIN\nZySAkpo5EW6DNraRJxNCOBmWeGPEhHGrea+JPiPEwCK0F7SxvSmg3jzNzw3Es31T\necET7eDwuSOY9v4XDzLyiXXkEUUReD7Ng2hEYL+HaQrl5jWj4lxgq/ECgYEAwnCb\nKrz7FwX8AqtFAEi6uUrc12k1xYKQfrwSxbfdK2vBBUpgB71Iq/fqP+1BittEljDG\n8f4jEtMBFfEPhLzGIHaI3UiHUHXS4GetA77TRgR8lnKKpj1FcMIY2iKU479707O5\nQ08pgWRUDQ8BVg2ePgbo5QjLMc/rv7UF3AHvPAECgYB/auAIwqDGN6gHU/1TP4ke\npWLi1O55tfpXSzv+BnUbB96PQgPUop7aP7xBIlBrBiI7aVZOOBf/qHT3CF421geu\n8tHWa7NxlIrl/vgn9lfGYyDYmXlpb1amXLEsBVGGF/e1TGZWFDe9J5fZU9HvosVu\n1xTNIvSZ6xHYI2MGZcGYIQKBgEYeebaV5C7PV6xWu1F46O19U9rS9DM//H/XryVi\nQv4vo7IWuj7QQe7SPsXC98ntfPR0rqoCLf/R3ChfgGsr8H8wf/bc+v9HHj8S5E/f\ndy1e3Nccg2ej3PDm7jNsGSlwmmUkAQGHAL7KwYzcBm1UB+bycvZ1j2FtS+UckPpg\nMDgBAoGALD8PkxHb4U4DtbNFSYRrUdvS9heav/yph3lTMfifNkOir36io6v8RPgb\nD2bHKKZgmYlTgJrxD45Er9agC5jclJO35QRU/OfGf3GcnABkBI7vlvUKADAo65Sq\nweZkdJnbrIadcvLOHOzkKC9m+rxFTC9VoN1dwK2zwYvUXfa1VJA=\n-----END RSA PRIVATE KEY-----",
+ "pass_phrase": "abcd"
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create an alias for this service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/alias/{aliasID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ aliasID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ aliasID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "suffix": "dev.rhcloud.com",
+ "name": "mydomain",
+ "members": [
+ {
+ "login": "adminuser",
+ "role": "admin",
+ "type": "user",
+ "owner": true
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ aliasID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/builds
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Retrieves a list of builds visible to you
+
A build is associated with an image repository and can be triggered by a webhook
+on Github. It can either be a Docker build or a source build based on a
+specified image. When a build completes, it posts a new image to the image
+repository that it's associated with.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000002",
+ "imageStream": "server/name",
+ "type": "source-build",
+ "repository": "openshift/myapp"
+ "builderImageStream": "myserver/builderimage"
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "imageStream": "server/name",
+ "type": "docker-build",
+ "repository": "openshift/dockerrepo"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/build/{buildId}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Retrieve a single build definition
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ buildId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "imageStream": "server/name",
+ "type": "docker-build",
+ "repository": "openshift/dockerrepo"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Update a build definition
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ buildId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "imageStream": "server/name",
+ "type": "docker-build",
+ "repository": "openshift/dockerrepo"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Delete a build definition
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ buildId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ buildId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "archiveUrl": "http://url/to/my/archive"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Retrieves list of build results
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ buildId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "startTime": "2014-07-15T03:58:40Z",
+ "endTime": "2014-07-15T03:59:40Z",
+ "result": "SUCCESS",
+ "logs": "http://url/to/build/logs"
+ },
+ {
+ "id": "53c4249f076573c0f4000002",
+ "startTime": "2014-07-15T04:58:40Z",
+ "endTime": "2014-07-15T04:59:40Z",
+ "result": "FAILURE",
+ "logs": "http://url/to/build/logs"
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/templates
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lists all templates that your account has access to
+
A template defines 0..n services and 0..m links. When it is applied
+to an existing project, those services and links are instantiated for
+that project.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "list":
+ [
+ {
+ "services": [
+ {
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+ ],
+ "links": [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "services": [
+ {
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+ ],
+ "links": [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/template/{templateID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Get a specific template
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ templateID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "services": [
+ {
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+ ],
+ "links": [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ templateID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "services": [
+ {
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+ ],
+ "links": [
+ {
+ "id": "53c4249f076573c0f4000001",
+ "projectId": "myproject-1234123132",
+ "source": {
+ "serviceId": "nginx-1893747912737"
+ },
+ "destination": {
+ "serviceId": "ruby1.9-1237471273",
+ "port": 8080
+ }
+ "policy": "round-robin"
+ }
+ ]
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ templateID:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/pods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List all pods on this cluster
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "items": [
+ {
+ "id": "my-pod-1",
+ "labels": {
+ "name": "testRun",
+ "replicationController": "testRun"
+ },
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "my-pod-1",
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "hostPort": 8080,
+ "containerPort": 80
+ }]
+ }
+ }
+ },
+ "currentState": {
+ "host": "host-1"
+ }
+ },
+ {
+ "id": "my-pod-2",
+ "labels": {
+ "name": "testRun",
+ "replicationController": "testRun"
+ },
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "my-pod-2",
+ "containers": [{
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "hostPort": 8080,
+ "containerPort": 80
+ }]
+ }
+ }
+ },
+ "currentState": {
+ "host": "host-2"
+ }
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create a new pod. currentState is ignored if present.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+ Schema:
+ {
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "Pod resource. A pod corresponds to a co-located group of [Docker containers](http://docker.io).",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "desiredState": {
+ "type": "object",
+ "required": false,
+ "description": "The desired configuration of the pod",
+ "properties": {
+ "manifest": {
+ "type": "object",
+ "required": false,
+ "description": "Manifest describing group of [Docker containers](http://docker.io); compatible with format used by [Google Cloud Platform's container-vm images](https://developers.google.com/compute/docs/containers)"
+ },
+ "status": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "host": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "hostIP": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "info": {
+ "type": "object",
+ "required": false,
+ "description": ""
+ }
+ }
+ },
+ "currentState": {
+ "type": "object",
+ "required": false,
+ "description": "The current configuration and status of the pod. Fields in common with desiredState have the same meaning.",
+ "properties": {
+ "manifest": {
+ "type": "object",
+ "required": false
+ },
+ "status": {
+ "type": "string",
+ "required": false
+ },
+ "host": {
+ "type": "string",
+ "required": false
+ },
+ "hostIP": {
+ "type": "string",
+ "required": false
+ },
+ "info": {
+ "type": "object",
+ "required": false
+ }
+ }
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ Example:
+ {
+ "id": "php",
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "php",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "containerPort": 80,
+ "hostPort": 8080
+ }],
+ "livenessProbe": {
+ "enabled": true,
+ "type": "http",
+ "initialDelaySeconds": 30,
+ "httpGet": {
+ "path": "/index.html",
+ "port": "8080"
+ }
+ }
+ }]
+ }
+ },
+ "labels": {
+ "name": "foo"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ podId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "id": "php",
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "php",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "containerPort": 80,
+ "hostPort": 8080
+ }],
+ "livenessProbe": {
+ "enabled": true,
+ "type": "http",
+ "initialDelaySeconds": 30,
+ "httpGet": {
+ "path": "/index.html",
+ "port": "8080"
+ }
+ }
+ }]
+ }
+ },
+ "labels": {
+ "name": "foo"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ podId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+ Schema:
+ {
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "Pod resource. A pod corresponds to a co-located group of [Docker containers](http://docker.io).",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "desiredState": {
+ "type": "object",
+ "required": false,
+ "description": "The desired configuration of the pod",
+ "properties": {
+ "manifest": {
+ "type": "object",
+ "required": false,
+ "description": "Manifest describing group of [Docker containers](http://docker.io); compatible with format used by [Google Cloud Platform's container-vm images](https://developers.google.com/compute/docs/containers)"
+ },
+ "status": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "host": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "hostIP": {
+ "type": "string",
+ "required": false,
+ "description": ""
+ },
+ "info": {
+ "type": "object",
+ "required": false,
+ "description": ""
+ }
+ }
+ },
+ "currentState": {
+ "type": "object",
+ "required": false,
+ "description": "The current configuration and status of the pod. Fields in common with desiredState have the same meaning.",
+ "properties": {
+ "manifest": {
+ "type": "object",
+ "required": false
+ },
+ "status": {
+ "type": "string",
+ "required": false
+ },
+ "host": {
+ "type": "string",
+ "required": false
+ },
+ "hostIP": {
+ "type": "string",
+ "required": false
+ },
+ "info": {
+ "type": "object",
+ "required": false
+ }
+ }
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ Example:
+ {
+ "id": "php",
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "php",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{
+ "containerPort": 80,
+ "hostPort": 8080
+ }],
+ "livenessProbe": {
+ "enabled": true,
+ "type": "http",
+ "initialDelaySeconds": 30,
+ "httpGet": {
+ "path": "/index.html",
+ "port": "8080"
+ }
+ }
+ }]
+ }
+ },
+ "labels": {
+ "name": "foo"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ podId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/replicationControllers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List all replicationControllers on this cluster
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "items": [
+ {
+ "id": "testRun",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {
+ "name": "testRun"
+ },
+ "podTemplate": {
+ "desiredState": {
+ "image": "dockerfile/nginx",
+ "networkPorts": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ]
+ },
+ "labels": {
+ "name": "testRun"
+ }
+ }
+ },
+ "labels": {
+ "name": "testRun"
+ }
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Create a new controller. currentState is ignored if present.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+ Schema:
+ {
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "A replicationController resource. A replicationController helps to create and manage a set of pods. It acts as a factory to create new pods based on a template. It ensures that there are a specific number of pods running. If fewer pods are running than `replicas` then the needed pods are generated using `podTemplate`. If more pods are running than `replicas`, then excess pods are deleted.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "desiredState": {
+ "type": "object",
+ "required": false,
+ "description": "The desired configuration of the replicationController",
+ "properties": {
+ "replicas": {
+ "type": "number",
+ "required": false,
+ "description": "Number of pods desired in the set"
+ },
+ "replicaSelector": {
+ "type": "object",
+ "required": false,
+ "description": "Required labels used to identify pods in the set"
+ },
+ "podTemplate": {
+ "type": "object",
+ "required": false,
+ "description": "Template from which to create new pods, as necessary. Identical to pod schema."
+ }
+ }
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ Example:
+ {
+ "id": "nginxController",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {"name": "nginx"},
+ "podTemplate": {
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "nginxController",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }]
+ }
+ },
+ "labels": {"name": "nginx"}
+ }},
+ "labels": {"name": "nginx"}
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Get a specific controller
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ controllerId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "id": "nginxController",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {"name": "nginx"},
+ "podTemplate": {
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "nginxController",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }]
+ }
+ },
+ "labels": {"name": "nginx"}
+ }},
+ "labels": {"name": "nginx"}
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ controllerId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+ Schema:
+ {
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "A replicationController resource. A replicationController helps to create and manage a set of pods. It acts as a factory to create new pods based on a template. It ensures that there are a specific number of pods running. If fewer pods are running than `replicas` then the needed pods are generated using `podTemplate`. If more pods are running than `replicas`, then excess pods are deleted.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "desiredState": {
+ "type": "object",
+ "required": false,
+ "description": "The desired configuration of the replicationController",
+ "properties": {
+ "replicas": {
+ "type": "number",
+ "required": false,
+ "description": "Number of pods desired in the set"
+ },
+ "replicaSelector": {
+ "type": "object",
+ "required": false,
+ "description": "Required labels used to identify pods in the set"
+ },
+ "podTemplate": {
+ "type": "object",
+ "required": false,
+ "description": "Template from which to create new pods, as necessary. Identical to pod schema."
+ }
+ }
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ Example:
+ {
+ "id": "nginxController",
+ "desiredState": {
+ "replicas": 2,
+ "replicaSelector": {"name": "nginx"},
+ "podTemplate": {
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "nginxController",
+ "containers": [{
+ "name": "nginx",
+ "image": "dockerfile/nginx",
+ "ports": [{"containerPort": 80, "hostPort": 8080}]
+ }]
+ }
+ },
+ "labels": {"name": "nginx"}
+ }},
+ "labels": {"name": "nginx"}
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Delete a specific controller
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ controllerId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/lbservices
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
List all services on this cluster
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "items": [
+ {
+ "id": "example1",
+ "port": 8000,
+ "labels": {
+ "name": "nginx"
+ }
+ "selector": {
+ "name": "nginx"
+ }
+ },
+ {
+ "id": "example2",
+ "port": 8080,
+ "labels": {
+ "env": "prod",
+ "name": "jetty"
+ }
+ "selector": {
+ "env": "prod",
+ "name": "jetty"
+ }
+ }
+ ]
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+ Schema:
+ {
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "A service resource.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "name": {
+ "type": "string",
+ "required": false
+ },
+ "port": {
+ "type": "number",
+ "required": false
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ },
+ "selector": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ Example:
+ {
+ "id": "example",
+ "port": 8000,
+ "labels": {
+ "name": "nginx"
+ },
+ "selector": {
+ "name": "nginx"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+ Schema:
+ {
+ "$schema": "http://json-schema.org/draft-03/schema",
+ "type": "object",
+ "required": false,
+ "description": "A service resource.",
+ "properties": {
+ "kind": {
+ "type": "string",
+ "required": false
+ },
+ "id": {
+ "type": "string",
+ "required": false
+ },
+ "creationTimestamp": {
+ "type": "string",
+ "required": false
+ },
+ "selfLink": {
+ "type": "string",
+ "required": false
+ },
+ "name": {
+ "type": "string",
+ "required": false
+ },
+ "port": {
+ "type": "number",
+ "required": false
+ },
+ "labels": {
+ "type": "object",
+ "required": false
+ },
+ "selector": {
+ "type": "object",
+ "required": false
+ }
+ }
+}
+
+
+
+
+
+
+
+
+ Example:
+ {
+ "data":
+ {
+ "id": "53c4249f076573c0f4000001",
+ "name": "service-name",
+ "domain": "domain-id",
+ "desiredState":
+ {
+ "replicas": 3,
+ "replicaSelector": { "name": "service-name" },
+ "replicaPolicy": {
+ "atLeast": 2
+ },
+ "activeDeployment": "a_deployment_id",
+ "podTemplate":
+ {
+ "desiredState":
+ {
+ "image": "server/domain/name",
+ "network-ports": [
+ {
+ "hostPort": 8080,
+ "containerPort": 80
+ }
+ ],
+ "owner": true
+ },
+ "labels": {
+ "name": "service-name"
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Delete a specific service
+
+
+
+
+
+
+
+
+
+
URI Parameters
+
+
+ -
+ serviceId:
+
+
+ required
+
+ (string)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
HTTP status code 200
+
+
+
+
+
+
Body
+
+
Type: application/json
+
+
+
+
+
+
+ Example:
+ {
+ "success": true
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api/oov3.raml b/api/oov3.raml
new file mode 100644
index 000000000000..a200672ad5d2
--- /dev/null
+++ b/api/oov3.raml
@@ -0,0 +1,475 @@
+#%RAML 0.8
+# vim: set ft=yaml:
+baseUri: http://server/broker/rest
+title: OpenShiftV3 -- Draft
+version: alpha
+mediaType: application/json
+documentation:
+ - title: Overview
+ content: !include doc/overview.md
+/projects:
+ get:
+ description: |
+ List all projects for your account.
+
+ Projects are a similar concept to v2 domains. A project is a grouping of services
+ with shared access control and resource limits. Applications can be assembled
+ from services in a project by linking them together via service endpoints.
+ responses:
+ 200:
+ body:
+ example: !include examples/project-list.json
+ post:
+ description: Create a new project
+ body:
+ example: !include examples/project.json
+
+/project/{projectID}:
+ get:
+ description: Get a specific project
+ responses:
+ 200:
+ body:
+ example: !include examples/project.json
+ put:
+ description: Update a project
+ body:
+ example: !include examples/project-put.json
+ delete:
+ description: Delete a project
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+ post:
+ description: Instantiate a template in the given project
+ body:
+ example: !include examples/project-post.json
+/image-repositories:
+ get:
+ queryParameters:
+ projectId:
+ description: Filter list by project
+ type: string
+ visibility:
+ description: Filter by visibility (public, private)
+ type: string
+ description: |
+ Lists all image repositories that you have access to.
+
+ An image repository is a collection of images that share the same metadata. It contains
+ multiple versions of an image as it evolves over time with new builds of the codebase.
+ An image repository may be associated with a build which can be triggered by an event such
+ as a commit to a source repository. The build will then push a new image on to the repository.
+ responses:
+ 200:
+ body:
+ example: !include examples/image-repositories.json
+ post:
+ description: Create a new image repository
+ body:
+ example: !include examples/image-repository.json
+/image-repository/{repositoryID}:
+ get:
+ description: Get information about an image repository
+ body:
+ example: !include examples/image-repository.json
+ put:
+ description: Update an image repository
+ body:
+ example: !include examples/image-repository.json
+ delete:
+ description: Delete an image repository
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+/images:
+ get:
+ queryParameters:
+ repositoryId:
+ description: Filter list by repository
+ type: string
+ description: |
+ Lists images visible to you
+
+ Images can be stored in Openshift servers or can be references to images from
+ an external repository. The metadata that Openshift stores for an image will augment
+ the metadata that has already been specified in the image through its Dockerfile.
+ responses:
+ 200:
+ body:
+ example: !include examples/images.json
+ post:
+ description: Create a new image definition
+ body:
+ example: !include examples/create-image.json
+/image/{imageID}:
+ get:
+ description: Get image definition
+ body:
+ example: !include examples/image.json
+
+/services:
+ get:
+ description: |
+ Lists all services that your account has access to
+
+ Services can be public or owned by a project. They contain a template of a pod and
+ reference image repositories that supply the images for those templates. A service may
+ be configured to react to an image being pushed to an image repository by initiating a
+ deployment. Deployments are associated with a service and make use of
+ Kubernetes replication controllers to manage pods in a cluster.
+ For deployments, a service contains a policy that constrains how deployments can occur.
+ For example, it may require that there exist at least 2 operational pods at all times.
+ A deployment needs to operate under those constraints when making changes.
+ queryParameters:
+ projectId:
+ description: filter the services owned by a particular project
+ responses:
+ 200:
+ body:
+ example: !include examples/services.json
+ post:
+ description: Create a new service
+ body:
+ example: !include examples/create-service.json
+/service/{serviceID}:
+ get:
+ description: Get a specific service definition
+ body:
+ example: !include examples/service.json
+ put:
+ description: Update a service
+ body:
+ example: !include examples/service.json
+ delete:
+ description: Delete a service
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+ /environment-variables:
+ get:
+ description: Environment variables associated with this service
+ responses:
+ 200:
+ body:
+ example: !include examples/envvars.json
+ post:
+ description: Create/update environment variables
+ body:
+ example: !include examples/envvars.json
+ /{variableName}:
+ get:
+ description: Get environment variable
+ body:
+ example: !include examples/envvar.json
+ put:
+ description: Update an environment variable's value
+ body:
+ example: !include examples/envvar.json
+ delete:
+ description: Delete an environment variable
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+/deployments:
+ get:
+ description: |
+ Lists active deployments in the current project
+
+ Deployments effect change in a service such as scaling up, down, updating the
+ current image, etc. Deployments may use different policies for carrying out
+ the change. For example, a rolling update with a single pod change at a time, or
+ a batch update, etc. Deployments make use of Kubernetes replicationControllers
+ to bring about the changes.
+ responses:
+ 200:
+ body:
+ example: !include examples/deployments.json
+ post:
+ description: Create a new deployment
+ body:
+ example: !include examples/create-deployment.json
+/deployment/{deploymentID}:
+ get:
+ description: Get deployment details
+ body:
+ example: !include examples/deployment.json
+/links:
+ get:
+ description: |
+ List of links between services in your account
+
+ Unlike a Docker link, a Link in OpenShift defines a relationship between services
+ which may be composed by multiple Docker images. A link may include additional metadata
+ about the relationship such as the algorithm to use to distribute requests.
+ queryParameters:
+ projectId:
+ description: filter the links owned by a particular project
+ serviceId:
+ description: filter the links attached to a particular service
+ responses:
+ 200:
+ body:
+ example: !include examples/links.json
+ post:
+ description: Create a new link between this service and a different service
+ body:
+ example: !include examples/link.json
+/link/{linkID}:
+ get:
+ description: Get link details
+ body:
+ example: !include examples/link.json
+ put:
+ description: Update a link
+ body:
+ example: !include examples/link.json
+ delete:
+ description: Delete a link
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+/aliases:
+ get:
+ description: |
+ List all aliases visible to you
+
+ Aliases in v3 perform the same function as aliases in v2. The main difference
+ is that in v3 an alias is associated with a service, not an application.
+ queryParameters:
+ serviceId:
+ description: filter aliases by associated service
+ responses:
+ 200:
+ body:
+ example: !include examples/aliases.json
+ post:
+ description: Create an alias for this service
+ body:
+ example: !include examples/alias.json
+/alias/{aliasID}:
+ get:
+ description: Get alias
+ body:
+ example: !include examples/alias.json
+ put:
+ description: Update an alias
+ body:
+ example: !include examples/alias.json
+ delete:
+ description: Delete an alias
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+/builds:
+ get:
+ description: |
+ Retrieves a list of builds visible to you
+
+ A build is associated with an image repository and can be triggered by a webhook
+ on Github. It can either be a Docker build or a source build based on a
+ specified image. When a build completes, it posts a new image to the image
+ repository that it's associated with.
+ responses:
+ 200:
+ body:
+ example: !include examples/builds.json
+ post:
+ description: Create a new build
+ body:
+ example: !include examples/build.json
+/build/{buildId}:
+ get:
+ description: Retrieve a single build definition
+ responses:
+ 200:
+ body:
+ example: !include examples/build.json
+ put:
+ description: Update a build definition
+ body:
+ example: !include examples/build.json
+ delete:
+ description: Delete a build definition
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+ post:
+ description: Launch a build
+ body:
+ example: !include examples/launch-build.json
+ /results:
+ get:
+ description: Retrieves list of build results
+ responses:
+ 200:
+ body:
+ example: !include examples/build-results.json
+
+/templates:
+ get:
+ description: |
+ Lists all templates that your account has access to
+
+ A template defines 0..n services and 0..m links. When it is applied
+ to an existing project, those services and links are instantiated for
+ that project.
+ responses:
+ 200:
+ body:
+ example: !include examples/templates.json
+ post:
+ description: Create a new template
+ body:
+ example: !include examples/template.json
+/template/{templateID}:
+ get:
+ description: Get a specific template
+ body:
+ example: !include examples/template.json
+ put:
+ description: Update a template
+ body:
+ example: !include examples/template.json
+ delete:
+ description: Delete a template
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+/pods:
+ get:
+ description: List all pods on this cluster
+ responses:
+ 200:
+ body:
+ example: !include examples/pod-list.json
+ post:
+ description: Create a new pod. currentState is ignored if present.
+ body:
+ schema: !include doc/pod-schema.json
+ example: !include examples/pod.json
+
+ /{podId}:
+ get:
+ description: Get a specific pod
+ responses:
+ 200:
+ body:
+ example: !include examples/pod.json
+ put:
+ description: Update a pod
+ body:
+ schema: !include doc/pod-schema.json
+ example: !include examples/pod.json
+ delete:
+ description: Delete a specific pod
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+
+/replicationControllers:
+ get:
+ description: List all replicationControllers on this cluster
+ responses:
+ 200:
+ body:
+ example: !include examples/controller-list.json
+ post:
+ description: Create a new controller. currentState is ignored if present.
+ body:
+ schema: !include doc/controller-schema.json
+ example: !include examples/controller.json
+
+ /{controllerId}:
+ get:
+ description: Get a specific controller
+ responses:
+ 200:
+ body:
+ example: !include examples/controller.json
+ put:
+ description: Update a controller
+ body:
+ schema: !include doc/controller-schema.json
+ example: !include examples/controller.json
+ delete:
+ description: Delete a specific controller
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+
+/lbservices:
+ get:
+ description: List all services on this cluster
+ responses:
+ 200:
+ body:
+ example: !include examples/service-list.json
+ post:
+ description: Create a new service
+ body:
+ schema: !include doc/service-schema.json
+ example: !include examples/lbservice.json
+
+ /{serviceId}:
+ get:
+ description: Get a specific service
+ responses:
+ 200:
+ body:
+ example: !include examples/service.json
+ put:
+ description: Update a service
+ body:
+ schema: !include doc/service-schema.json
+ example: !include examples/service.json
+ delete:
+ description: Delete a specific service
+ responses:
+ 200:
+ body:
+ example: |
+ {
+ "success": true
+ }
+