github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/docs/reference/api-v1.2.rst (about)

     1  :title: Controller API v1.2
     2  :description: The v1.2 REST API for Deis' Controller
     3  
     4  Controller API v1.2
     5  ===================
     6  
     7  This is the v1.2 REST API for the :ref:`Controller`.
     8  
     9  
    10  What's New
    11  ----------
    12  
    13  **New!** ``/certs`` endpoint for managing custom domain certificates
    14  
    15  
    16  Authentication
    17  --------------
    18  
    19  
    20  Register a New User
    21  ```````````````````
    22  
    23  Example Request:
    24  
    25  .. code-block:: console
    26  
    27      POST /v1/auth/register/ HTTP/1.1
    28      Host: deis.example.com
    29      Content-Type: application/json
    30  
    31      {
    32          "username": "test",
    33          "password": "opensesame",
    34          "email": "test@example.com"
    35      }
    36  
    37  Optional Parameters:
    38  
    39  .. code-block:: console
    40  
    41      {
    42          "first_name": "test",
    43          "last_name": "testerson"
    44      }
    45  
    46  Example Response:
    47  
    48  .. code-block:: console
    49  
    50      HTTP/1.1 201 CREATED
    51      X_DEIS_API_VERSION: 1.2
    52      X_DEIS_PLATFORM_VERSION: 1.5.2
    53      Content-Type: application/json
    54  
    55      {
    56          "id": 1,
    57          "last_login": "2014-10-19T22:01:00.601Z",
    58          "is_superuser": true,
    59          "username": "test",
    60          "first_name": "test",
    61          "last_name": "testerson",
    62          "email": "test@example.com",
    63          "is_staff": true,
    64          "is_active": true,
    65          "date_joined": "2014-10-19T22:01:00.601Z",
    66          "groups": [],
    67          "user_permissions": []
    68      }
    69  
    70  
    71  Log in
    72  ``````
    73  
    74  Example Request:
    75  
    76  .. code-block:: console
    77  
    78      POST /v1/auth/login/ HTTP/1.1
    79      Host: deis.example.com
    80      Content-Type: application/json
    81  
    82      {"username": "test", "password": "opensesame"}
    83  
    84  Example Response:
    85  
    86  .. code-block:: console
    87  
    88      HTTP/1.1 200 OK
    89      X_DEIS_API_VERSION: 1.2
    90      X_DEIS_PLATFORM_VERSION: 1.5.2
    91      Content-Type: application/json
    92  
    93      {"token": "abc123"}
    94  
    95  
    96  Cancel Account
    97  ``````````````
    98  
    99  Example Request:
   100  
   101  .. code-block:: console
   102  
   103      DELETE /v1/auth/cancel/ HTTP/1.1
   104      Host: deis.example.com
   105      Authorization: token abc123
   106  
   107  Example Response:
   108  
   109  .. code-block:: console
   110  
   111      HTTP/1.1 204 NO CONTENT
   112      X_DEIS_API_VERSION: 1.2
   113      X_DEIS_PLATFORM_VERSION: 1.5.2
   114  
   115  
   116  Applications
   117  ------------
   118  
   119  
   120  List all Applications
   121  `````````````````````
   122  
   123  Example Request:
   124  
   125  .. code-block:: console
   126  
   127      GET /v1/apps HTTP/1.1
   128      Host: deis.example.com
   129      Authorization: token abc123
   130  
   131  Example Response:
   132  
   133  .. code-block:: console
   134  
   135      HTTP/1.1 200 OK
   136      X_DEIS_API_VERSION: 1.2
   137      X_DEIS_PLATFORM_VERSION: 1.5.2
   138      Content-Type: application/json
   139  
   140      {
   141          "count": 1,
   142          "next": null,
   143          "previous": null,
   144          "results": [
   145              {
   146                  "created": "2014-01-01T00:00:00UTC",
   147                  "id": "example-go",
   148                  "owner": "test",
   149                  "structure": {},
   150                  "updated": "2014-01-01T00:00:00UTC",
   151                  "url": "example-go.example.com",
   152                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   153              }
   154          ]
   155      }
   156  
   157  
   158  Create an Application
   159  `````````````````````
   160  
   161  Example Request:
   162  
   163  .. code-block:: console
   164  
   165      POST /v1/apps/ HTTP/1.1
   166      Host: deis.example.com
   167      Content-Type: application/json
   168      Authorization: token abc123
   169  
   170  Optional parameters:
   171  
   172  .. code-block:: console
   173  
   174      {"id": "example-go"}
   175  
   176  
   177  Example Response:
   178  
   179  .. code-block:: console
   180  
   181      HTTP/1.1 201 CREATED
   182      X_DEIS_API_VERSION: 1.2
   183      X_DEIS_PLATFORM_VERSION: 1.5.2
   184      Content-Type: application/json
   185  
   186      {
   187          "created": "2014-01-01T00:00:00UTC",
   188          "id": "example-go",
   189          "owner": "test",
   190          "structure": {},
   191          "updated": "2014-01-01T00:00:00UTC",
   192          "url": "example-go.example.com",
   193          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   194      }
   195  
   196  
   197  Destroy an Application
   198  ``````````````````````
   199  
   200  Example Request:
   201  
   202  .. code-block:: console
   203  
   204      DELETE /v1/apps/example-go/ HTTP/1.1
   205      Host: deis.example.com
   206      Authorization: token abc123
   207  
   208  Example Response:
   209  
   210  .. code-block:: console
   211  
   212      HTTP/1.1 204 NO CONTENT
   213      X_DEIS_API_VERSION: 1.2
   214      X_DEIS_PLATFORM_VERSION: 1.5.2
   215  
   216  
   217  List Application Details
   218  ````````````````````````
   219  
   220  Example Request:
   221  
   222  .. code-block:: console
   223  
   224      GET /v1/apps/example-go/ HTTP/1.1
   225      Host: deis.example.com
   226      Authorization: token abc123
   227  
   228  Example Response:
   229  
   230  .. code-block:: console
   231  
   232      HTTP/1.1 200 OK
   233      X_DEIS_API_VERSION: 1.2
   234      X_DEIS_PLATFORM_VERSION: 1.5.2
   235      Content-Type: application/json
   236  
   237      {
   238          "created": "2014-01-01T00:00:00UTC",
   239          "id": "example-go",
   240          "owner": "test",
   241          "structure": {},
   242          "updated": "2014-01-01T00:00:00UTC",
   243          "url": "example-go.example.com",
   244          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   245      }
   246  
   247  
   248  Retrieve Application Logs
   249  `````````````````````````
   250  
   251  Example Request:
   252  
   253  .. code-block:: console
   254  
   255      GET /v1/apps/example-go/logs/ HTTP/1.1
   256      Host: deis.example.com
   257      Authorization: token abc123
   258  
   259  Example Response:
   260  
   261  .. code-block:: console
   262  
   263      HTTP/1.1 200 OK
   264      X_DEIS_API_VERSION: 1.2
   265      X_DEIS_PLATFORM_VERSION: 1.5.2
   266      Content-Type: text/plain
   267  
   268      "16:51:14 deis[api]: test created initial release\n"
   269  
   270  
   271  Run one-off Commands
   272  ````````````````````
   273  
   274  .. code-block:: console
   275  
   276      POST /v1/apps/example-go/run/ HTTP/1.1
   277      Host: deis.example.com
   278      Content-Type: application/json
   279      Authorization: token abc123
   280  
   281      {"command": "echo hi"}
   282  
   283  Example Response:
   284  
   285  .. code-block:: console
   286  
   287      HTTP/1.1 200 OK
   288      X_DEIS_API_VERSION: 1.2
   289      X_DEIS_PLATFORM_VERSION: 1.5.2
   290      Content-Type: application/json
   291  
   292      {"rc": 0, "output": "hi"}
   293  
   294  
   295  Certificates
   296  ------------
   297  
   298  
   299  List all Certificates
   300  `````````````````````
   301  
   302  Example Request:
   303  
   304  .. code-block:: console
   305  
   306      GET /v1/certs HTTP/1.1
   307      Host: deis.example.com
   308      Authorization: token abc123
   309  
   310  Example Response:
   311  
   312  .. code-block:: console
   313  
   314      HTTP/1.1 200 OK
   315      X_DEIS_API_VERSION: 1.2
   316      X_DEIS_PLATFORM_VERSION: 1.5.2
   317      Content-Type: application/json
   318  
   319      {
   320          "count": 1,
   321          "next": null,
   322          "previous": null,
   323          "results": [
   324              {
   325                  "common_name": "test.example.com",
   326                  "expires": "2014-01-01T00:00:00UTC"
   327              }
   328          ]
   329      }
   330  
   331  
   332  List Certificate Details
   333  ````````````````````````
   334  
   335  Example Request:
   336  
   337  .. code-block:: console
   338  
   339      GET /v1/certs/test.example.com HTTP/1.1
   340      Host: deis.example.com
   341      Authorization: token abc123
   342  
   343  Example Response:
   344  
   345  .. code-block:: console
   346  
   347      HTTP/1.1 200 OK
   348      X_DEIS_API_VERSION: 1.2
   349      X_DEIS_PLATFORM_VERSION: 1.5.2
   350      Content-Type: application/json
   351  
   352      {
   353          "updated": "2014-01-01T00:00:00UTC",
   354          "created": "2014-01-01T00:00:00UTC",
   355          "expires": "2015-01-01T00:00:00UTC",
   356          "common_name": "test.example.com",
   357          "owner": "test",
   358          "id": 1
   359      }
   360  
   361  
   362  Create Certificate
   363  ``````````````````
   364  
   365  Example Request:
   366  
   367  .. code-block:: console
   368  
   369      POST /v1/certs/ HTTP/1.1
   370      Host: deis.example.com
   371      Content-Type: application/json
   372      Authorization: token abc123
   373  
   374      {
   375          "certificate": "-----BEGIN CERTIFICATE-----",
   376          "key": "-----BEGIN RSA PRIVATE KEY-----"
   377      }
   378  
   379  
   380  Example Response:
   381  
   382  .. code-block:: console
   383  
   384      HTTP/1.1 201 CREATED
   385      X_DEIS_API_VERSION: 1.2
   386      X_DEIS_PLATFORM_VERSION: 1.5.2
   387      Content-Type: application/json
   388  
   389      {
   390          "updated": "2014-01-01T00:00:00UTC",
   391          "created": "2014-01-01T00:00:00UTC",
   392          "expires": "2015-01-01T00:00:00UTC",
   393          "common_name": "test.example.com",
   394          "owner": "test",
   395          "id": 1
   396      }
   397  
   398  
   399  Destroy a Certificate
   400  `````````````````````
   401  
   402  Example Request:
   403  
   404  .. code-block:: console
   405  
   406      DELETE /v1/certs/test.example.com HTTP/1.1
   407      Host: deis.example.com
   408      Authorization: token abc123
   409  
   410  Example Response:
   411  
   412  .. code-block:: console
   413  
   414      HTTP/1.1 204 NO CONTENT
   415      X_DEIS_API_VERSION: 1.2
   416      X_DEIS_PLATFORM_VERSION: 1.5.2
   417  
   418  
   419  Containers
   420  ----------
   421  
   422  
   423  List all Containers
   424  ```````````````````
   425  
   426  Example Request:
   427  
   428  .. code-block:: console
   429  
   430      GET /v1/apps/example-go/containers/ HTTP/1.1
   431      Host: deis.example.com
   432      Authorization: token abc123
   433  
   434  Example Response:
   435  
   436  .. code-block:: console
   437  
   438      HTTP/1.1 200 OK
   439      X_DEIS_API_VERSION: 1.2
   440      X_DEIS_PLATFORM_VERSION: 1.5.2
   441      Content-Type: application/json
   442  
   443      {
   444          "count": 1,
   445          "next": null,
   446          "previous": null,
   447          "results": [
   448              {
   449                  "owner": "test",
   450                  "app": "example-go",
   451                  "release": "v2",
   452                  "created": "2014-01-01T00:00:00UTC",
   453                  "updated": "2014-01-01T00:00:00UTC",
   454                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75",
   455                  "type": "web",
   456                  "num": 1,
   457                  "state": "up"
   458              }
   459          ]
   460      }
   461  
   462  
   463  List all Containers by Type
   464  ```````````````````````````
   465  
   466  Example Request:
   467  
   468  .. code-block:: console
   469  
   470      GET /v1/apps/example-go/containers/web/ HTTP/1.1
   471      Host: deis.example.com
   472      Authorization: token abc123
   473  
   474  Example Response:
   475  
   476  .. code-block:: console
   477  
   478      HTTP/1.1 200 OK
   479      X_DEIS_API_VERSION: 1.2
   480      X_DEIS_PLATFORM_VERSION: 1.5.2
   481      Content-Type: application/json
   482  
   483      {
   484          "count": 1,
   485          "next": null,
   486          "previous": null,
   487          "results": [
   488              {
   489                  "owner": "test",
   490                  "app": "example-go",
   491                  "release": "v2",
   492                  "created": "2014-01-01T00:00:00UTC",
   493                  "updated": "2014-01-01T00:00:00UTC",
   494                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75",
   495                  "type": "web",
   496                  "num": 1,
   497                  "state": "up"
   498              }
   499          ]
   500      }
   501  
   502  
   503  Scale Containers
   504  ````````````````
   505  
   506  Example Request:
   507  
   508  .. code-block:: console
   509  
   510      POST /v1/apps/example-go/scale/ HTTP/1.1
   511      Host: deis.example.com
   512      Content-Type: application/json
   513      Authorization: token abc123
   514  
   515      {"web": 3}
   516  
   517  Example Response:
   518  
   519  .. code-block:: console
   520  
   521      HTTP/1.1 204 NO CONTENT
   522      X_DEIS_API_VERSION: 1.2
   523      X_DEIS_PLATFORM_VERSION: 1.5.2
   524  
   525  
   526  Configuration
   527  -------------
   528  
   529  
   530  List Application Configuration
   531  ``````````````````````````````
   532  
   533  Example Request:
   534  
   535  .. code-block:: console
   536  
   537      GET /v1/apps/example-go/config/ HTTP/1.1
   538      Host: deis.example.com
   539      Authorization: token abc123
   540  
   541  Example Response:
   542  
   543  .. code-block:: console
   544  
   545      HTTP/1.1 200 OK
   546      X_DEIS_API_VERSION: 1.2
   547      X_DEIS_PLATFORM_VERSION: 1.5.2
   548      Content-Type: application/json
   549  
   550      {
   551          "owner": "test",
   552          "app": "example-go",
   553          "values": {},
   554          "memory": {},
   555          "cpu": {},
   556          "tags": {},
   557          "created": "2014-01-01T00:00:00UTC",
   558          "updated": "2014-01-01T00:00:00UTC",
   559          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   560      }
   561  
   562  
   563  Create new Config
   564  `````````````````
   565  
   566  Example Request:
   567  
   568  .. code-block:: console
   569  
   570      POST /v1/apps/example-go/config/ HTTP/1.1
   571      Host: deis.example.com
   572      Content-Type: application/json
   573      Authorization: token abc123
   574  
   575      {"values": {"HELLO": "world", "PLATFORM: "deis"}}
   576  
   577  Example Response:
   578  
   579  .. code-block:: console
   580  
   581      HTTP/1.1 201 CREATED
   582      X_DEIS_API_VERSION: 1.2
   583      X_DEIS_PLATFORM_VERSION: 1.5.2
   584      Content-Type: application/json
   585      X-Deis-Release: 3
   586  
   587      {
   588          "owner": "test",
   589          "app": "example-go",
   590          "values": {
   591              "DEIS_APP": "example-go",
   592              "DEIS_RELEASE": "v3",
   593              "HELLO": "world",
   594              "PLATFORM": "deis"
   595  
   596          },
   597          "memory": {},
   598          "cpu": {},
   599          "tags": {},
   600          "created": "2014-01-01T00:00:00UTC",
   601          "updated": "2014-01-01T00:00:00UTC",
   602          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   603      }
   604  
   605  
   606  Unset Config Variable
   607  `````````````````````
   608  
   609  Example Request:
   610  
   611  .. code-block:: console
   612  
   613      POST /v1/apps/example-go/config/ HTTP/1.1
   614      Host: deis.example.com
   615      Content-Type: application/json
   616      Authorization: token abc123
   617  
   618      {"values": {"HELLO": null}}
   619  
   620  Example Response:
   621  
   622  .. code-block:: console
   623  
   624      HTTP/1.1 201 CREATED
   625      X_DEIS_API_VERSION: 1.2
   626      X_DEIS_PLATFORM_VERSION: 1.5.2
   627      Content-Type: application/json
   628      X-Deis-Release: 4
   629  
   630      {
   631          "owner": "test",
   632          "app": "example-go",
   633          "values": {
   634              "DEIS_APP": "example-go",
   635              "DEIS_RELEASE": "v4",
   636              "PLATFORM": "deis"
   637         },
   638          "memory": {},
   639          "cpu": {},
   640          "tags": {},
   641          "created": "2014-01-01T00:00:00UTC",
   642          "updated": "2014-01-01T00:00:00UTC",
   643          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   644      }
   645  
   646  
   647  Domains
   648  -------
   649  
   650  
   651  List Application Domains
   652  ````````````````````````
   653  
   654  Example Request:
   655  
   656  .. code-block:: console
   657  
   658      GET /v1/apps/example-go/domains/ HTTP/1.1
   659      Host: deis.example.com
   660      Authorization: token abc123
   661  
   662  Example Response:
   663  
   664  .. code-block:: console
   665  
   666      HTTP/1.1 200 OK
   667      X_DEIS_API_VERSION: 1.2
   668      X_DEIS_PLATFORM_VERSION: 1.5.2
   669      Content-Type: application/json
   670  
   671      {
   672          "count": 1,
   673          "next": null,
   674          "previous": null,
   675          "results": [
   676              {
   677                  "app": "example-go",
   678                  "created": "2014-01-01T00:00:00UTC",
   679                  "domain": "example.example.com",
   680                  "owner": "test",
   681                  "updated": "2014-01-01T00:00:00UTC"
   682              }
   683          ]
   684      }
   685  
   686  
   687  Add Domain
   688  ``````````
   689  
   690  Example Request:
   691  
   692  .. code-block:: console
   693  
   694      POST /v1/apps/example-go/domains/ HTTP/1.1
   695      Host: deis.example.com
   696      Authorization: token abc123
   697  
   698      {'domain': 'example.example.com'}
   699  
   700  Example Response:
   701  
   702  .. code-block:: console
   703  
   704      HTTP/1.1 201 CREATED
   705      X_DEIS_API_VERSION: 1.2
   706      X_DEIS_PLATFORM_VERSION: 1.5.2
   707      Content-Type: application/json
   708  
   709      {
   710          "app": "example-go",
   711          "created": "2014-01-01T00:00:00UTC",
   712          "domain": "example.example.com",
   713          "owner": "test",
   714          "updated": "2014-01-01T00:00:00UTC"
   715      }
   716  
   717  
   718  
   719  Remove Domain
   720  `````````````
   721  
   722  Example Request:
   723  
   724  .. code-block:: console
   725  
   726      DELETE /v1/apps/example-go/domains/example.example.com HTTP/1.1
   727      Host: deis.example.com
   728      Authorization: token abc123
   729  
   730  Example Response:
   731  
   732  .. code-block:: console
   733  
   734      HTTP/1.1 204 NO CONTENT
   735      X_DEIS_API_VERSION: 1.2
   736      X_DEIS_PLATFORM_VERSION: 1.5.2
   737  
   738  
   739  Builds
   740  ------
   741  
   742  
   743  List Application Builds
   744  ```````````````````````
   745  
   746  Example Request:
   747  
   748  .. code-block:: console
   749  
   750      GET /v1/apps/example-go/builds/ HTTP/1.1
   751      Host: deis.example.com
   752      Authorization: token abc123
   753  
   754  Example Response:
   755  
   756  .. code-block:: console
   757  
   758      HTTP/1.1 200 OK
   759      X_DEIS_API_VERSION: 1.2
   760      X_DEIS_PLATFORM_VERSION: 1.5.2
   761      Content-Type: application/json
   762  
   763      {
   764          "count": 1,
   765          "next": null,
   766          "previous": null,
   767          "results": [
   768              {
   769                  "app": "example-go",
   770                  "created": "2014-01-01T00:00:00UTC",
   771                  "dockerfile": "FROM deis/slugrunner RUN mkdir -p /app WORKDIR /app ENTRYPOINT [\"/runner/init\"] ADD slug.tgz /app ENV GIT_SHA 060da68f654e75fac06dbedd1995d5f8ad9084db",
   772                  "image": "example-go",
   773                  "owner": "test",
   774                  "procfile": {
   775                      "web": "example-go"
   776                  },
   777                  "sha": "060da68f",
   778                  "updated": "2014-01-01T00:00:00UTC",
   779                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   780              }
   781          ]
   782      }
   783  
   784  
   785  Create Application Build
   786  ````````````````````````
   787  
   788  Example Request:
   789  
   790  .. code-block:: console
   791  
   792      POST /v1/apps/example-go/builds/ HTTP/1.1
   793      Host: deis.example.com
   794      Content-Type: application/json
   795      Authorization: token abc123
   796  
   797      {"image": "deis/example-go:latest"}
   798  
   799  Example Response:
   800  
   801  .. code-block:: console
   802  
   803      HTTP/1.1 201 CREATED
   804      X_DEIS_API_VERSION: 1.2
   805      X_DEIS_PLATFORM_VERSION: 1.5.2
   806      Content-Type: application/json
   807      X-Deis-Release: 4
   808  
   809      {
   810          "app": "example-go",
   811          "created": "2014-01-01T00:00:00UTC",
   812          "dockerfile": "",
   813          "image": "deis/example-go:latest",
   814          "owner": "test",
   815          "procfile": {},
   816          "sha": "",
   817          "updated": "2014-01-01T00:00:00UTC",
   818          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   819      }
   820  
   821  
   822  Releases
   823  --------
   824  
   825  
   826  List Application Releases
   827  `````````````````````````
   828  
   829  Example Request:
   830  
   831  .. code-block:: console
   832  
   833      GET /v1/apps/example-go/releases/ HTTP/1.1
   834      Host: deis.example.com
   835      Authorization: token abc123
   836  
   837  Example Response:
   838  
   839  .. code-block:: console
   840  
   841      HTTP/1.1 200 OK
   842      X_DEIS_API_VERSION: 1.2
   843      X_DEIS_PLATFORM_VERSION: 1.5.2
   844      Content-Type: application/json
   845  
   846      {
   847          "count": 3,
   848          "next": null,
   849          "previous": null,
   850          "results": [
   851              {
   852                  "app": "example-go",
   853                  "build": "202d8e4b-600e-4425-a85c-ffc7ea607f61",
   854                  "config": "ed637ceb-5d32-44bd-9406-d326a777a513",
   855                  "created": "2014-01-01T00:00:00UTC",
   856                  "owner": "test",
   857                  "summary": "test changed nothing",
   858                  "updated": "2014-01-01T00:00:00UTC",
   859                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75",
   860                  "version": 3
   861              },
   862              {
   863                  "app": "example-go",
   864                  "build": "202d8e4b-600e-4425-a85c-ffc7ea607f61",
   865                  "config": "95bd6dea-1685-4f78-a03d-fd7270b058d1",
   866                  "created": "2014-01-01T00:00:00UTC",
   867                  "owner": "test",
   868                  "summary": "test deployed 060da68",
   869                  "updated": "2014-01-01T00:00:00UTC",
   870                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75",
   871                  "version": 2
   872              },
   873              {
   874                  "app": "example-go",
   875                  "build": null,
   876                  "config": "95bd6dea-1685-4f78-a03d-fd7270b058d1",
   877                  "created": "2014-01-01T00:00:00UTC",
   878                  "owner": "test",
   879                  "summary": "test created initial release",
   880                  "updated": "2014-01-01T00:00:00UTC",
   881                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75",
   882                  "version": 1
   883              }
   884          ]
   885      }
   886  
   887  
   888  List Release Details
   889  ````````````````````
   890  
   891  Example Request:
   892  
   893  .. code-block:: console
   894  
   895      GET /v1/apps/example-go/releases/v1/ HTTP/1.1
   896      Host: deis.example.com
   897      Authorization: token abc123
   898  
   899  Example Response:
   900  
   901  .. code-block:: console
   902  
   903      HTTP/1.1 200 OK
   904      X_DEIS_API_VERSION: 1.2
   905      X_DEIS_PLATFORM_VERSION: 1.5.2
   906      Content-Type: application/json
   907  
   908      {
   909          "app": "example-go",
   910          "build": null,
   911          "config": "95bd6dea-1685-4f78-a03d-fd7270b058d1",
   912          "created": "2014-01-01T00:00:00UTC",
   913          "owner": "test",
   914          "summary": "test created initial release",
   915          "updated": "2014-01-01T00:00:00UTC",
   916          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75",
   917          "version": 1
   918      }
   919  
   920  
   921  Rollback Release
   922  ````````````````
   923  
   924  Example Request:
   925  
   926  .. code-block:: console
   927  
   928      POST /v1/apps/example-go/releases/rollback/ HTTP/1.1
   929      Host: deis.example.com
   930      Content-Type: application/json
   931      Authorization: token abc123
   932  
   933      {"version": 1}
   934  
   935  Example Response:
   936  
   937  .. code-block:: console
   938  
   939      HTTP/1.1 201 CREATED
   940      X_DEIS_API_VERSION: 1.2
   941      X_DEIS_PLATFORM_VERSION: 1.5.2
   942      Content-Type: application/json
   943  
   944      {"version": 5}
   945  
   946  
   947  Keys
   948  ----
   949  
   950  
   951  List Keys
   952  `````````
   953  
   954  Example Request:
   955  
   956  .. code-block:: console
   957  
   958      GET /v1/keys/ HTTP/1.1
   959      Host: deis.example.com
   960      Authorization: token abc123
   961  
   962  Example Response:
   963  
   964  .. code-block:: console
   965  
   966      {
   967      X_DEIS_API_VERSION: 1.2
   968      X_DEIS_PLATFORM_VERSION: 1.5.2
   969          "count": 1,
   970          "next": null,
   971          "previous": null,
   972          "results": [
   973              {
   974                  "created": "2014-01-01T00:00:00UTC",
   975                  "id": "test@example.com",
   976                  "owner": "test",
   977                  "public": "ssh-rsa <...>",
   978                  "updated": "2014-01-01T00:00:00UTC",
   979                  "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
   980              }
   981          ]
   982      }
   983  
   984  
   985  Add Key to User
   986  ```````````````
   987  
   988  Example Request:
   989  
   990  .. code-block:: console
   991  
   992      POST /v1/keys/ HTTP/1.1
   993      Host: deis.example.com
   994      Authorization: token abc123
   995  
   996      {
   997          "id": "example",
   998          "public": "ssh-rsa <...>"
   999      }
  1000  
  1001  Example Response:
  1002  
  1003  .. code-block:: console
  1004  
  1005      HTTP/1.1 201 CREATED
  1006      X_DEIS_API_VERSION: 1.2
  1007      X_DEIS_PLATFORM_VERSION: 1.5.2
  1008      Content-Type: application/json
  1009  
  1010      {
  1011          "created": "2014-01-01T00:00:00UTC",
  1012          "id": "example",
  1013          "owner": "example",
  1014          "public": "ssh-rsa <...>",
  1015          "updated": "2014-01-01T00:00:00UTC",
  1016          "uuid": "de1bf5b5-4a72-4f94-a10c-d2a3741cdf75"
  1017      }
  1018  
  1019  
  1020  Remove Key from User
  1021  ````````````````````
  1022  
  1023  Example Request:
  1024  
  1025  .. code-block:: console
  1026  
  1027      DELETE /v1/keys/example HTTP/1.1
  1028      Host: deis.example.com
  1029      Authorization: token abc123
  1030  
  1031  Example Response:
  1032  
  1033  .. code-block:: console
  1034  
  1035      HTTP/1.1 204 NO CONTENT
  1036      X_DEIS_API_VERSION: 1.2
  1037      X_DEIS_PLATFORM_VERSION: 1.5.2
  1038  
  1039  
  1040  Permissions
  1041  -----------
  1042  
  1043  
  1044  List Application Permissions
  1045  ````````````````````````````
  1046  
  1047  Example Request:
  1048  
  1049  .. code-block:: console
  1050  
  1051      GET /v1/apps/example-go/perms/ HTTP/1.1
  1052      Host: deis.example.com
  1053      Authorization: token abc123
  1054  
  1055  Example Response:
  1056  
  1057  .. code-block:: console
  1058  
  1059      HTTP/1.1 200 OK
  1060      X_DEIS_API_VERSION: 1.2
  1061      X_DEIS_PLATFORM_VERSION: 1.5.2
  1062      Content-Type: application/json
  1063  
  1064      {
  1065          "users": []
  1066      }
  1067  
  1068  
  1069  Create Application Permission
  1070  `````````````````````````````
  1071  
  1072  Example Request:
  1073  
  1074  .. code-block:: console
  1075  
  1076      POST /v1/apps/example-go/perms/ HTTP/1.1
  1077      Host: deis.example.com
  1078      Authorization: token abc123
  1079  
  1080      {"username": "example"}
  1081  
  1082  Example Response:
  1083  
  1084  .. code-block:: console
  1085  
  1086      HTTP/1.1 201 CREATED
  1087      X_DEIS_API_VERSION: 1.2
  1088      X_DEIS_PLATFORM_VERSION: 1.5.2
  1089  
  1090  
  1091  Remove Application Permission
  1092  `````````````````````````````
  1093  
  1094  Example Request:
  1095  
  1096  .. code-block:: console
  1097  
  1098      POST /v1/apps/example-go/perms/example HTTP/1.1
  1099      Host: deis.example.com
  1100      Authorization: token abc123
  1101  
  1102  Example Response:
  1103  
  1104  .. code-block:: console
  1105  
  1106      HTTP/1.1 204 NO CONTENT
  1107      X_DEIS_API_VERSION: 1.2
  1108      X_DEIS_PLATFORM_VERSION: 1.5.2
  1109  
  1110  Grant User Administrative Privileges
  1111  ````````````````````````````````````
  1112  
  1113  .. note::
  1114  
  1115      This command requires administrative privileges
  1116  
  1117  Example Request:
  1118  
  1119  .. code-block:: console
  1120  
  1121      POST /v1/admin/perms HTTP/1.1
  1122      Host: deis.example.com
  1123      Authorization: token abc123
  1124  
  1125      {"username": "example"}
  1126  
  1127  Example Response:
  1128  
  1129  .. code-block:: console
  1130  
  1131      HTTP/1.1 201 CREATED
  1132      X_DEIS_API_VERSION: 1.2
  1133      X_DEIS_PLATFORM_VERSION: 1.5.2