You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by ro...@apache.org on 2014/12/11 02:50:46 UTC

[01/11] incubator-usergrid git commit: update composer to stable from dev.

Repository: incubator-usergrid
Updated Branches:
  refs/heads/master cad90cd3b -> 3032dfaa1


update composer to stable from dev.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/b06a805f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/b06a805f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/b06a805f

Branch: refs/heads/master
Commit: b06a805f1fd2ff5891fe2d8382a83064c6c2b0e3
Parents: a89c57b
Author: Jason Kristian <ja...@apps4u.com.au>
Authored: Wed Nov 12 16:06:52 2014 +1000
Committer: Jason Kristian <ja...@apps4u.com.au>
Committed: Wed Nov 12 16:06:52 2014 +1000

----------------------------------------------------------------------
 sdks/php5/apache-usergrid/composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b06a805f/sdks/php5/apache-usergrid/composer.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/composer.json b/sdks/php5/apache-usergrid/composer.json
index afa4756..14341a9 100644
--- a/sdks/php5/apache-usergrid/composer.json
+++ b/sdks/php5/apache-usergrid/composer.json
@@ -1,7 +1,7 @@
 {
     "name": "apache/usergrid",
     "description": "Apache Usergrid PHP SDK guzzle web service client and service descriptor to interact with usergrid management and application api",
-    "minimum-stability": "dev",
+    "minimum-stability": "stable",
     "license": "Apache",
     "authors": [
         {


[09/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Laravel/ApacheUsergridServiceProvider.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Laravel/ApacheUsergridServiceProvider.php b/sdks/php5/apache-usergrid/src/Laravel/ApacheUsergridServiceProvider.php
index 455d70b..57807ad 100644
--- a/sdks/php5/apache-usergrid/src/Laravel/ApacheUsergridServiceProvider.php
+++ b/sdks/php5/apache-usergrid/src/Laravel/ApacheUsergridServiceProvider.php
@@ -38,6 +38,7 @@ class ApacheUsergridServiceProvider extends ServiceProvider
 {
 
     protected $oauth2Plugin = null;
+
     /**
      *
      */
@@ -58,7 +59,8 @@ class ApacheUsergridServiceProvider extends ServiceProvider
 
     }
 
-    protected function registerUsergrid() {
+    protected function registerUsergrid()
+    {
 
         $this->app['usergrid'] = $this->app->share(function ($app) {
 
@@ -67,18 +69,18 @@ class ApacheUsergridServiceProvider extends ServiceProvider
              * value .. This has been driving me crazy as I tried to read the config values from a rout and they would not show up
              * then I did . Also this would not find the config values if the boot function did not have the package method called with
              * all 3 args
-            $enable_oauth2_plugin = $this->app['config']->get('usergrid.enable_oauth2_plugin');
-
-            //check if user managed oauth auth flow
-            if($enable_oauth2_plugin){
-            // Create the Oauth2 Guzzle Plugin.
-            $this->createGuzzleOauth2Plugin();
-            }
+             * $enable_oauth2_plugin = $this->app['config']->get('usergrid.enable_oauth2_plugin');
+             *
+             * //check if user managed oauth auth flow
+             * if($enable_oauth2_plugin){
+             * // Create the Oauth2 Guzzle Plugin.
+             * $this->createGuzzleOauth2Plugin();
+             * }
              */
             $enable_oauth2_plugin = $app['config']->get('apache/usergrid::usergrid.enable_oauth2_plugin');
 
             //check if user managed oauth auth flow
-            if($enable_oauth2_plugin){
+            if ($enable_oauth2_plugin) {
                 // Create the Oauth2 Guzzle Plugin.
                 $this->createGuzzleOauth2Plugin();
             }
@@ -100,7 +102,8 @@ class ApacheUsergridServiceProvider extends ServiceProvider
     }
 
 
-    protected function createGuzzleOauth2Plugin(){
+    protected function createGuzzleOauth2Plugin()
+    {
 
         $base_url = $this->app['config']->get('apache/usergrid::usergrid.url');
 
@@ -119,28 +122,27 @@ class ApacheUsergridServiceProvider extends ServiceProvider
         $password = $this->app['config']->get('apache/usergrid::usergrid.password');
 
 
-        if($this->app['config']->get('apache/usergrid::usergrid.auth_type') == 'organization') {
+        if ($this->app['config']->get('apache/usergrid::usergrid.auth_type') == 'organization') {
 
-            $url = $base_url.'/management/token';
+            $url = $base_url . '/management/token';
 
-        } elseif($this->app['config']->get('apache/usergrid::usergrid.auth_type') == 'application')
-        {
-            $url = $base_url.'/'.$org_name.'/'.$app_name.'/token';
+        } elseif ($this->app['config']->get('apache/usergrid::usergrid.auth_type') == 'application') {
+            $url = $base_url . '/' . $org_name . '/' . $app_name . '/token';
         }
 
         $oauth2Client = new Client($url);
 
-        if($grant_type  == 'client_credentials') {
+        if ($grant_type == 'client_credentials') {
             $config = [
                 'client_id' => $client_id,
                 'client_secret' => $client_secret,
 
             ];
             $grantType = new ClientCredentials($oauth2Client, $config);
-            $refreshTokenGrantType = new RefreshToken($oauth2Client,$config);
+            $refreshTokenGrantType = new RefreshToken($oauth2Client, $config);
             $this->oauth2Plugin = new Oauth2Plugin($grantType, $refreshTokenGrantType);
 
-        } elseif($grant_type == 'password') {
+        } elseif ($grant_type == 'password') {
             $config = [
                 'username' => $username,
                 'password' => $password,
@@ -149,7 +151,7 @@ class ApacheUsergridServiceProvider extends ServiceProvider
             ];
             $grantType = new PasswordCredentials($oauth2Client, $config);
             $refreshTokenGrantType = new RefreshToken($oauth2Client, $config);
-            $this->oauth2Plugin =  new Oauth2Plugin($grantType,$refreshTokenGrantType);
+            $this->oauth2Plugin = new Oauth2Plugin($grantType, $refreshTokenGrantType);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.0/Errors.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.0/Errors.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.0/Errors.php
index 499ac99..603d60f 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.0/Errors.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.0/Errors.php
@@ -17,44 +17,37 @@
 
 return [
 
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\BadRequestException',
-		'code'  => 400,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\UnauthorizedException',
-		'code'  => 401,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\RequestFailedException',
-		'code'  => 402,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\NotFoundException',
-		'code'  => 404,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
-		'code'  => 500,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
-		'code'  => 502,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
-		'code'  => 503,
-	],
-
-	[
-		'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
-		'code'  => 504,
-	],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\BadRequestException',
+        'code' => 400,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\UnauthorizedException',
+        'code' => 401,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\RequestFailedException',
+        'code' => 402,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\NotFoundException',
+        'code' => 404,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
+        'code' => 500,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
+        'code' => 502,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
+        'code' => 503,
+    ],
+    [
+        'class' => 'Apache\Usergrid\Api\Exception\ServerErrorException',
+        'code' => 504,
+    ],
 
 ];

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Application.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Application.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Application.php
index 9e849b9..94f9c58 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Application.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Application.php
@@ -964,9 +964,6 @@ return [
             'location' => 'json'
         ]
     ],
-
-
-
     //Application Collection Relationships
     'GetRelationship' => [
         'httpMethod' => 'GET',

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Custom.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Custom.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Custom.php
index 1f579f2..b89e805 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Custom.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Custom.php
@@ -168,7 +168,8 @@ return [
             'location' => 'query'
         ]
     ],
-    'findById' => ['httpMethod' => 'GET',
+    'findById' => [
+        'httpMethod' => 'GET',
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{uuid}',
         'notes' => 'Find User by uuid.',
         'summary' => 'Find user by uuid',

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Devices.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Devices.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Devices.php
index be1cf13..65aa01d 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Devices.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Devices.php
@@ -169,7 +169,8 @@ return [
             'location' => 'query'
         ]
     ],
-    'findById' => ['httpMethod' => 'GET',
+    'findById' => [
+        'httpMethod' => 'GET',
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{uuid}',
         'notes' => 'Find Device by uuid.',
         'summary' => 'Find device by uuid',
@@ -377,5 +378,88 @@ return [
             "description" => "Entity data",
             'location' => 'json'
         ]
-    ]
+    ],
+    'notifiers' => [
+        'httpMethod' => 'GET',
+        'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{device_uuid}/notifier',
+        'notes' => 'Get All device notifiers.',
+        'summary' => 'Get all Device notifiers',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Notifier',
+        'responseType' => 'class',
+        'errorResponses' => $errors,
+        'parameters' => [
+            'app_name_or_uuid' => [
+                'description' => 'app name or uuid',
+                'location' => 'uri',
+                'type' => 'string',
+                'required' => true,
+            ],
+            'org_name_or_uuid' => [
+                'location' => 'uri',
+                'type' => 'string',
+                'required' => true,
+                'description' => 'Organization name or uuid'
+            ],
+            'collection' => [
+                'description' => 'collection name (entity type)',
+                'location' => 'uri',
+                'type' => 'string',
+                'required' => true,
+                'default' => 'devices'
+            ],
+            'device_uuid' => [
+                'description' => 'device uuid (entity type)',
+                'location' => 'uri',
+                'type' => 'string',
+                'required' => true,
+            ],
+            'access_token' => [
+                'description' => 'The OAuth2 access token',
+                'location' => 'query',
+                'type' => 'string',
+                'required' => false,
+            ],
+            'ql' => [
+                'description' => 'a query in the query language',
+                'location' => 'query',
+                'type' => 'string',
+                'required' => false,
+            ],
+            'reversed' => [
+                'description' => 'return results in reverse order',
+                'location' => 'query',
+                'type' => 'boolean',
+                'required' => false,
+            ],
+            'start' => [
+                'description' => 'the first entity UUID to return',
+                'location' => 'query',
+                'type' => 'string',
+                'required' => false,
+            ],
+            'cursor' => [
+                'description' => 'an encoded representation of the query position for paging',
+                'location' => 'query',
+                'type' => 'string',
+                'required' => false,
+            ],
+            'limit' => [
+                'description' => 'an encoded representation of the query position for paging',
+                'location' => 'query',
+                'type' => 'integer',
+                'required' => false
+
+            ],
+            'filter' => [
+                'description' => 'a condition to filter on',
+                'location' => 'query',
+                'type' => 'integer',
+                'required' => false,
+            ]
+        ],
+        'additionalParameters' => [
+            "description" => "Other parameters",
+            'location' => 'query'
+        ]
+    ],
 ];
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Groups.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Groups.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Groups.php
index 17dcc55..55b1276 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Groups.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Groups.php
@@ -21,7 +21,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}',
         'notes' => 'Query an app collection.',
         'summary' => 'Query an app collection',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Collection',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -98,7 +98,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}',
         'notes' => 'Query Groups.',
         'summary' => 'Query the groups collection',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -169,11 +169,12 @@ return [
             'location' => 'query'
         ]
     ],
-    'findById' => ['httpMethod' => 'GET',
+    'findById' => [
+        'httpMethod' => 'GET',
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{uuid}',
         'notes' => 'Find group by uuid.',
         'summary' => 'Find group by uuid',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -255,7 +256,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}',
         'notes' => 'Create new Group.  See Usergrid documentation for JSON format of body.',
         'summary' => 'Create new Group entity',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -295,7 +296,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
         'notes' => 'Delete a Group entity.',
         'summary' => 'Delete a Group entity by name or uuid',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -337,7 +338,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
         'notes' => 'Update a Group entity.',
         'summary' => 'Update a Group entity by name or uuid and using JSON data',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -383,7 +384,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}/users/{user_name_or_uuid}',
         'notes' => 'Update a Group entity.',
         'summary' => 'Update a Group entity by name or uuid and using JSON data',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -435,7 +436,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}/users/{user_name_or_uuid}',
         'notes' => 'Update a Group entity.',
         'summary' => 'Update a Group entity by name or uuid and using JSON data',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Group',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Notifiers.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Notifiers.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Notifiers.php
index e228bf7..41249a7 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Notifiers.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Notifiers.php
@@ -21,7 +21,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/notifiers',
         'notes' => 'Create new Apple Notifier.  See Usergrid documentation for the format of body.',
         'summary' => 'Create new Notifier entity',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Collection',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Notifier',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -81,7 +81,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/notifiers',
         'notes' => 'Create new Notifier.  See Usergrid documentation for the format of body.',
         'summary' => 'Create new Notifier entity',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Collection',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Notifier',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -127,5 +127,40 @@ return [
             "description" => "Entity data",
             'location' => 'json'
         ]
+    ],
+    'all' => [
+        'httpMethod' => 'GET',
+        'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/notifiers',
+        'notes' => 'Get all  Notifier.  See Usergrid documentation for the format of body.',
+        'summary' => 'Get all  Notifier entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Notifier',
+        'responseType' => 'class',
+        'errorResponses' => $errors,
+        'parameters' => [
+            'app_name_or_uuid' => [
+                'description' => 'app name or uuid',
+                'location' => 'uri',
+                'type' => 'string',
+                'required' => true,
+            ],
+            'name' => [
+                'description' => 'notifier name (entity type)',
+                'location' => 'json',
+                'type' => 'string',
+                'required' => false,
+            ],
+            'access_token' => [
+                'description' => 'The OAuth2 access token',
+                'location' => 'query',
+                'type' => 'string',
+                'required' => false,
+            ],
+            'org_name_or_uuid' => [
+                'location' => 'uri',
+                'type' => 'string',
+                'required' => true,
+                'description' => 'Organization name or uuid'
+            ]
+        ]
     ]
 ];
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Roles.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Roles.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Roles.php
index 22e4df7..4006819 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Roles.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Roles.php
@@ -21,7 +21,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}',
         'notes' => 'Query an app collection.',
         'summary' => 'Query an app collection',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Collection',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Role',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -97,7 +97,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}',
         'notes' => 'Query Roles.',
         'summary' => 'Query the roles collection',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Role',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -168,11 +168,12 @@ return [
             'location' => 'query'
         ]
     ],
-    'findById' => ['httpMethod' => 'GET',
+    'findById' => [
+        'httpMethod' => 'GET',
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{uuid}',
         'notes' => 'Find Role by uuid.',
         'summary' => 'Find role by uuid',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Role',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -254,7 +255,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}',
         'notes' => 'Create new Role.  See Usergrid documentation for JSON format of body.',
         'summary' => 'Create new Role entity',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Role',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -294,7 +295,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
         'notes' => 'Delete a Role entity.',
         'summary' => 'Delete a Role entity by name or uuid',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Role',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [
@@ -336,7 +337,7 @@ return [
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
         'notes' => 'Update a Role entity.',
         'summary' => 'Update a Roles entity by name or uuid and using JSON data',
-        'responseClass' => 'Apache\Usergrid\Api\Models\Entity',
+        'responseClass' => 'Apache\Usergrid\Api\Models\Role',
         'responseType' => 'class',
         'errorResponses' => $errors,
         'parameters' => [

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Users.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Users.php b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Users.php
index 2c68332..0f28d4d 100644
--- a/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Users.php
+++ b/sdks/php5/apache-usergrid/src/Manifests/1.0.1/Users.php
@@ -168,7 +168,8 @@ return [
             'location' => 'query'
         ]
     ],
-    'findById' => ['httpMethod' => 'GET',
+    'findById' => [
+        'httpMethod' => 'GET',
         'uri' => '/{org_name_or_uuid}/{app_name_or_uuid}/{collection}/{uuid}',
         'notes' => 'Find User by uuid.',
         'summary' => 'Find user by uuid',

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/Application.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/Application.php b/sdks/php5/apache-usergrid/src/Manifests/Application.php
deleted file mode 100644
index 06dc86c..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/Application.php
+++ /dev/null
@@ -1,985 +0,0 @@
-<?php
-/**
- * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-return [
-
-    'name' => 'Application',
-    'apiVersion' => '1.1',
-    'baseUrl' => 'http://baas-platform.com',
-    'description' => 'Client to Usergrid application service',
-    'operations' => [
-        'AuthPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/token',
-            'notes' => 'Get the app access token.  See the OAuth2 specification for details.',
-            'summary' => 'Get app access token',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'grant_type' => [
-                    'description' => 'Grant type.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'defaultValue' => 'password',
-                    'required' => true,
-                ],
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'username' => [
-                    'description' => 'Username (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'password' => [
-                    'description' => 'Password (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_secret' => [
-                    'description' => 'Client Secret (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthPasswordPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/token',
-            'notes' => 'Get the app access token.  See the OAuth2 specification for details.',
-            'summary' => 'Get app access token',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'grant_type' => [
-                    'description' => 'Grant type.',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'defaultValue' => 'password',
-                    'required' => true,
-                ],
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'username' => [
-                    'description' => 'Username (for grant_type=password).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'password' => [
-                    'description' => 'Password (for grant_type=password).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID (for grant_type=client_credentials).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_secret' => [
-                    'description' => 'Client Secret (for grant_type=client_credentials).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthorizeGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/authorize',
-            'notes' => 'Authorize the app client.  See the OAuth2 specification.',
-            'summary' => 'Authorize app client',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'response_type' => [
-                    'description' => 'Response type',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                    'default' => 'token'
-                ],
-                'redirect_uri' => [
-                    'description' => 'Redirect URI',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'scope' => [
-                    'description' => 'Access Token Scope.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'state' => [
-                    'description' => 'Client State.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthorizePost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/authorize',
-            'notes' => 'Authorize the app client.  See the OAuth2 specification.',
-            'summary' => 'Authorize app client',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'response_type' => [
-                    'description' => 'Response type',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                    'default' => 'token'
-                ],
-                'redirect_uri' => [
-                    'description' => 'Redirect URI',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'scope' => [
-                    'description' => 'Access Token Scope.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'state' => [
-                    'description' => 'Client State.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'CredentialsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/credentials',
-            'notes' => 'Get the app client credentials.',
-            'summary' => 'Get app client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-            ]
-        ],
-        'CredentialsPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/credentials',
-            'notes' => 'Generate new app client credentials',
-            'summary' => 'Generate app client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-            ]
-        ],
-        'UserJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users',
-            'notes' => 'Create new app user',
-            'summary' => 'Create new app user.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ]
-        ],
-        'UserFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users',
-            'notes' => 'Create new app user',
-            'summary' => 'Create new app user using form post parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'username' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ]
-        ],
-        'UserPasswordRestGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/resetpw',
-            'notes' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'summary' => 'Initiate a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserPasswordFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users/resetpw',
-            'notes' => 'Complete a user password reset.  Handles form POST response.',
-            'summary' => 'Complete a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'email' => [
-                    'description' => 'User Email',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_challenge_field' => [
-                    'description' => 'Recaptcha Challenge Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_response_field' => [
-                    'description' => 'Recaptcha Response Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'notes' => 'Returns the app user details.',
-            'summary' => 'Returns the app user details',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'notes' => 'Updates the app user details.',
-            'summary' => 'Updates the app user details',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'UserActivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/activate',
-            'notes' => 'Activates the app user from link provided in email notification.',
-            'summary' => 'Activates the app user',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'token' => [
-                    'description' => 'Activation Token (supplied via email)',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'confirm' => [
-                    'description' => 'Send confirmation email',
-                    'location' => 'query',
-                    'type' => 'boolean',
-                    'required' => true,
-                ],
-            ]
-        ],
-        'UserReactivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/reactivate',
-            'notes' => 'Request app user reactivation.',
-            'summary' => 'Reactivates the app user',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserFeedGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/feed',
-            'notes' => 'Get app user activity feed.',
-            'summary' => 'Get app user activity feed',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserPasswordJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/password',
-            'notes' => 'Set app user password.  See Usergrid documentation for JSON format of body.',
-            'summary' => 'Set app user password',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ],
-            'additionalParameters' => [
-                "description" => "Old and new password",
-                'location' => 'json'
-            ]
-        ],
-        'UserResetPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/resetpw',
-            'notes' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'summary' => 'Initiate a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserResetPasswordFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/resetpw',
-            'notes' => 'Complete a user password reset.  Handles form POST response.',
-            'summary' => 'Complete a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_challenge_field' => [
-                    'description' => 'Recaptcha Challenge Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_response_field' => [
-                    'description' => 'Recaptcha Response Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'EntityGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}',
-            'notes' => 'Query an app collection.',
-            'summary' => 'Query an app collection',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'ql' => [
-                    'description' => 'a query in the query language',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'reversed' => [
-                    'description' => 'return results in reverse order',
-                    'location' => 'query',
-                    'type' => 'boolean',
-                    'required' => false,
-                ],
-                'start' => [
-                    'description' => 'the first entity UUID to return',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'cursor' => [
-                    'description' => 'an encoded representation of the query position for paging',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'limit' => [
-                    'description' => 'an encoded representation of the query position for paging',
-                    'location' => 'query',
-                    'type' => 'integer',
-                    'required' => false,
-                ],
-                'filter' => [
-                    'description' => 'a condition to filter on',
-                    'location' => 'query',
-                    'type' => 'integer',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'EntityJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}',
-            'notes' => 'Create new app entity.  See Usergrid documentation for JSON format of body.',
-            'summary' => 'Create new app entity',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ],
-            'additionalParameters' => [
-                "description" => "Entity data",
-                'location' => 'json'
-            ]
-        ],
-        'EntityPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
-            'notes' => 'Update an app entity in a collection.',
-            'summary' => 'Update an app entity',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'entity_name_or_uuid' => [
-                    'description' => 'entity name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ],
-            'additionalParameters' => [
-                "description" => "Entity data",
-                'location' => 'json'
-            ]
-        ],
-        'EntityDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
-            'notes' => 'Delete an app entity.',
-            'summary' => 'Delete an app entity',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'entity_name_or_uuid' => [
-                    'description' => 'entity name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-
-    ]
-];
\ No newline at end of file


[08/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/Management.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/Management.php b/sdks/php5/apache-usergrid/src/Manifests/Management.php
deleted file mode 100644
index b4f16ed..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/Management.php
+++ /dev/null
@@ -1,1381 +0,0 @@
-<?php
-/**
- * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-return [
-
-    'name' => 'Management',
-    'apiVersion' => '1.1',
-    'baseUrl' => 'http://baas-platform.com',
-    'description' => 'Client to Usergrid management service',
-    'operations' => [
-
-        'AuthPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/token',
-            'summary' => 'Get management access token',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'grant_type' => [
-                    'description' => 'Grant type.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'defaultValue' => 'password',
-                    'required' => true,
-                ],
-                'username' => [
-                    'description' => 'Username (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'password' => [
-                    'description' => 'Password (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_secret' => [
-                    'description' => 'Client Secret (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthorizeGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/authorize',
-            'summary' => 'Authorize the client.  See the OAuth2 specification.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'response_type' => [
-                    'description' => 'Response type.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'defaultValue' => 'token',
-                    'required' => true,
-                    'allowableValues' => ['code', 'token']
-                ],
-                'client_id' => [
-                    'description' => 'Client ID.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'redirect_uri' => [
-                    'description' => 'Redirect URI.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'scope' => [
-                    'description' => 'Access Token Scope.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'state' => [
-                    'description' => 'Client State.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-
-        ],
-        'OrgJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs',
-            'summary' => 'Create new organization.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'organization' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization Name'
-                ],
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}',
-            'summary' => 'Find organization by name or UUID',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied or Name",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgActivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/activate',
-            'summary' => 'Activates the organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied or Name",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'confirm' => [
-                    'location' => 'query',
-                    'type' => 'boolean',
-                    'required' => false,
-                    'description' => 'Send confirmation email'
-                ]
-
-            ]
-        ],
-        'OrgReactivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/reactivate',
-            'summary' => 'Reactivates the organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-            ]
-        ],
-        'OrgFeedGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/feed',
-            'summary' => 'Get organization activity feed',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgCredentialsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/credentials',
-            'summary' => 'Get organization client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgCredentialsPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/credentials',
-            'summary' => 'Generate organization client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgUsersGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users',
-            'summary' => 'Get admin users for organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgUsersJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users',
-            'summary' => 'Create new admin user for organization using JSON payload.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgUsersFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users',
-            'summary' => 'Create new admin user for organization using form parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'username' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-        ],
-        'OrgUserPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'summary' => 'Adds existing admin users for organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin user username, email, or uuid'
-                ]
-            ]
-        ],
-        'OrgUserDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'summary' => 'Remove an admin user from organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin user username, email, or uuid'
-                ]
-            ]
-        ],
-        'OrgAppsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps',
-            'summary' => 'Get apps for organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgAppsJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps',
-            'summary' => 'Create new application for organization using JSON payload.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application Name'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgAppsFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps',
-            'summary' => 'Create new application for organization using form parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application Name'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-        ],
-        'OrgAppDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}',
-            'summary' => 'Delete an application in an organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'app_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application name or uuid'
-                ]
-            ]
-        ],
-        'OrgAppCredentialsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}/credentials',
-            'summary' => 'Get application keys.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'app_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application name or uuid'
-                ]
-            ]
-        ],
-        'OrgAppCredentialsPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}/credentials',
-            'summary' => 'Generate application keys.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'app_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application name or uuid'
-                ]
-            ]
-        ],
-        'OrgUserJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users',
-            'summary' => 'Create new admin user.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgUserFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users',
-            'summary' => 'Create new admin using form post parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'username' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-
-        ],
-        'OrgUserResetPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/resetpw',
-            'summary' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-        ],
-        'OrgUserResetPasswordFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users/resetpw',
-            'summary' => 'Complete a user password reset.  Handles form POST response.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'recaptcha_challenge_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Challenge Field'
-                ],
-                'recaptcha_response_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Response Field'
-                ],
-            ]
-        ],
-        'AdminUserGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}',
-            'summary' => 'Returns the admin user details',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-            ]
-
-        ],
-        'AdminUserJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/users/{user_username_email_or_uuid}',
-            'summary' => 'Updates the admin user details.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-
-        ],
-        'AdminUserActivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/activate',
-            'summary' => 'Activates the admin user from link provided in email notification.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'confirm' => [
-                    'location' => 'uri',
-                    'type' => 'boolean',
-                    'required' => false,
-                    'description' => 'Send confirmation email'
-                ],
-            ]
-        ],
-        'AdminUserReactivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/reactivate',
-            'summary' => 'Request admin user reactivation.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ]
-            ]
-        ],
-        'AdminUserFeedGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/feed',
-            'summary' => 'Get admin user activity feed.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-            ]
-        ],
-        'AdminUserPasswordJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/users/{user_username_email_or_uuid}/password',
-            'summary' => 'Set admin user password.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'old_password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Old and new password'
-                ],
-                'new_password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Old and new password'
-                ],
-            ]
-        ],
-        'AdminUserResetPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/resetpw',
-            'summary' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ]
-            ]
-        ],
-        'AdminUserResetPasswordFormPost' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/resetpw',
-            'summary' => 'Complete a user password reset.  Handles form POST response.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'recaptcha_challenge_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Challenge Field'
-                ],
-                'recaptcha_response_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Response Field'
-                ]
-            ]
-        ],
-        'AdminUserOrgsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs',
-            'summary' => 'Get organizations for admin user.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-
-            ]
-        ],
-        'AdminUserOrgsJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs',
-            'summary' => 'Create new organization for admin user using JSON payload.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'organization' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'AdminUserOrgsFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs',
-            'summary' => 'Create new organization for admin user using form parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'organization' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-        ],
-        'AdminUserOrgPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs/{org_name_or_uuid}',
-            'summary' => 'Add admin users to organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'AdminUserOrgDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs/{org_name_or_uuid}',
-            'summary' => 'Remove an admin user from organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-
-            ]
-        ]
-
-
-    ]
-
-];
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/Manifest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/Manifest.php b/sdks/php5/apache-usergrid/src/Manifests/Manifest.php
deleted file mode 100644
index b7d7ab3..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/Manifest.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-return [
-
-    'name' => 'Application',
-    'apiVersion' => '1.1',
-    'baseUrl' => 'http://baas-platform.com',
-    'description' => 'Client to Usergrid application service',
-    'operations' => []
-];
\ No newline at end of file


[04/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/swagger-json/applications.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/swagger-json/applications.json b/sdks/php5/apache-usergrid/src/Manifests/swagger-json/applications.json
new file mode 100644
index 0000000..f747154
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Manifests/swagger-json/applications.json
@@ -0,0 +1,1262 @@
+{
+    "basePath": "${basePath}",
+    "swaggerVersion": "1.1-SHAPSHOT.121026",
+    "apiVersion": "0.1",
+    "apis": [
+        {
+            "path": "/apps/{app_name_or_uuid}/token",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_auth_password_get",
+                    "summary": "Get app access token",
+                    "notes": "Get the app access token.  See the OAuth2 specification for details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "grant_type",
+                            "dataType": "string",
+                            "description": "Grant type",
+                            "defaultValue": "password",
+                            "allowableValues": {
+                                "values": [
+                                    "password",
+                                    "client_credentials",
+                                    "refresh_token",
+                                    "authorization_code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Password (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_secret",
+                            "dataType": "string",
+                            "description": "Client Secret (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_auth_password_post",
+                    "summary": "Get app access token",
+                    "notes": "Get the app access token.  See the OAuth2 specification for details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "grant_type",
+                            "dataType": "string",
+                            "description": "Grant type",
+                            "defaultValue": "password",
+                            "allowableValues": {
+                                "values": [
+                                    "password",
+                                    "client_credentials",
+                                    "refresh_token",
+                                    "authorization_code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Password (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "client_secret",
+                            "dataType": "string",
+                            "description": "Client Secret (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/authorize",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_authorize_get",
+                    "summary": "Authorize app client",
+                    "notes": "Authorize the app client.  See the OAuth2 specification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "response_type",
+                            "dataType": "string",
+                            "description": "Response type",
+                            "defaultValue": "token",
+                            "allowableValues": {
+                                "values": [
+                                    "token",
+                                    "code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "redirect_uri",
+                            "dataType": "string",
+                            "description": "Redirect URI",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "scope",
+                            "dataType": "string",
+                            "description": "Access Token Scope",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "state",
+                            "dataType": "string",
+                            "description": "Client State",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_authorize_post",
+                    "summary": "Authorize app client",
+                    "notes": "Authorize the app client.  See the OAuth2 specification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "response_type",
+                            "dataType": "string",
+                            "description": "Response type",
+                            "defaultValue": "token",
+                            "allowableValues": {
+                                "values": [
+                                    "token",
+                                    "code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "redirect_uri",
+                            "dataType": "string",
+                            "description": "Redirect URI",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "scope",
+                            "dataType": "string",
+                            "description": "Access Token Scope",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "state",
+                            "dataType": "string",
+                            "description": "Client State",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Password",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/credentials",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_credentials_get",
+                    "summary": "Get app client credentials",
+                    "notes": "Get the app client credentials.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_credentials_post",
+                    "summary": "Generate app client credentials",
+                    "notes": "Generate new app client credentials.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_user_json_post",
+                    "summary": "Create new app user",
+                    "notes": "Create new app user.  See Usergrid documentation for JSON format of body.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "User to post",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_user_form_post",
+                    "summary": "Create new app user",
+                    "notes": "Create new app user using form post parameters.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "name",
+                            "dataType": "string",
+                            "description": "User Full Name",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "email",
+                            "dataType": "string",
+                            "description": "User Email",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "User Password",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/resetpw",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_users_reset_password_get",
+                    "summary": "Initiate a user password reset",
+                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_users_reset_password_form_post",
+                    "summary": "Complete a user password reset",
+                    "notes": "Complete a user password reset.  Handles form POST response.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "email",
+                            "dataType": "string",
+                            "description": "User Email",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "recaptcha_challenge_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Challenge Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "recaptcha_response_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Response Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_user_get",
+                    "summary": "Returns the app user details",
+                    "notes": "Returns the app user details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "app_user_json_put",
+                    "summary": "Updates the app user details",
+                    "notes": "Updates the app user details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "App user details",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/activate",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_user_activate_get",
+                    "summary": "Activates the app user",
+                    "notes": "Activates the app user from link provided in email notification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "token",
+                            "dataType": "string",
+                            "description": "Activation Token (supplied via email)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "confirm",
+                            "dataType": "boolean",
+                            "description": "Send confirmation email",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/reactivate",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_user_reactivate_get",
+                    "summary": "Reactivates the app user",
+                    "notes": "Request app user reactivation.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/feed",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_user_feed_get",
+                    "summary": "Get app user activity feed",
+                    "notes": "Get app user activity feed.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/password",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "app_user_password_json_put",
+                    "summary": "Set app user password",
+                    "notes": "Set app user password.  See Usergrid documentation for JSON format of body.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Old and new password",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/resetpw",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_user_reset_password_get",
+                    "summary": "Initiate a user password reset",
+                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_user_reset_password_form_post",
+                    "summary": "Complete a user password reset",
+                    "notes": "Complete a user password reset.  Handles form POST response.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "User username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "recaptcha_challenge_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Challenge Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "recaptcha_response_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Response Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/{collection}",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "app_entity_get",
+                    "summary": "Query an app collection",
+                    "notes": "Query an app collection.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "collection",
+                            "dataType": "string",
+                            "description": "collection name (entity type)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "ql",
+                            "dataType": "string",
+                            "description": "a query in the query language",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "reversed",
+                            "dataType": "boolean",
+                            "description": "return results in reverse order",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "start",
+                            "dataType": "string",
+                            "description": "the first entity UUID to return",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "cursor",
+                            "dataType": "string",
+                            "description": "an encoded representation of the query position for paging",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "limit",
+                            "dataType": "integer",
+                            "description": "an encoded representation of the query position for paging",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "filter",
+                            "dataType": "integer",
+                            "description": "a condition to filter on",
+                            "required": false,
+                            "allowMultiple": true,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "app_entity_json_post",
+                    "summary": "Create new app entity",
+                    "notes": "Create new app entity.  See Usergrid documentation for JSON format of body.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "collection",
+                            "dataType": "string",
+                            "description": "collection name (entity type)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "User to post",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/apps/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}",
+            "description": "Applications",
+            "operations": [
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "app_entity_put",
+                    "summary": "Update an app entity",
+                    "notes": "Update an app entity in a collection.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "collection",
+                            "dataType": "string",
+                            "description": "collection name (entity type)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "entity_name_or_uuid",
+                            "dataType": "string",
+                            "description": "entity name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "User to post",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "DELETE",
+                    "nickname": "app_entity_delete",
+                    "summary": "Delete an app entity",
+                    "notes": "Delete an app entity.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "app name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "collection",
+                            "dataType": "string",
+                            "description": "collection name (entity type)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "entity_name_or_uuid",
+                            "dataType": "string",
+                            "description": "entity name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        }
+    ],
+    "models": {
+        "response": {
+            "properties": {
+                "id": {
+                    "type": "long"
+                },
+                "name": {
+                    "type": "string"
+                }
+            },
+            "id": "response"
+        }
+    }
+}
\ No newline at end of file


[06/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/applications.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/applications.json b/sdks/php5/apache-usergrid/src/Manifests/applications.json
deleted file mode 100644
index f747154..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/applications.json
+++ /dev/null
@@ -1,1262 +0,0 @@
-{
-    "basePath": "${basePath}",
-    "swaggerVersion": "1.1-SHAPSHOT.121026",
-    "apiVersion": "0.1",
-    "apis": [
-        {
-            "path": "/apps/{app_name_or_uuid}/token",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_auth_password_get",
-                    "summary": "Get app access token",
-                    "notes": "Get the app access token.  See the OAuth2 specification for details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "grant_type",
-                            "dataType": "string",
-                            "description": "Grant type",
-                            "defaultValue": "password",
-                            "allowableValues": {
-                                "values": [
-                                    "password",
-                                    "client_credentials",
-                                    "refresh_token",
-                                    "authorization_code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Password (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_secret",
-                            "dataType": "string",
-                            "description": "Client Secret (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_auth_password_post",
-                    "summary": "Get app access token",
-                    "notes": "Get the app access token.  See the OAuth2 specification for details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "grant_type",
-                            "dataType": "string",
-                            "description": "Grant type",
-                            "defaultValue": "password",
-                            "allowableValues": {
-                                "values": [
-                                    "password",
-                                    "client_credentials",
-                                    "refresh_token",
-                                    "authorization_code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Password (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "client_secret",
-                            "dataType": "string",
-                            "description": "Client Secret (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/authorize",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_authorize_get",
-                    "summary": "Authorize app client",
-                    "notes": "Authorize the app client.  See the OAuth2 specification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "response_type",
-                            "dataType": "string",
-                            "description": "Response type",
-                            "defaultValue": "token",
-                            "allowableValues": {
-                                "values": [
-                                    "token",
-                                    "code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "redirect_uri",
-                            "dataType": "string",
-                            "description": "Redirect URI",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "scope",
-                            "dataType": "string",
-                            "description": "Access Token Scope",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "state",
-                            "dataType": "string",
-                            "description": "Client State",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_authorize_post",
-                    "summary": "Authorize app client",
-                    "notes": "Authorize the app client.  See the OAuth2 specification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "response_type",
-                            "dataType": "string",
-                            "description": "Response type",
-                            "defaultValue": "token",
-                            "allowableValues": {
-                                "values": [
-                                    "token",
-                                    "code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "redirect_uri",
-                            "dataType": "string",
-                            "description": "Redirect URI",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "scope",
-                            "dataType": "string",
-                            "description": "Access Token Scope",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "state",
-                            "dataType": "string",
-                            "description": "Client State",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Password",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/credentials",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_credentials_get",
-                    "summary": "Get app client credentials",
-                    "notes": "Get the app client credentials.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_credentials_post",
-                    "summary": "Generate app client credentials",
-                    "notes": "Generate new app client credentials.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_user_json_post",
-                    "summary": "Create new app user",
-                    "notes": "Create new app user.  See Usergrid documentation for JSON format of body.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "User to post",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_user_form_post",
-                    "summary": "Create new app user",
-                    "notes": "Create new app user using form post parameters.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "name",
-                            "dataType": "string",
-                            "description": "User Full Name",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "email",
-                            "dataType": "string",
-                            "description": "User Email",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "User Password",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/resetpw",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_users_reset_password_get",
-                    "summary": "Initiate a user password reset",
-                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_users_reset_password_form_post",
-                    "summary": "Complete a user password reset",
-                    "notes": "Complete a user password reset.  Handles form POST response.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "email",
-                            "dataType": "string",
-                            "description": "User Email",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "recaptcha_challenge_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Challenge Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "recaptcha_response_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Response Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_user_get",
-                    "summary": "Returns the app user details",
-                    "notes": "Returns the app user details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "app_user_json_put",
-                    "summary": "Updates the app user details",
-                    "notes": "Updates the app user details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "App user details",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/activate",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_user_activate_get",
-                    "summary": "Activates the app user",
-                    "notes": "Activates the app user from link provided in email notification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "token",
-                            "dataType": "string",
-                            "description": "Activation Token (supplied via email)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "confirm",
-                            "dataType": "boolean",
-                            "description": "Send confirmation email",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/reactivate",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_user_reactivate_get",
-                    "summary": "Reactivates the app user",
-                    "notes": "Request app user reactivation.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/feed",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_user_feed_get",
-                    "summary": "Get app user activity feed",
-                    "notes": "Get app user activity feed.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/password",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "app_user_password_json_put",
-                    "summary": "Set app user password",
-                    "notes": "Set app user password.  See Usergrid documentation for JSON format of body.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Old and new password",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/resetpw",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_user_reset_password_get",
-                    "summary": "Initiate a user password reset",
-                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_user_reset_password_form_post",
-                    "summary": "Complete a user password reset",
-                    "notes": "Complete a user password reset.  Handles form POST response.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "User username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "recaptcha_challenge_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Challenge Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "recaptcha_response_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Response Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/{collection}",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "app_entity_get",
-                    "summary": "Query an app collection",
-                    "notes": "Query an app collection.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "collection",
-                            "dataType": "string",
-                            "description": "collection name (entity type)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "ql",
-                            "dataType": "string",
-                            "description": "a query in the query language",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "reversed",
-                            "dataType": "boolean",
-                            "description": "return results in reverse order",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "start",
-                            "dataType": "string",
-                            "description": "the first entity UUID to return",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "cursor",
-                            "dataType": "string",
-                            "description": "an encoded representation of the query position for paging",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "limit",
-                            "dataType": "integer",
-                            "description": "an encoded representation of the query position for paging",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "filter",
-                            "dataType": "integer",
-                            "description": "a condition to filter on",
-                            "required": false,
-                            "allowMultiple": true,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "app_entity_json_post",
-                    "summary": "Create new app entity",
-                    "notes": "Create new app entity.  See Usergrid documentation for JSON format of body.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "collection",
-                            "dataType": "string",
-                            "description": "collection name (entity type)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "User to post",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/apps/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}",
-            "description": "Applications",
-            "operations": [
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "app_entity_put",
-                    "summary": "Update an app entity",
-                    "notes": "Update an app entity in a collection.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "collection",
-                            "dataType": "string",
-                            "description": "collection name (entity type)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "entity_name_or_uuid",
-                            "dataType": "string",
-                            "description": "entity name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "User to post",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "DELETE",
-                    "nickname": "app_entity_delete",
-                    "summary": "Delete an app entity",
-                    "notes": "Delete an app entity.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "app name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "collection",
-                            "dataType": "string",
-                            "description": "collection name (entity type)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "entity_name_or_uuid",
-                            "dataType": "string",
-                            "description": "entity name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        }
-    ],
-    "models": {
-        "response": {
-            "properties": {
-                "id": {
-                    "type": "long"
-                },
-                "name": {
-                    "type": "string"
-                }
-            },
-            "id": "response"
-        }
-    }
-}
\ No newline at end of file


[03/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/swagger-json/management.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/swagger-json/management.json b/sdks/php5/apache-usergrid/src/Manifests/swagger-json/management.json
new file mode 100644
index 0000000..8323222
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Manifests/swagger-json/management.json
@@ -0,0 +1,1905 @@
+{
+    "basePath": "${basePath}",
+    "swaggerVersion": "1.1-SHAPSHOT.121026",
+    "apiVersion": "0.1",
+    "apis": [
+        {
+            "path": "/management/token",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_auth_password_get",
+                    "summary": "Get management access token",
+                    "notes": "Get the management access token.  See the OAuth2 specification for details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "grant_type",
+                            "dataType": "string",
+                            "description": "Grant type",
+                            "defaultValue": "password",
+                            "allowableValues": {
+                                "values": [
+                                    "password",
+                                    "client_credentials",
+                                    "refresh_token",
+                                    "authorization_code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Password (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_secret",
+                            "dataType": "string",
+                            "description": "Client Secret (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_auth_password_post",
+                    "summary": "Get management access token",
+                    "notes": "Get the management access token.  See the OAuth2 specification for details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "grant_type",
+                            "dataType": "string",
+                            "description": "Grant type",
+                            "defaultValue": "password",
+                            "allowableValues": {
+                                "values": [
+                                    "password",
+                                    "client_credentials",
+                                    "refresh_token",
+                                    "authorization_code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Password (for grant_type=password)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "client_secret",
+                            "dataType": "string",
+                            "description": "Client Secret (for grant_type=client_credentials)",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/authorize",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_authorize_get",
+                    "summary": "Authorize client",
+                    "notes": "Authorize the client.  See the OAuth2 specification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "response_type",
+                            "dataType": "string",
+                            "description": "Response type",
+                            "defaultValue": "token",
+                            "allowableValues": {
+                                "values": [
+                                    "token",
+                                    "code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "redirect_uri",
+                            "dataType": "string",
+                            "description": "Redirect URI",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "scope",
+                            "dataType": "string",
+                            "description": "Access Token Scope",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "state",
+                            "dataType": "string",
+                            "description": "Client State",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_authorize_post",
+                    "summary": "Authorize client",
+                    "notes": "Authorize the client.  See the OAuth2 specification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "response_type",
+                            "dataType": "string",
+                            "description": "Response type",
+                            "defaultValue": "token",
+                            "allowableValues": {
+                                "values": [
+                                    "token",
+                                    "code"
+                                ],
+                                "valueType": "LIST"
+                            },
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "client_id",
+                            "dataType": "string",
+                            "description": "Client ID",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "redirect_uri",
+                            "dataType": "string",
+                            "description": "Redirect URI",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "scope",
+                            "dataType": "string",
+                            "description": "Access Token Scope",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "state",
+                            "dataType": "string",
+                            "description": "Client State",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Username",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Password",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_json_post",
+                    "summary": "Create new organization",
+                    "notes": "Create new organization.  See Usergrid documentation for JSON format of body.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Organization to post",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_form_post",
+                    "summary": "Create new organization",
+                    "notes": "Create new organization using form post parameters.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "organization",
+                            "dataType": "string",
+                            "description": "Organization",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Admin Username",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "name",
+                            "dataType": "string",
+                            "description": "Admin Name",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "email",
+                            "dataType": "string",
+                            "description": "Admin Email",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Admin Password",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_get",
+                    "summary": "Find organization by name or UUID",
+                    "notes": "Returns the organization details",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/activate",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_activate_get",
+                    "summary": "Activates the organization",
+                    "notes": "Activates the organization from link provided in email notification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "token",
+                            "dataType": "string",
+                            "description": "Activation Token (supplied via email)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "confirm",
+                            "dataType": "boolean",
+                            "description": "Send confirmation email",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/reactivate",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_reactivate_get",
+                    "summary": "Reactivates the organization",
+                    "notes": "Request organization reactivation.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/feed",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_feed_get",
+                    "summary": "Get organization activity feed",
+                    "notes": "Get organization activity feed.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/credentials",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_credentials_get",
+                    "summary": "Get organization client credentials",
+                    "notes": "Get the organization client credentials.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_credentials_post",
+                    "summary": "Generate organization client credentials",
+                    "notes": "Generate new organization client credentials.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/users",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_users_get",
+                    "summary": "Get admin users for organization",
+                    "notes": "Get admin users for organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_users_json_post",
+                    "summary": "Create new admin user for organization",
+                    "notes": "Create new admin user for organization using JSON payload.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Admin user to create",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_users_form_post",
+                    "summary": "Create new admin user for organization",
+                    "notes": "Create new admin user for organization using form parameters.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Admin Username",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "name",
+                            "dataType": "string",
+                            "description": "Admin Name",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "email",
+                            "dataType": "string",
+                            "description": "Admin Email",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Admin Password",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/users/{user_username_email_or_uuid}",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "mgt_org_user_put",
+                    "summary": "Add admin users to organization",
+                    "notes": "Adds existing admin users for organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin user username, email, or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "DELETE",
+                    "nickname": "mgt_org_user_delete",
+                    "summary": "Remove admin user from organization",
+                    "notes": "Remove an admin user from organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin user username, email, or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/apps",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_apps_get",
+                    "summary": "Get apps for organization",
+                    "notes": "Get apps for organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_apps_json_post",
+                    "summary": "Create new application for organization",
+                    "notes": "Create new application for organization using JSON payload.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Application to create",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_apps_form_post",
+                    "summary": "Create new application for organization",
+                    "notes": "Create new application for organization using form parameters.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "name",
+                            "dataType": "string",
+                            "description": "Application Name",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "DELETE",
+                    "nickname": "mgt_org_app_delete",
+                    "summary": "Delete an application in an organization",
+                    "notes": "Delete an application in an organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Application name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}/credentials",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_app_credentials_get",
+                    "summary": "Get application keys",
+                    "notes": "Get application keys.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Application name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_app_credentials_post",
+                    "summary": "Generate application keys",
+                    "notes": "Generate application keys.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "app_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Application name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Application not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_user_json_post",
+                    "summary": "Create new admin user",
+                    "notes": "Create new admin user.  See Usergrid documentation for JSON format of body.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Admin user to post",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_user_form_post",
+                    "summary": "Create new organization",
+                    "notes": "Create new admin using form post parameters.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "username",
+                            "dataType": "string",
+                            "description": "Admin Username",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "name",
+                            "dataType": "string",
+                            "description": "Admin Name",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "email",
+                            "dataType": "string",
+                            "description": "Admin Email",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "password",
+                            "dataType": "string",
+                            "description": "Admin Password",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/resetpw",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_org_user_reset_password_get",
+                    "summary": "Initiate a user password reset",
+                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_org_user_reset_password_form_post",
+                    "summary": "Complete a user password reset",
+                    "notes": "Complete a user password reset.  Handles form POST response.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "email",
+                            "dataType": "string",
+                            "description": "Admin Email",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "recaptcha_challenge_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Challenge Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "recaptcha_response_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Response Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_admin_user_get",
+                    "summary": "Returns the admin user details",
+                    "notes": "Returns the admin user details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "mgt_admin_user_json_put",
+                    "summary": "Updates the admin user details",
+                    "notes": "Updates the admin user details.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Admin user details",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/activate",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_admin_user_activate_get",
+                    "summary": "Activates the admin user",
+                    "notes": "Activates the admin user from link provided in email notification.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "token",
+                            "dataType": "string",
+                            "description": "Activation Token (supplied via email)",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "confirm",
+                            "dataType": "boolean",
+                            "description": "Send confirmation email",
+                            "required": false,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/reactivate",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_admin_user_reactivate_get",
+                    "summary": "Reactivates the admin user",
+                    "notes": "Request admin user reactivation.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/feed",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_admin_user_feed_get",
+                    "summary": "Get admin user activity feed",
+                    "notes": "Get admin user activity feed.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/password",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "mgt_admin_user_password_json_put",
+                    "summary": "Set admin user password",
+                    "notes": "Set admin user password.  See Usergrid documentation for JSON format of body.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Old and new password",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/resetpw",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_admin_user_reset_password_get",
+                    "summary": "Initiate a user password reset",
+                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_admin_user_reset_password_form_post",
+                    "summary": "Complete a user password reset",
+                    "notes": "Complete a user password reset.  Handles form POST response.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "recaptcha_challenge_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Challenge Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "recaptcha_response_field",
+                            "dataType": "string",
+                            "description": "Recaptcha Response Field",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "Organization not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/orgs",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "GET",
+                    "nickname": "mgt_admin_user_orgs_get",
+                    "summary": "Get organizations for admin user",
+                    "notes": "Get organizations for admin user.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_admin_user_orgs_json_post",
+                    "summary": "Create new organization for admin user",
+                    "notes": "Create new organization for admin user using JSON payload.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "json",
+                            "dataType": "string",
+                            "description": "Organization to create",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "body"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "POST",
+                    "nickname": "mgt_admin_user_orgs_form_post",
+                    "summary": "Create new organization for admin user",
+                    "notes": "Create new organization for admin user using form parameters.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin username, email or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "organization",
+                            "dataType": "string",
+                            "description": "Organization name",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "post"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "path": "/management/users/{user_username_email_or_uuid}/orgs/{org_name_or_uuid}",
+            "description": "Management",
+            "operations": [
+                {
+                    "httpMethod": "PUT",
+                    "nickname": "mgt_admin_user_org_put",
+                    "summary": "Add admin user to organization",
+                    "notes": "Add admin users to organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin user username, email, or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                },
+                {
+                    "httpMethod": "DELETE",
+                    "nickname": "mgt_admin_user_org_delete",
+                    "summary": "Remove admin user from organization",
+                    "notes": "Remove an admin user from organization.",
+                    "responseTypeInternal": "",
+                    "responseClass": "response",
+                    "parameters": [
+                        {
+                            "name": "access_token",
+                            "dataType": "string",
+                            "description": "The OAuth2 access token",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "query"
+                        },
+                        {
+                            "name": "user_username_email_or_uuid",
+                            "dataType": "string",
+                            "description": "Admin user username, email, or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        },
+                        {
+                            "name": "org_name_or_uuid",
+                            "dataType": "string",
+                            "description": "Organization name or uuid",
+                            "required": true,
+                            "allowMultiple": false,
+                            "paramType": "path"
+                        }
+                    ],
+                    "errorResponses": [
+                        {
+                            "reason": "Invalid ID supplied",
+                            "code": 400
+                        },
+                        {
+                            "reason": "User not found",
+                            "code": 404
+                        }
+                    ]
+                }
+            ]
+        }
+    ],
+    "models": {
+        "response": {
+            "properties": {
+                "id": {
+                    "type": "long"
+                },
+                "name": {
+                    "type": "string"
+                }
+            },
+            "id": "response"
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/swagger-json/resources.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/swagger-json/resources.json b/sdks/php5/apache-usergrid/src/Manifests/swagger-json/resources.json
new file mode 100644
index 0000000..8a6ffad
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Manifests/swagger-json/resources.json
@@ -0,0 +1,15 @@
+{
+    "basePath": "${basePath}",
+    "swaggerVersion": "1.1-SHAPSHOT.121026",
+    "apiVersion": "0.1",
+    "apis": [
+        {
+            "path": "/applications.{format}",
+            "description": "Applications"
+        },
+        {
+            "path": "/management.{format}",
+            "description": "Management"
+        }
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Native/Facades/Usergrid.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Native/Facades/Usergrid.php b/sdks/php5/apache-usergrid/src/Native/Facades/Usergrid.php
index 09fa040..fbfcffe 100644
--- a/sdks/php5/apache-usergrid/src/Native/Facades/Usergrid.php
+++ b/sdks/php5/apache-usergrid/src/Native/Facades/Usergrid.php
@@ -32,18 +32,17 @@ use Apache\Usergrid\Native\UsergridBootstrapper;
 class Usergrid
 {
     /**
-     * The Usergrid API instance.
-     *
-     * @var \Apache\Usergrid\Api\Usergrid
-     */
-    protected $usergrid;
-
-    /**
      * The Native Bootstrap instance.
      *
      * @var \Apache\Usergrid\Native\UsergridBootstrapper
      */
     protected static $instance;
+    /**
+     * The Usergrid API instance.
+     *
+     * @var \Apache\Usergrid\Api\Usergrid
+     */
+    protected $usergrid;
 
     /**
      * Constructor.
@@ -61,31 +60,6 @@ class Usergrid
     }
 
     /**
-     * Creates a new Native Bootstraper instance.
-     *
-     * @param  \Apache\Usergrid\Native\UsergridBootstrapper $bootstrapper
-     * @return void
-     */
-    public static function instance(UsergridBootstrapper $bootstrapper = null)
-    {
-        if (static::$instance === null) {
-            static::$instance = new static($bootstrapper);
-        }
-
-        return static::$instance;
-    }
-
-    /**
-     * Returns the Usergrid API instance.
-     *
-     * @return \Apache\Usergrid\Api\Usergrid
-     */
-    public function getUsergrid()
-    {
-        return $this->usergrid;
-    }
-
-    /**
      * Handle dynamic, static calls to the object.
      *
      * @param  string $method
@@ -116,4 +90,29 @@ class Usergrid
                 return call_user_func_array([$instance, $method], $args);
         }
     }
+
+    /**
+     * Creates a new Native Bootstraper instance.
+     *
+     * @param  \Apache\Usergrid\Native\UsergridBootstrapper $bootstrapper
+     * @return static
+     */
+    public static function instance(UsergridBootstrapper $bootstrapper = null)
+    {
+        if (static::$instance === null) {
+            static::$instance = new static($bootstrapper);
+        }
+
+        return static::$instance;
+    }
+
+    /**
+     * Returns the Usergrid API instance.
+     *
+     * @return \Apache\Usergrid\Api\Usergrid
+     */
+    public function getUsergrid()
+    {
+        return $this->usergrid;
+    }
 } 
\ No newline at end of file


[02/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Native/UsergridBootstrapper.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Native/UsergridBootstrapper.php b/sdks/php5/apache-usergrid/src/Native/UsergridBootstrapper.php
index d20b583..0f71b78 100644
--- a/sdks/php5/apache-usergrid/src/Native/UsergridBootstrapper.php
+++ b/sdks/php5/apache-usergrid/src/Native/UsergridBootstrapper.php
@@ -17,13 +17,12 @@
 namespace Apache\Usergrid\Native;
 
 
-
 use Apache\Usergrid\Api\Usergrid;
-use Guzzle\Http\Client;
 use Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType\ClientCredentials;
 use Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType\PasswordCredentials;
 use Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType\RefreshToken;
 use Apache\Usergrid\Guzzle\Plugin\Oauth2\Oauth2Plugin;
+use Guzzle\Http\Client;
 
 /**
  * Class UsergridBootstrapper
@@ -49,7 +48,8 @@ class UsergridBootstrapper
      *
      * @var \Apache\Usergrid\Guzzle\Plugin\Oauth2\Oauth2Plugin
      */
-    protected $oauth2Plugin =  null;
+    protected $oauth2Plugin = null;
+
     /**
      * Constructor.
      *
@@ -81,7 +81,7 @@ class UsergridBootstrapper
         $enable_oauth2_plugin = array_get($this->config, 'usergrid.enable_oauth2_plugin');
 
         //check if user wants to manage there own Oauth 2 auth flow
-        if($enable_oauth2_plugin) {
+        if ($enable_oauth2_plugin) {
 
             $this->createOauth2Plugin();
 
@@ -113,29 +113,28 @@ class UsergridBootstrapper
 
         $app_name = array_get($this->config, 'usergrid.appName');
 
-        if($auth_type == 'organization') {
+        if ($auth_type == 'organization') {
 
-            $url = $base_url.'/management/token';
+            $url = $base_url . '/management/token';
 
-        } elseif($auth_type == 'application')
-        {
-            $url = $base_url.'/'.$org_name.'/'.$app_name.'/token';
+        } elseif ($auth_type == 'application') {
+            $url = $base_url . '/' . $org_name . '/' . $app_name . '/token';
         }
 
         $oauth2Client = new Client($url);
 
 
-        if($grant_type  == 'client_credentials') {
+        if ($grant_type == 'client_credentials') {
             $config = [
                 'client_id' => $client_id,
                 'client_secret' => $client_secret,
 
             ];
             $grantType = new ClientCredentials($oauth2Client, $config);
-            $refreshTokenGrantType = new RefreshToken($oauth2Client,$config);
+            $refreshTokenGrantType = new RefreshToken($oauth2Client, $config);
             $this->oauth2Plugin = new Oauth2Plugin($grantType, $refreshTokenGrantType);
 
-        } elseif($grant_type == 'password') {
+        } elseif ($grant_type == 'password') {
             $config = [
                 'username' => $username,
                 'password' => $password,
@@ -144,7 +143,7 @@ class UsergridBootstrapper
             ];
             $grantType = new PasswordCredentials($oauth2Client, $config);
             $refreshTokenGrantType = new RefreshToken($oauth2Client, $config);
-            $this->oauth2Plugin =  new Oauth2Plugin($grantType,$refreshTokenGrantType);
+            $this->oauth2Plugin = new Oauth2Plugin($grantType, $refreshTokenGrantType);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/config/config.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/config/config.php b/sdks/php5/apache-usergrid/src/config/config.php
index c9aff6a..75a886f 100644
--- a/sdks/php5/apache-usergrid/src/config/config.php
+++ b/sdks/php5/apache-usergrid/src/config/config.php
@@ -19,27 +19,17 @@ return [
     'usergrid' => [
 
         'url' => 'https://api.usergrid.com',
-
         'version' => '1.0.0',
-
         'orgName' => null,
-
         'appName' => null,
-
         'manifestPath' => null,
-
         //its better not to set the real values here if using laravel set them in a .env file or
         // if your not using Laravel set them as environment variable and include them here using $_ENV global.
         // so that way you can be sure not to commit privates ID to a public repo
         'clientId' => null,
-
         'clientSecret' => null,
-
         'username' => null,
-
         'password' => null,
-
-
         /**
          * The Auth Type setting is the Oauth 2 end point you want to get the OAuth 2
          * Token from.  You have two options here one is 'application' the other is 'organization'
@@ -48,7 +38,6 @@ return [
          *  application will get the token from http://example.com/managment/org_name/app_name using client_credentials or password grant type
          */
         'auth_type' => 'organization',
-
         /** The Grant Type to use
          *
          * This has to be set to one of the 2 grant types that Apache Usergrid
@@ -56,7 +45,6 @@ return [
          * 2 level organization or application
          */
         'grant_type' => 'client_credentials',
-
         /**
          * if you want to manage your own auth flow by calling the token api and setting the token your self just set this to false
          * */

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/ApplicationTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/ApplicationTest.php b/sdks/php5/apache-usergrid/tests/Api/ApplicationTest.php
index 00ba533..d25a205 100644
--- a/sdks/php5/apache-usergrid/tests/Api/ApplicationTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/ApplicationTest.php
@@ -21,7 +21,7 @@ use Apache\Usergrid\Api\Exception\UsergridException;
 use PHPUnit_Framework_TestCase;
 
 /**
- * Class UsergridTest
+ * Class ApplicationTest
  *
  * @package    Apache/Usergrid
  * @version    1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/AttributeTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/AttributeTest.php b/sdks/php5/apache-usergrid/tests/Api/AttributeTest.php
new file mode 100644
index 0000000..cc1f29e
--- /dev/null
+++ b/sdks/php5/apache-usergrid/tests/Api/AttributeTest.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+namespace Apache\Usergrid\Tests\Api;
+
+
+use PHPUnit_Framework_TestCase;
+
+/**
+ * Class AttributeTest
+ *
+ * @package    Apache/Usergrid
+ * @version    1.0.0
+ * @author     Jason Kristian <ja...@gmail.com>
+ * @license    Apache License, Version  2.0
+ * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
+ * @link       http://baas-platform.com
+ */
+class AttributeTest extends PHPUnit_Framework_TestCase
+{
+    /** @var  Usergrid Api Client */
+    protected $usergrid;
+
+
+    /**
+     * Setup resources and dependencies
+     *
+     * @return void
+     */
+    public function setup()
+    {
+        $this->usergrid = $GLOBALS['usergrid'];
+    }
+
+    /**
+     * @test
+     * @group internet
+     */
+    public function it_should_have_attribute()
+    {
+        $this->assertTrue(method_exists('Apache\Usergrid\Api\Models\User', 'deviceAttribute'),
+            'Class does not have method Attribute Method'
+        );
+    }
+}
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Exception/BadRequestExceptionTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Exception/BadRequestExceptionTest.php b/sdks/php5/apache-usergrid/tests/Api/Exception/BadRequestExceptionTest.php
index 0323c19..b716e3d 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Exception/BadRequestExceptionTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Exception/BadRequestExceptionTest.php
@@ -16,9 +16,9 @@
 
 namespace Apache\Usergrid\Tests\Api\Exception;
 
-use PHPUnit_Framework_TestCase;
-use Guzzle\Http\Message\Response;
 use Apache\Usergrid\Api\Exception\BadRequestException;
+use Guzzle\Http\Message\Response;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class BadRequestExceptionTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Exception/InvalidIdExceptionTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Exception/InvalidIdExceptionTest.php b/sdks/php5/apache-usergrid/tests/Api/Exception/InvalidIdExceptionTest.php
index d2256d1..b74aa64 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Exception/InvalidIdExceptionTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Exception/InvalidIdExceptionTest.php
@@ -16,9 +16,9 @@
 
 namespace Apache\Usergrid\Tests\Api\Exception;
 
-use PHPUnit_Framework_TestCase;
-use Guzzle\Http\Message\Response;
 use Apache\Usergrid\Api\Exception\InvalidIdException;
+use Guzzle\Http\Message\Response;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class InvalidIdExceptionTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Exception/NotFoundExceptionTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Exception/NotFoundExceptionTest.php b/sdks/php5/apache-usergrid/tests/Api/Exception/NotFoundExceptionTest.php
index 91ecd14..c264751 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Exception/NotFoundExceptionTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Exception/NotFoundExceptionTest.php
@@ -16,9 +16,9 @@
 
 namespace Apache\Usergrid\Tests\Api\Exception;
 
-use PHPUnit_Framework_TestCase;
-use Guzzle\Http\Message\Response;
 use Apache\Usergrid\Api\Exception\NotFoundException;
+use Guzzle\Http\Message\Response;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class UnauthorizedExceptionTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Exception/ServerErrorExceptionTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Exception/ServerErrorExceptionTest.php b/sdks/php5/apache-usergrid/tests/Api/Exception/ServerErrorExceptionTest.php
index 7782bcc..514288f 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Exception/ServerErrorExceptionTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Exception/ServerErrorExceptionTest.php
@@ -16,9 +16,9 @@
 
 namespace Apache\Usergrid\Tests\Api\Exception;
 
-use PHPUnit_Framework_TestCase;
-use Guzzle\Http\Message\Response;
 use Apache\Usergrid\Api\Exception\ServerErrorException;
+use Guzzle\Http\Message\Response;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class ServerErrorException

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Exception/UnauthorizedExceptionTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Exception/UnauthorizedExceptionTest.php b/sdks/php5/apache-usergrid/tests/Api/Exception/UnauthorizedExceptionTest.php
index 0607438..889e7de 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Exception/UnauthorizedExceptionTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Exception/UnauthorizedExceptionTest.php
@@ -17,9 +17,9 @@
 namespace Apache\Usergrid\Tests\Api\Exception;
 
 
-use PHPUnit_Framework_TestCase;
-use Guzzle\Http\Message\Response;
 use Apache\Usergrid\Api\Exception\UnauthorizedException;
+use Guzzle\Http\Message\Response;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class UnauthorizedExceptionTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Filters/BooleanTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Filters/BooleanTest.php b/sdks/php5/apache-usergrid/tests/Api/Filters/BooleanTest.php
index 702cb71..1550a55 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Filters/BooleanTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Filters/BooleanTest.php
@@ -17,8 +17,8 @@
 namespace Apache\Usergrid\Tests\Api\Filters;
 
 
-use PHPUnit_Framework_TestCase;
 use Apache\Usergrid\Api\Filters\Boolean;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class BooleanTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/Filters/DateTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/Filters/DateTest.php b/sdks/php5/apache-usergrid/tests/Api/Filters/DateTest.php
index bebbf89..13d37f6 100644
--- a/sdks/php5/apache-usergrid/tests/Api/Filters/DateTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/Filters/DateTest.php
@@ -17,8 +17,8 @@
 namespace Apache\Usergrid\Tests\Api\Filters;
 
 
-use PHPUnit_Framework_TestCase;
 use Apache\Usergrid\Api\Filters\Date;
+use PHPUnit_Framework_TestCase;
 
 /**
  * Class DateTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/ManagementTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/ManagementTest.php b/sdks/php5/apache-usergrid/tests/Api/ManagementTest.php
index fdda2b1..46ea21c 100644
--- a/sdks/php5/apache-usergrid/tests/Api/ManagementTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/ManagementTest.php
@@ -21,7 +21,7 @@ use Apache\Usergrid\Api\Exception\UsergridException;
 use PHPUnit_Framework_TestCase;
 
 /**
- * Class UsergridTest
+ * Class ManagementTest
  *
  * @package    Apache/Usergrid
  * @version    1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/QueryAggregatorTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/QueryAggregatorTest.php b/sdks/php5/apache-usergrid/tests/Api/QueryAggregatorTest.php
index 5cf5881..eaa7b0b 100644
--- a/sdks/php5/apache-usergrid/tests/Api/QueryAggregatorTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/QueryAggregatorTest.php
@@ -17,9 +17,7 @@
 namespace Apache\Usergrid\Tests\Api;
 
 
-use Guzzle\Http\QueryString;
 use PHPUnit_Framework_TestCase;
-use Apache\Usergrid\Api\QueryAggregator;
 
 /**
  * Class QueryAggregatorTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Api/UsergridTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Api/UsergridTest.php b/sdks/php5/apache-usergrid/tests/Api/UsergridTest.php
index 908665c..0c7a340 100644
--- a/sdks/php5/apache-usergrid/tests/Api/UsergridTest.php
+++ b/sdks/php5/apache-usergrid/tests/Api/UsergridTest.php
@@ -36,6 +36,7 @@ class UsergridTest extends PHPUnit_Framework_TestCase
     protected $usergrid;
 
     protected $config;
+
     /**
      * Setup resources and dependencies
      *
@@ -43,7 +44,7 @@ class UsergridTest extends PHPUnit_Framework_TestCase
      */
     public function setup()
     {
-        $this->usergrid  = $GLOBALS['usergrid'];
+        $this->usergrid = $GLOBALS['usergrid'];
     }
 
     /**
@@ -56,7 +57,7 @@ class UsergridTest extends PHPUnit_Framework_TestCase
 
         try {
             $this->usergrid->application()->EntityGet(['collection' => 'roles']);
-        } catch(UnauthorizedException $e) {
+        } catch (UnauthorizedException $e) {
             $error = $e;
         }
 
@@ -142,12 +143,11 @@ class UsergridTest extends PHPUnit_Framework_TestCase
         $expected = [
             'Usergrid-Version' => '1.0.1',
             'Authorization' => 'Bearer ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890',
-            'some-header'    => 'foo-bar',
+            'some-header' => 'foo-bar',
         ];
 
         $this->assertEquals($headers, $expected);
     }
 
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/Laravel/Facades/UsergridTest.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/Laravel/Facades/UsergridTest.php b/sdks/php5/apache-usergrid/tests/Laravel/Facades/UsergridTest.php
index 9a72f17..3362bfc 100644
--- a/sdks/php5/apache-usergrid/tests/Laravel/Facades/UsergridTest.php
+++ b/sdks/php5/apache-usergrid/tests/Laravel/Facades/UsergridTest.php
@@ -15,8 +15,8 @@
  */
 namespace Apache\Usergrid\Tests\Laravel\Facades;
 
-use ReflectionClass;
 use PHPUnit_Framework_TestCase;
+use ReflectionClass;
 
 /**
  * Class UsergridTest

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/tests/bootstrap.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/tests/bootstrap.php b/sdks/php5/apache-usergrid/tests/bootstrap.php
index 44bface..edc11d1 100644
--- a/sdks/php5/apache-usergrid/tests/bootstrap.php
+++ b/sdks/php5/apache-usergrid/tests/bootstrap.php
@@ -18,32 +18,22 @@ include('vendor/autoload.php');
 
 use Apache\Usergrid\Native\UsergridBootstrapper;
 
-$config =  [
+$config = [
 
     'usergrid' => [
 
         'url' => 'https://api.usergrid.com',
-
         'version' => '1.0.1',
-
         'orgName' => null,
-
         'appName' => null,
-
         'manifestPath' => null,
-
         //its better not to set the real values here if using laravel set them in a .env file or
         // if your not using Laravel set them as environment variable and include them here using $_ENV global.
         // so that way you can be sure not to commit privates ID to a public repo
         'clientId' => null,
-
         'clientSecret' => null,
-
         'username' => null,
-
         'password' => null,
-
-
         /**
          * The Auth Type setting is the Oauth 2 end point you want to get the OAuth 2
          * Token from.  You have two options here one is 'application' the other is 'organization'
@@ -52,7 +42,6 @@ $config =  [
          *  application will get the token from http://example.com/managment/org_name/app_name using client_credentials or password grant type
          */
         'auth_type' => 'organization',
-
         /** The Grant Type to use
          *
          * This has to be set to one of the 2 grant types that Apache Usergrid
@@ -60,7 +49,6 @@ $config =  [
          * 2 level organization or application
          */
         'grant_type' => 'client_credentials',
-
         /**
          * if you want to manage your own auth flow by calling the token api and setting the token your self just set this to false
          * */


[07/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/Usergrid.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/Usergrid.php b/sdks/php5/apache-usergrid/src/Manifests/Usergrid.php
deleted file mode 100644
index f4522bb..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/Usergrid.php
+++ /dev/null
@@ -1,4689 +0,0 @@
-<?php
-/**
- * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-
-return [
-
-    'name' => 'Management',
-    'apiVersion' => '1.1',
-    'baseUrl' => 'http://baas-platform.com',
-    'description' => 'Client to Usergrid management service',
-    'operations' => [
-
-        'AuthPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/token',
-            'summary' => 'Get management access token',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'grant_type' => [
-                    'description' => 'Grant type.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'defaultValue' => 'password',
-                    'required' => true,
-                ],
-                'username' => [
-                    'description' => 'Username (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'password' => [
-                    'description' => 'Password (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_secret' => [
-                    'description' => 'Client Secret (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthorizeGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/authorize',
-            'summary' => 'Authorize the client.  See the OAuth2 specification.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'response_type' => [
-                    'description' => 'Response type.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'defaultValue' => 'token',
-                    'required' => true,
-                    'allowableValues' => ['code', 'token']
-                ],
-                'client_id' => [
-                    'description' => 'Client ID.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'redirect_uri' => [
-                    'description' => 'Redirect URI.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'scope' => [
-                    'description' => 'Access Token Scope.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'state' => [
-                    'description' => 'Client State.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-
-        ],
-        'OrgJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs',
-            'summary' => 'Create new organization.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'organization' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization Name'
-                ],
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}',
-            'summary' => 'Find organization by name or UUID',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied or Name",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgActivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/activate',
-            'summary' => 'Activates the organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied or Name",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'confirm' => [
-                    'location' => 'query',
-                    'type' => 'boolean',
-                    'required' => false,
-                    'description' => 'Send confirmation email'
-                ]
-
-            ]
-        ],
-        'OrgReactivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/reactivate',
-            'summary' => 'Reactivates the organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-            ]
-        ],
-        'OrgFeedGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/feed',
-            'summary' => 'Get organization activity feed',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgCredentialsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/credentials',
-            'summary' => 'Get organization client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgCredentialsPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/credentials',
-            'summary' => 'Generate organization client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgUsersGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users',
-            'summary' => 'Get admin users for organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgUsersJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users',
-            'summary' => 'Create new admin user for organization using JSON payload.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgUsersFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users',
-            'summary' => 'Create new admin user for organization using form parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'username' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-        ],
-        'OrgUserPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'summary' => 'Adds existing admin users for organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin user username, email, or uuid'
-                ]
-            ]
-        ],
-        'OrgUserDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/management/orgs/{org_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'summary' => 'Remove an admin user from organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin user username, email, or uuid'
-                ]
-            ]
-        ],
-        'OrgAppsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps',
-            'summary' => 'Get apps for organization',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ]
-            ]
-        ],
-        'OrgAppsJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps',
-            'summary' => 'Create new application for organization using JSON payload.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application Name'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgAppsFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps',
-            'summary' => 'Create new application for organization using form parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application Name'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-        ],
-        'OrgAppDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}',
-            'summary' => 'Delete an application in an organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'app_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application name or uuid'
-                ]
-            ]
-        ],
-        'OrgAppCredentialsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}/credentials',
-            'summary' => 'Get application keys.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'app_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application name or uuid'
-                ]
-            ]
-        ],
-        'OrgAppCredentialsPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}/credentials',
-            'summary' => 'Generate application keys.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-                'app_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Application name or uuid'
-                ]
-            ]
-        ],
-        'OrgUserJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users',
-            'summary' => 'Create new admin user.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'OrgUserFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users',
-            'summary' => 'Create new admin using form post parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'username' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-
-        ],
-        'OrgUserResetPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/resetpw',
-            'summary' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-        ],
-        'OrgUserResetPasswordFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users/resetpw',
-            'summary' => 'Complete a user password reset.  Handles form POST response.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'recaptcha_challenge_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Challenge Field'
-                ],
-                'recaptcha_response_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Response Field'
-                ],
-            ]
-        ],
-        'AdminUserGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}',
-            'summary' => 'Returns the admin user details',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-            ]
-
-        ],
-        'AdminUserJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/users/{user_username_email_or_uuid}',
-            'summary' => 'Updates the admin user details.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-
-        ],
-        'AdminUserActivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/activate',
-            'summary' => 'Activates the admin user from link provided in email notification.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'confirm' => [
-                    'location' => 'uri',
-                    'type' => 'boolean',
-                    'required' => false,
-                    'description' => 'Send confirmation email'
-                ],
-            ]
-        ],
-        'AdminUserReactivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/reactivate',
-            'summary' => 'Request admin user reactivation.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ]
-            ]
-        ],
-        'AdminUserFeedGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/feed',
-            'summary' => 'Get admin user activity feed.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-            ]
-        ],
-        'AdminUserPasswordJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/users/{user_username_email_or_uuid}/password',
-            'summary' => 'Set admin user password.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'old_password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Old and new password'
-                ],
-                'new_password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Old and new password'
-                ],
-            ]
-        ],
-        'AdminUserResetPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/resetpw',
-            'summary' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ]
-            ]
-        ],
-        'AdminUserResetPasswordFormPost' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/resetpw',
-            'summary' => 'Complete a user password reset.  Handles form POST response.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Organization not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'recaptcha_challenge_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Challenge Field'
-                ],
-                'recaptcha_response_field' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Recaptcha Response Field'
-                ]
-            ]
-        ],
-        'AdminUserOrgsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs',
-            'summary' => 'Get organizations for admin user.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-
-            ]
-        ],
-        'AdminUserOrgsJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs',
-            'summary' => 'Create new organization for admin user using JSON payload.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'organization' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'AdminUserOrgsFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs',
-            'summary' => 'Create new organization for admin user using form parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'organization' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-
-            ],
-            'additionalParameters' => [
-                'location' => 'postField'
-            ]
-        ],
-        'AdminUserOrgPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs/{org_name_or_uuid}',
-            'summary' => 'Add admin users to organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'AdminUserOrgDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/management/users/{user_username_email_or_uuid}/orgs/{org_name_or_uuid}',
-            'summary' => 'Remove an admin user from organization.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid UUID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-                'user_username_email_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin username, email or uuid'
-                ],
-                'org_name_or_uuid' => [
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Organization name or uuid'
-                ],
-
-            ]
-        ]
-
-
-    ]
-
-];
-
-return [
-
-    'name' => 'Application',
-    'apiVersion' => '1.1',
-    'baseUrl' => 'http://baas-platform.com',
-    'description' => 'Client to Usergrid application service',
-    'operations' => [
-        'AuthPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/token',
-            'notes' => 'Get the app access token.  See the OAuth2 specification for details.',
-            'summary' => 'Get app access token',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'grant_type' => [
-                    'description' => 'Grant type.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'defaultValue' => 'password',
-                    'required' => true,
-                ],
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'username' => [
-                    'description' => 'Username (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'password' => [
-                    'description' => 'Password (for grant_type=password).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_secret' => [
-                    'description' => 'Client Secret (for grant_type=client_credentials).',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthPasswordPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/token',
-            'notes' => 'Get the app access token.  See the OAuth2 specification for details.',
-            'summary' => 'Get app access token',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'grant_type' => [
-                    'description' => 'Grant type.',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'defaultValue' => 'password',
-                    'required' => true,
-                ],
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'username' => [
-                    'description' => 'Username (for grant_type=password).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'password' => [
-                    'description' => 'Password (for grant_type=password).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID (for grant_type=client_credentials).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_secret' => [
-                    'description' => 'Client Secret (for grant_type=client_credentials).',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthorizeGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/authorize',
-            'notes' => 'Authorize the app client.  See the OAuth2 specification.',
-            'summary' => 'Authorize app client',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'response_type' => [
-                    'description' => 'Response type',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                    'default' => 'token'
-                ],
-                'redirect_uri' => [
-                    'description' => 'Redirect URI',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'scope' => [
-                    'description' => 'Access Token Scope.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'state' => [
-                    'description' => 'Client State.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'AuthorizePost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/authorize',
-            'notes' => 'Authorize the app client.  See the OAuth2 specification.',
-            'summary' => 'Authorize app client',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'response_type' => [
-                    'description' => 'Response type',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                    'default' => 'token'
-                ],
-                'redirect_uri' => [
-                    'description' => 'Redirect URI',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'client_id' => [
-                    'description' => 'Client ID',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'scope' => [
-                    'description' => 'Access Token Scope.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'state' => [
-                    'description' => 'Client State.',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'CredentialsGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/credentials',
-            'notes' => 'Get the app client credentials.',
-            'summary' => 'Get app client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-            ]
-        ],
-        'CredentialsPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/credentials',
-            'notes' => 'Generate new app client credentials',
-            'summary' => 'Generate app client credentials',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'access_token' => [
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'The OAuth2 access token'
-                ],
-            ]
-        ],
-        'UserJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users',
-            'notes' => 'Create new app user',
-            'summary' => 'Create new app user.  See Usergrid documentation for JSON format of body.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'username' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'json',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ]
-        ],
-        'UserFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users',
-            'notes' => 'Create new app user',
-            'summary' => 'Create new app user using form post parameters.',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'username' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Username'
-                ],
-                'name' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Name'
-                ],
-                'email' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Email'
-                ],
-                'password' => [
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                    'description' => 'Admin Password'
-                ]
-            ]
-        ],
-        'UserPasswordRestGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/resetpw',
-            'notes' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'summary' => 'Initiate a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserPasswordFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users/resetpw',
-            'notes' => 'Complete a user password reset.  Handles form POST response.',
-            'summary' => 'Complete a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'email' => [
-                    'description' => 'User Email',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_challenge_field' => [
-                    'description' => 'Recaptcha Challenge Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_response_field' => [
-                    'description' => 'Recaptcha Response Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'notes' => 'Returns the app user details.',
-            'summary' => 'Returns the app user details',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}',
-            'notes' => 'Updates the app user details.',
-            'summary' => 'Updates the app user details',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ],
-            'additionalParameters' => [
-                'location' => 'json'
-            ]
-        ],
-        'UserActivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/activate',
-            'notes' => 'Activates the app user from link provided in email notification.',
-            'summary' => 'Activates the app user',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'token' => [
-                    'description' => 'Activation Token (supplied via email)',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'confirm' => [
-                    'description' => 'Send confirmation email',
-                    'location' => 'query',
-                    'type' => 'boolean',
-                    'required' => true,
-                ],
-            ]
-        ],
-        'UserReactivateGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/reactivate',
-            'notes' => 'Request app user reactivation.',
-            'summary' => 'Reactivates the app user',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserFeedGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/feed',
-            'notes' => 'Get app user activity feed.',
-            'summary' => 'Get app user activity feed',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserPasswordJsonPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/password',
-            'notes' => 'Set app user password.  See Usergrid documentation for JSON format of body.',
-            'summary' => 'Set app user password',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ],
-            'additionalParameters' => [
-                "description" => "Old and new password",
-                'location' => 'json'
-            ]
-        ],
-        'UserResetPasswordGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/resetpw',
-            'notes' => 'Initiate a user password reset.  Returns browser-viewable HTML page.',
-            'summary' => 'Initiate a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'UserResetPasswordFormPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/users/{user_username_email_or_uuid}/resetpw',
-            'notes' => 'Complete a user password reset.  Handles form POST response.',
-            'summary' => 'Complete a user password reset',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "User not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'user_username_email_or_uuid' => [
-                    'description' => 'User username, email or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_challenge_field' => [
-                    'description' => 'Recaptcha Challenge Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'recaptcha_response_field' => [
-                    'description' => 'Recaptcha Response Field',
-                    'location' => 'postField',
-                    'type' => 'string',
-                    'required' => true,
-                ]
-            ]
-        ],
-        'EntityGet' => [
-            'httpMethod' => 'GET',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}',
-            'notes' => 'Query an app collection.',
-            'summary' => 'Query an app collection',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'ql' => [
-                    'description' => 'a query in the query language',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'reversed' => [
-                    'description' => 'return results in reverse order',
-                    'location' => 'query',
-                    'type' => 'boolean',
-                    'required' => false,
-                ],
-                'start' => [
-                    'description' => 'the first entity UUID to return',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'cursor' => [
-                    'description' => 'an encoded representation of the query position for paging',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ],
-                'limit' => [
-                    'description' => 'an encoded representation of the query position for paging',
-                    'location' => 'query',
-                    'type' => 'integer',
-                    'required' => false,
-                ],
-                'filter' => [
-                    'description' => 'a condition to filter on',
-                    'location' => 'query',
-                    'type' => 'integer',
-                    'required' => false,
-                ]
-            ]
-        ],
-        'EntityJsonPost' => [
-            'httpMethod' => 'POST',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}',
-            'notes' => 'Create new app entity.  See Usergrid documentation for JSON format of body.',
-            'summary' => 'Create new app entity',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ],
-            'additionalParameters' => [
-                "description" => "Entity data",
-                'location' => 'json'
-            ]
-        ],
-        'EntityPut' => [
-            'httpMethod' => 'PUT',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
-            'notes' => 'Update an app entity in a collection.',
-            'summary' => 'Update an app entity',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'entity_name_or_uuid' => [
-                    'description' => 'entity name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'collection' => [
-                    'description' => 'collection name (entity type)',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'access_token' => [
-                    'description' => 'The OAuth2 access token',
-                    'location' => 'query',
-                    'type' => 'string',
-                    'required' => false,
-                ]
-            ],
-            'additionalParameters' => [
-                "description" => "Entity data",
-                'location' => 'json'
-            ]
-        ],
-        'EntityDelete' => [
-            'httpMethod' => 'DELETE',
-            'uri' => '/apps/{app_name_or_uuid}/{collection}/{entity_name_or_uuid}',
-            'notes' => 'Delete an app entity.',
-            'summary' => 'Delete an app entity',
-            'responseClass' => 'Response',
-            'errorResponses' => [
-                [
-                    "reason" => "Invalid ID supplied",
-                    "code" => 400
-                ],
-                [
-                    "reason" => "Application not found",
-                    "code" => 404
-                ]
-            ],
-            'parameters' => [
-                'app_name_or_uuid' => [
-                    'description' => 'app name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-                ],
-                'entity_name_or_uuid' => [
-                    'description' => 'entity name or uuid',
-                    'location' => 'uri',
-                    'type' => 'string',
-                    'required' => true,
-              

<TRUNCATED>

[05/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/management.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/management.json b/sdks/php5/apache-usergrid/src/Manifests/management.json
deleted file mode 100644
index f90e588..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/management.json
+++ /dev/null
@@ -1,1905 +0,0 @@
-{
-    "basePath": "${basePath}",
-    "swaggerVersion": "1.1-SHAPSHOT.121026",
-    "apiVersion": "0.1",
-    "apis": [
-        {
-            "path": "/management/token",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_auth_password_get",
-                    "summary": "Get management access token",
-                    "notes": "Get the management access token.  See the OAuth2 specification for details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "grant_type",
-                            "dataType": "string",
-                            "description": "Grant type",
-                            "defaultValue": "password",
-                            "allowableValues": {
-                                "values": [
-                                    "password",
-                                    "client_credentials",
-                                    "refresh_token",
-                                    "authorization_code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Password (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_secret",
-                            "dataType": "string",
-                            "description": "Client Secret (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_auth_password_post",
-                    "summary": "Get management access token",
-                    "notes": "Get the management access token.  See the OAuth2 specification for details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "grant_type",
-                            "dataType": "string",
-                            "description": "Grant type",
-                            "defaultValue": "password",
-                            "allowableValues": {
-                                "values": [
-                                    "password",
-                                    "client_credentials",
-                                    "refresh_token",
-                                    "authorization_code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Password (for grant_type=password)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "client_secret",
-                            "dataType": "string",
-                            "description": "Client Secret (for grant_type=client_credentials)",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/authorize",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_authorize_get",
-                    "summary": "Authorize client",
-                    "notes": "Authorize the client.  See the OAuth2 specification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "response_type",
-                            "dataType": "string",
-                            "description": "Response type",
-                            "defaultValue": "token",
-                            "allowableValues": {
-                                "values": [
-                                    "token",
-                                    "code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "redirect_uri",
-                            "dataType": "string",
-                            "description": "Redirect URI",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "scope",
-                            "dataType": "string",
-                            "description": "Access Token Scope",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "state",
-                            "dataType": "string",
-                            "description": "Client State",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_authorize_post",
-                    "summary": "Authorize client",
-                    "notes": "Authorize the client.  See the OAuth2 specification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "response_type",
-                            "dataType": "string",
-                            "description": "Response type",
-                            "defaultValue": "token",
-                            "allowableValues": {
-                                "values": [
-                                    "token",
-                                    "code"
-                                ],
-                                "valueType": "LIST"
-                            },
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "client_id",
-                            "dataType": "string",
-                            "description": "Client ID",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "redirect_uri",
-                            "dataType": "string",
-                            "description": "Redirect URI",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "scope",
-                            "dataType": "string",
-                            "description": "Access Token Scope",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "state",
-                            "dataType": "string",
-                            "description": "Client State",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Username",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Password",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_json_post",
-                    "summary": "Create new organization",
-                    "notes": "Create new organization.  See Usergrid documentation for JSON format of body.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Organization to post",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_form_post",
-                    "summary": "Create new organization",
-                    "notes": "Create new organization using form post parameters.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "organization",
-                            "dataType": "string",
-                            "description": "Organization",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Admin Username",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "name",
-                            "dataType": "string",
-                            "description": "Admin Name",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "email",
-                            "dataType": "string",
-                            "description": "Admin Email",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Admin Password",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_get",
-                    "summary": "Find organization by name or UUID",
-                    "notes": "Returns the organization details",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/activate",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_activate_get",
-                    "summary": "Activates the organization",
-                    "notes": "Activates the organization from link provided in email notification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "token",
-                            "dataType": "string",
-                            "description": "Activation Token (supplied via email)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "confirm",
-                            "dataType": "boolean",
-                            "description": "Send confirmation email",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/reactivate",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_reactivate_get",
-                    "summary": "Reactivates the organization",
-                    "notes": "Request organization reactivation.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/feed",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_feed_get",
-                    "summary": "Get organization activity feed",
-                    "notes": "Get organization activity feed.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/credentials",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_credentials_get",
-                    "summary": "Get organization client credentials",
-                    "notes": "Get the organization client credentials.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_credentials_post",
-                    "summary": "Generate organization client credentials",
-                    "notes": "Generate new organization client credentials.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/users",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_users_get",
-                    "summary": "Get admin users for organization",
-                    "notes": "Get admin users for organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_users_json_post",
-                    "summary": "Create new admin user for organization",
-                    "notes": "Create new admin user for organization using JSON payload.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Admin user to create",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_users_form_post",
-                    "summary": "Create new admin user for organization",
-                    "notes": "Create new admin user for organization using form parameters.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Admin Username",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "name",
-                            "dataType": "string",
-                            "description": "Admin Name",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "email",
-                            "dataType": "string",
-                            "description": "Admin Email",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Admin Password",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/users/{user_username_email_or_uuid}",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "mgt_org_user_put",
-                    "summary": "Add admin users to organization",
-                    "notes": "Adds existing admin users for organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin user username, email, or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "DELETE",
-                    "nickname": "mgt_org_user_delete",
-                    "summary": "Remove admin user from organization",
-                    "notes": "Remove an admin user from organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin user username, email, or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/apps",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_apps_get",
-                    "summary": "Get apps for organization",
-                    "notes": "Get apps for organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_apps_json_post",
-                    "summary": "Create new applicationfor organization",
-                    "notes": "Create new application for organization using JSON payload.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Application to create",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_apps_form_post",
-                    "summary": "Create new application for organization",
-                    "notes": "Create new application for organization using form parameters.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "name",
-                            "dataType": "string",
-                            "description": "Application Name",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "DELETE",
-                    "nickname": "mgt_org_app_delete",
-                    "summary": "Delete an application in an organization",
-                    "notes": "Delete an application in an organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Application name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/orgs/{org_name_or_uuid}/apps/{app_name_or_uuid}/credentials",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_app_credentials_get",
-                    "summary": "Get application keys",
-                    "notes": "Get application keys.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Application name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_app_credentials_post",
-                    "summary": "Generate application keys",
-                    "notes": "Generate application keys.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "app_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Application name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Application not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_user_json_post",
-                    "summary": "Create new admin user",
-                    "notes": "Create new admin user.  See Usergrid documentation for JSON format of body.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Admin user to post",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_user_form_post",
-                    "summary": "Create new organization",
-                    "notes": "Create new admin using form post parameters.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "username",
-                            "dataType": "string",
-                            "description": "Admin Username",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "name",
-                            "dataType": "string",
-                            "description": "Admin Name",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "email",
-                            "dataType": "string",
-                            "description": "Admin Email",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "password",
-                            "dataType": "string",
-                            "description": "Admin Password",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/resetpw",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_org_user_reset_password_get",
-                    "summary": "Initiate a user password reset",
-                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_org_user_reset_password_form_post",
-                    "summary": "Complete a user password reset",
-                    "notes": "Complete a user password reset.  Handles form POST response.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "email",
-                            "dataType": "string",
-                            "description": "Admin Email",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "recaptcha_challenge_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Challenge Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "recaptcha_response_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Response Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_admin_user_get",
-                    "summary": "Returns the admin user details",
-                    "notes": "Returns the admin user details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "mgt_admin_user_json_put",
-                    "summary": "Updates the admin user details",
-                    "notes": "Updates the admin user details.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Admin user details",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/activate",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_admin_user_activate_get",
-                    "summary": "Activates the admin user",
-                    "notes": "Activates the admin user from link provided in email notification.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "token",
-                            "dataType": "string",
-                            "description": "Activation Token (supplied via email)",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "confirm",
-                            "dataType": "boolean",
-                            "description": "Send confirmation email",
-                            "required": false,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/reactivate",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_admin_user_reactivate_get",
-                    "summary": "Reactivates the admin user",
-                    "notes": "Request admin user reactivation.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/feed",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_admin_user_feed_get",
-                    "summary": "Get admin user activity feed",
-                    "notes": "Get admin user activity feed.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/password",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "mgt_admin_user_password_json_put",
-                    "summary": "Set admin user password",
-                    "notes": "Set admin user password.  See Usergrid documentation for JSON format of body.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Old and new password",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/resetpw",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_admin_user_reset_password_get",
-                    "summary": "Initiate a user password reset",
-                    "notes": "Initiate a user password reset.  Returns browser-viewable HTML page.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_admin_user_reset_password_form_post",
-                    "summary": "Complete a user password reset",
-                    "notes": "Complete a user password reset.  Handles form POST response.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "recaptcha_challenge_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Challenge Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "recaptcha_response_field",
-                            "dataType": "string",
-                            "description": "Recaptcha Response Field",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "Organization not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/orgs",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "GET",
-                    "nickname": "mgt_admin_user_orgs_get",
-                    "summary": "Get organizations for admin user",
-                    "notes": "Get organizations for admin user.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_admin_user_orgs_json_post",
-                    "summary": "Create new organization for admn user",
-                    "notes": "Create new organization for admin user using JSON payload.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "json",
-                            "dataType": "string",
-                            "description": "Organization to create",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "body"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "POST",
-                    "nickname": "mgt_admin_user_orgs_form_post",
-                    "summary": "Create new organization for admin user",
-                    "notes": "Create new organization for admin user using form parameters.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin username, email or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "organization",
-                            "dataType": "string",
-                            "description": "Organization name",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "post"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        },
-        {
-            "path": "/management/users/{user_username_email_or_uuid}/orgs/{org_name_or_uuid}",
-            "description": "Management",
-            "operations": [
-                {
-                    "httpMethod": "PUT",
-                    "nickname": "mgt_admin_user_org_put",
-                    "summary": "Add admin user to organization",
-                    "notes": "Add admin users to organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin user username, email, or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                },
-                {
-                    "httpMethod": "DELETE",
-                    "nickname": "mgt_admin_user_org_delete",
-                    "summary": "Remove admin user from organization",
-                    "notes": "Remove an admin user from organization.",
-                    "responseTypeInternal": "",
-                    "responseClass": "response",
-                    "parameters": [
-                        {
-                            "name": "access_token",
-                            "dataType": "string",
-                            "description": "The OAuth2 access token",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "query"
-                        },
-                        {
-                            "name": "user_username_email_or_uuid",
-                            "dataType": "string",
-                            "description": "Admin user username, email, or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        },
-                        {
-                            "name": "org_name_or_uuid",
-                            "dataType": "string",
-                            "description": "Organization name or uuid",
-                            "required": true,
-                            "allowMultiple": false,
-                            "paramType": "path"
-                        }
-                    ],
-                    "errorResponses": [
-                        {
-                            "reason": "Invalid ID supplied",
-                            "code": 400
-                        },
-                        {
-                            "reason": "User not found",
-                            "code": 404
-                        }
-                    ]
-                }
-            ]
-        }
-    ],
-    "models": {
-        "response": {
-            "properties": {
-                "id": {
-                    "type": "long"
-                },
-                "name": {
-                    "type": "string"
-                }
-            },
-            "id": "response"
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Manifests/resources.json
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Manifests/resources.json b/sdks/php5/apache-usergrid/src/Manifests/resources.json
deleted file mode 100644
index 8a6ffad..0000000
--- a/sdks/php5/apache-usergrid/src/Manifests/resources.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-    "basePath": "${basePath}",
-    "swaggerVersion": "1.1-SHAPSHOT.121026",
-    "apiVersion": "0.1",
-    "apis": [
-        {
-            "path": "/applications.{format}",
-            "description": "Applications"
-        },
-        {
-            "path": "/management.{format}",
-            "description": "Management"
-        }
-    ]
-}
\ No newline at end of file


[10/11] incubator-usergrid git commit: Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will t

Posted by ro...@apache.org.
Create Attributes . So now when I have a User entity I don't need to call the api a 2nd time for the device relationship I can get access the device property on the User model e.g.: $user->device; and the SDK will take care of the 2nd API call on my behalf.
Also added new response models so groups and roles and notifications and notifiers are all typed model response so they no longer return a entity model but a correctly typed models e.g.: Roles returns a roles model.
Also when asking a Response model for its entities property it now returns the correct model of the correct type: e.g. before this change when asking a user model for its entity you would get the base php collection model class now you get the Typed PHP Collection class so asking a User response for its entities property you get back a Users PHP collection class not BaseCollection class.
All notification endpoints are now mapped. You can send to  user , users, group, groups, device, devices can all be targeted for a push notiifcation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/9ffe2b0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/9ffe2b0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/9ffe2b0d

Branch: refs/heads/master
Commit: 9ffe2b0d4d468b7d7c28f20f50d7e40afbe96c41
Parents: b06a805
Author: Jason Kristian <ja...@apps4u.com.au>
Authored: Fri Nov 21 17:41:12 2014 +1000
Committer: Jason Kristian <ja...@apps4u.com.au>
Committed: Fri Nov 21 17:41:12 2014 +1000

----------------------------------------------------------------------
 .../Examples/attrubites/attributes.php          |  122 +
 .../Examples/collections/books.php              |   26 +-
 .../Examples/collections/data.php               |   40 +-
 .../Examples/collections/users.php              |   29 +-
 sdks/php5/apache-usergrid/Examples/examples.php |    5 +-
 .../Examples/management/management.php          |    4 +-
 .../Examples/messages/messages.php              |    2 +-
 .../Examples/notifications/notifications.php    |    2 +-
 .../Examples/notifications/notifiers.php        |    7 +-
 sdks/php5/apache-usergrid/README.md             |   28 +-
 sdks/php5/apache-usergrid/composer.lock         |  183 +-
 .../src/Api/Exception/BadRequestException.php   |    3 +-
 .../src/Api/Exception/NotFoundException.php     |    3 +-
 .../src/Api/Exception/ServerErrorException.php  |    3 +-
 .../src/Api/Exception/UnauthorizedException.php |    3 +-
 .../src/Api/Exception/UsergridException.php     |   15 +-
 .../src/Api/Models/BaseCollection.php           |   66 +-
 .../apache-usergrid/src/Api/Models/Device.php   |   15 +-
 .../apache-usergrid/src/Api/Models/Group.php    |   54 +
 .../src/Api/Models/GuzzleCommandTrait.php       |    9 +
 .../apache-usergrid/src/Api/Models/Notifier.php |   36 +
 .../src/Api/Models/Organization.php             |   22 -
 .../apache-usergrid/src/Api/Models/Receipt.php  |   36 +
 .../apache-usergrid/src/Api/Models/Role.php     |   54 +
 .../apache-usergrid/src/Api/Models/User.php     |   42 +-
 .../apache-usergrid/src/Api/QueryAggregator.php |    2 +-
 .../src/Api/ResourceIterator.php                |    2 +-
 sdks/php5/apache-usergrid/src/Api/Usergrid.php  |  319 +-
 .../Oauth2/GrantType/AuthorizationCode.php      |    4 +-
 .../Oauth2/GrantType/ClientCredentials.php      |    1 -
 .../GrantType/HWIOAuthBundleRefreshToken.php    |    2 +-
 .../Oauth2/GrantType/PasswordCredentials.php    |    5 +-
 .../Plugin/Oauth2/GrantType/RefreshToken.php    |    1 -
 .../src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php   |  104 +-
 .../Laravel/ApacheUsergridServiceProvider.php   |   40 +-
 .../src/Manifests/1.0.0/Errors.php              |   71 +-
 .../src/Manifests/1.0.1/Application.php         |    3 -
 .../src/Manifests/1.0.1/Custom.php              |    3 +-
 .../src/Manifests/1.0.1/Devices.php             |   88 +-
 .../src/Manifests/1.0.1/Groups.php              |   19 +-
 .../src/Manifests/1.0.1/Notifiers.php           |   39 +-
 .../src/Manifests/1.0.1/Roles.php               |   15 +-
 .../src/Manifests/1.0.1/Users.php               |    3 +-
 .../src/Manifests/Application.php               |  985 ----
 .../src/Manifests/Management.php                | 1381 ------
 .../apache-usergrid/src/Manifests/Manifest.php  |   23 -
 .../apache-usergrid/src/Manifests/Usergrid.php  | 4689 ------------------
 .../src/Manifests/applications.json             | 1262 -----
 .../src/Manifests/management.json               | 1905 -------
 .../src/Manifests/resources.json                |   15 -
 .../Manifests/swagger-json/applications.json    | 1262 +++++
 .../src/Manifests/swagger-json/management.json  | 1905 +++++++
 .../src/Manifests/swagger-json/resources.json   |   15 +
 .../src/Native/Facades/Usergrid.php             |   63 +-
 .../src/Native/UsergridBootstrapper.php         |   25 +-
 sdks/php5/apache-usergrid/src/config/config.php |   12 -
 .../tests/Api/ApplicationTest.php               |    2 +-
 .../apache-usergrid/tests/Api/AttributeTest.php |   59 +
 .../Api/Exception/BadRequestExceptionTest.php   |    4 +-
 .../Api/Exception/InvalidIdExceptionTest.php    |    4 +-
 .../Api/Exception/NotFoundExceptionTest.php     |    4 +-
 .../Api/Exception/ServerErrorExceptionTest.php  |    4 +-
 .../Api/Exception/UnauthorizedExceptionTest.php |    4 +-
 .../tests/Api/Filters/BooleanTest.php           |    2 +-
 .../tests/Api/Filters/DateTest.php              |    2 +-
 .../tests/Api/ManagementTest.php                |    2 +-
 .../tests/Api/QueryAggregatorTest.php           |    2 -
 .../apache-usergrid/tests/Api/UsergridTest.php  |    8 +-
 .../tests/Laravel/Facades/UsergridTest.php      |    2 +-
 sdks/php5/apache-usergrid/tests/bootstrap.php   |   14 +-
 70 files changed, 4388 insertions(+), 10797 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/attrubites/attributes.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/attrubites/attributes.php b/sdks/php5/apache-usergrid/Examples/attrubites/attributes.php
new file mode 100644
index 0000000..0f4f180
--- /dev/null
+++ b/sdks/php5/apache-usergrid/Examples/attrubites/attributes.php
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+include('vendor/autoload.php');
+
+include('data.php');
+
+use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
+
+/** The PHP SDK returns all responses as Illuminate\Support\Collection subclasses so the word collection below is php collection class not usergrid collection */
+
+/** Source your config from file I'm using array here just for ease of use.
+ * When using Laravel Framework publish the package config file when using with
+ * other modern PHP frameworks just use their default config system .
+ */
+$config = [
+    'usergrid' => [
+        'url' => 'https://api.usergrid.com',
+        'version' => '1.0.1', // set manifest version
+        'orgName' => '',
+        'appName' => '',
+        'manifestPath' => null, //leave as default or change to your own custom folder
+        'clientId' => '',
+        'clientSecret' => '',
+        'username' => '',
+        'password' => '',
+        /**
+         * The Auth Type setting is the Oauth 2 end point you want to get the OAuth 2
+         * Token from.  You have two options here one is 'application' the other is 'organization'
+         *
+         *  organization will get the the token from http://example.com/management using  client_credentials or password grant type
+         *  application will get the token from http://example.com/managment/org_name/app_name using client_credentials or password grant type
+         */
+        'auth_type' => 'organization',
+        /** The Grant Type to use
+         *
+         * This has to be set to one of the 2 grant types that Apache Usergrid
+         * supports which at the moment is client_credentials or password but at
+         * 2 level organization or application
+         */
+        'grant_type' => 'client_credentials',
+        /**
+         * if you want to manage your own auth flow by calling the token api and setting the token your self just set this to false
+         * */
+        'enable_oauth2_plugin' => true
+    ]
+];
+
+$bootstrapper = new UsergridBootstrapper($config);
+Usergrid::instance($bootstrapper);
+
+
+/**
+ * Attributes are a new feature that make getting related models easy as accessing a property on a model object
+ * The way relationships work before this feature it required you to call the getRelationship method on the application
+ * service which is still available, so for example you would first get the user then once you had the user you create a
+ * array that contained the uuid of the user the related collection name and the relationship name then call the api passing in the
+ * array but for the default relationships we already have the data that we need to make the api call so that is what
+ * I've done.
+ * <pre>
+ * <?php
+ *  $user = Usergrid::users()->findById(['uuid' => '1234abcd']) ;
+ *  $device = $user->device;
+ * ?>
+ * </pre>
+ *  That's all you need to do to get a device for the user this only works when you have one user in your user collection
+ *  if you call this with more then one user in your user collection it will return the device for the first user in the
+ *  collection.
+ *
+ */
+
+$user = Usergrid::users()->findById(['uuid' => '1234abcd']);
+
+echo "device" . PHP_EOL;
+var_dump($user->device);
+var_dump('=================================================================');
+
+echo "roles" . PHP_EOL;
+var_dump($user->roles);
+var_dump('=================================================================');
+
+echo "groups" . PHP_EOL;
+var_dump($user->groups);
+var_dump('=================================================================');
+
+echo "connections" . PHP_EOL;
+var_dump($user->connections);
+var_dump('=================================================================');
+
+
+var_dump('=================================================================');
+echo "GROUPS" . PHP_EOL;
+var_dump('=================================================================');
+
+
+$group = Usergrid::groups()->findById(['uuid' => '121212']);
+
+
+echo "roles" . PHP_EOL;
+var_dump($group->roles);
+var_dump('=================================================================');
+
+echo "groups" . PHP_EOL;
+var_dump($group->users);
+var_dump('=================================================================');
+
+echo "connections" . PHP_EOL;
+var_dump($group->connections);
+var_dump('=================================================================');
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/collections/books.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/collections/books.php b/sdks/php5/apache-usergrid/Examples/collections/books.php
index e2d31ae..034046e 100644
--- a/sdks/php5/apache-usergrid/Examples/collections/books.php
+++ b/sdks/php5/apache-usergrid/Examples/collections/books.php
@@ -17,9 +17,9 @@ include('vendor/autoload.php');
 
 include('data.php');
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
-use Apache\Usergrid\Native\Facades\Usergrid;
 use Apache\Usergrid\Api\Filters\Date;
+use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 /** The PHP SDK returns all responses as Illuminate\Support\Collection subclasses so the word collection below is php collection class not usergrid collection */
 
@@ -64,7 +64,7 @@ $bootstrapper = new UsergridBootstrapper($config);
 Usergrid::instance($bootstrapper);
 
 
-foreach($books_data as $book){
+foreach ($books_data as $book) {
     Usergrid::application()->EntityJsonPost($book);
 }
 
@@ -116,15 +116,15 @@ $caching_iterator = $books->entities->getCachingIterator();
 /// Here are some more Methods that you can call on your responses .. To get the most out of this SDK please look at the Illuminate\Support\Collection class
 /// which is the supper class of Apache/Usergrid/Api/Models/BaseCollection class
 /**
-    $books->unique();
-    $books->transform();
-    $books->take();
-    $books->splice();
-    $books->sum($callback );
-    $books->values();
-    $books->sortByDesc($callback);
-    $books->sortBy();
-    $books->shuffle();
-    $books->chunk();
+ * $books->unique();
+ * $books->transform();
+ * $books->take();
+ * $books->splice();
+ * $books->sum($callback );
+ * $books->values();
+ * $books->sortByDesc($callback);
+ * $books->sortBy();
+ * $books->shuffle();
+ * $books->chunk();
  */
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/collections/data.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/collections/data.php b/sdks/php5/apache-usergrid/Examples/collections/data.php
index a926dbe..e9ca805 100644
--- a/sdks/php5/apache-usergrid/Examples/collections/data.php
+++ b/sdks/php5/apache-usergrid/Examples/collections/data.php
@@ -15,24 +15,24 @@
  */
 
 $books_data = [
-['collection' => 'books', 'title' => 'book one', 'name' => 'book_one', 'author' => 'author 1'],
-['collection' => 'books', 'title' => 'book two', 'name' => 'book_two', 'author' => 'author 2'],
-['collection' => 'books', 'title' => 'book three', 'name' => 'book_three', 'author' => 'author 3'],
-['collection' => 'books', 'title' => 'book four', 'name' => 'book_four', 'author' => 'author 4'],
-['collection' => 'books', 'title' => 'book five', 'name' => 'book_five', 'author' => 'author 5'],
-['collection' => 'books', 'title' => 'book six', 'name' => 'book_six', 'author' => 'author 6'],
-['collection' => 'books', 'title' => 'book seven', 'name' => 'book_seven', 'author' => 'author 7'],
-['collection' => 'books', 'title' => 'book eight', 'name' => 'book_eight', 'author' => 'author 8'],
-['collection' => 'books', 'title' => 'book nine', 'name' => 'book_nine', 'author' => 'author 9'],
-['collection' => 'books', 'title' => 'book ten', 'name' => 'book_ten', 'author' => 'author 10'],
-['collection' => 'books', 'title' => 'book eleven', 'name' => 'book_eleven', 'author' => 'author 11'],
-['collection' => 'books', 'title' => 'book twelve', 'name' => 'book_twelve', 'author' => 'author 12'],
-['collection' => 'books', 'title' => 'book thirteen', 'name' => 'book_thirteen', 'author' => 'author 13'],
-['collection' => 'books', 'title' => 'book fourteen', 'name' => 'book_fourteen', 'author' => 'author 14'],
-['collection' => 'books', 'title' => 'book fifteen', 'name' => 'book_fifteen', 'author' => 'author 15'],
-['collection' => 'books', 'title' => 'book sixteen', 'name' => 'book_sixteen', 'author' => 'author 16'],
-['collection' => 'books', 'title' => 'book seventeen', 'name' => 'book_seventeen', 'author' => 'author 17'],
-['collection' => 'books', 'title' => 'book eighteen', 'name' => 'book_eighteen', 'author' => 'author 18'],
-['collection' => 'books', 'title' => 'book nineteen', 'name' => 'book_nineteen', 'author' => 'author 19'],
-['collection' => 'books', 'title' => 'book twenty', 'name' => 'book_twenty', 'author' => 'author 20'],
+    ['collection' => 'books', 'title' => 'book one', 'name' => 'book_one', 'author' => 'author 1'],
+    ['collection' => 'books', 'title' => 'book two', 'name' => 'book_two', 'author' => 'author 2'],
+    ['collection' => 'books', 'title' => 'book three', 'name' => 'book_three', 'author' => 'author 3'],
+    ['collection' => 'books', 'title' => 'book four', 'name' => 'book_four', 'author' => 'author 4'],
+    ['collection' => 'books', 'title' => 'book five', 'name' => 'book_five', 'author' => 'author 5'],
+    ['collection' => 'books', 'title' => 'book six', 'name' => 'book_six', 'author' => 'author 6'],
+    ['collection' => 'books', 'title' => 'book seven', 'name' => 'book_seven', 'author' => 'author 7'],
+    ['collection' => 'books', 'title' => 'book eight', 'name' => 'book_eight', 'author' => 'author 8'],
+    ['collection' => 'books', 'title' => 'book nine', 'name' => 'book_nine', 'author' => 'author 9'],
+    ['collection' => 'books', 'title' => 'book ten', 'name' => 'book_ten', 'author' => 'author 10'],
+    ['collection' => 'books', 'title' => 'book eleven', 'name' => 'book_eleven', 'author' => 'author 11'],
+    ['collection' => 'books', 'title' => 'book twelve', 'name' => 'book_twelve', 'author' => 'author 12'],
+    ['collection' => 'books', 'title' => 'book thirteen', 'name' => 'book_thirteen', 'author' => 'author 13'],
+    ['collection' => 'books', 'title' => 'book fourteen', 'name' => 'book_fourteen', 'author' => 'author 14'],
+    ['collection' => 'books', 'title' => 'book fifteen', 'name' => 'book_fifteen', 'author' => 'author 15'],
+    ['collection' => 'books', 'title' => 'book sixteen', 'name' => 'book_sixteen', 'author' => 'author 16'],
+    ['collection' => 'books', 'title' => 'book seventeen', 'name' => 'book_seventeen', 'author' => 'author 17'],
+    ['collection' => 'books', 'title' => 'book eighteen', 'name' => 'book_eighteen', 'author' => 'author 18'],
+    ['collection' => 'books', 'title' => 'book nineteen', 'name' => 'book_nineteen', 'author' => 'author 19'],
+    ['collection' => 'books', 'title' => 'book twenty', 'name' => 'book_twenty', 'author' => 'author 20'],
 ];

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/collections/users.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/collections/users.php b/sdks/php5/apache-usergrid/Examples/collections/users.php
index 9bcea83..da67ac3 100644
--- a/sdks/php5/apache-usergrid/Examples/collections/users.php
+++ b/sdks/php5/apache-usergrid/Examples/collections/users.php
@@ -17,8 +17,8 @@ include('vendor/autoload.php');
 
 include('data.php');
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
 use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 /** The PHP SDK returns all responses as Illuminate\Support\Collection subclasses so the word collection below is php collection class not usergrid collection */
 
@@ -68,12 +68,12 @@ $users_paged = Usergrid::users()->all();
 var_dump(get_class($users_paged->entities));
 
 //// get user 50 page size
-$users_paged_50= Usergrid::users()->all(['limit' => 50]);
+$users_paged_50 = Usergrid::users()->all(['limit' => 50]);
 var_dump($users_paged_50->entities);
 
 // get all users
-$all_users  = Usergrid::usersIterator();
-foreach($all_users as $user) {
+$all_users = Usergrid::usersIterator();
+foreach ($all_users as $user) {
 //    var_dump($user['uuid']); // as array
 }
 
@@ -95,7 +95,26 @@ echo $user_addr->entities->fetch('adr.city');
 $users_nested = Usergrid::users()->all();
 var_dump($users_nested->entities->fetch('metadata.collections.devices')->first());
 
+// The response that is returned is a PHP collection that has a Zero indexed $item property.
+// but as its a collection class it has some methods that can help you find what you need and one
+// of my fav feature is changing the Zero indexed collection to be indexed by the entity uuid or name or any other property.
+$users_by = Usergrid::users()->all();
+
+$users_by_uuid = $users_by->entities->keyBy('uuid');
+var_dump($users_by_uuid->get('add uuid of user'));
+
+$users_by_name = $users_by->entities->keyBy('username');
+var_dump($users_by_name->get('jasonk'));
+
+$users_by_email = $users_by->entities->keyBy('email');
+var_dump($users_by_email->get('jasonk@apps4u.com.au'));
+
+// sort by key
+$sorted_by_email = $users_by->sortBy('username');
+var_dump($sorted_by_email);
+
+
 // add user to group
 //$user_to_group = Usergrid::groups()->addUser(['entity_name_or_uuid' => 'group_name_or_uuid', 'user_name_or_uuid' => 'user name or uuid']);
 
-//$user_remove_group = Usergrid::groups()->removeUser(['entity_name_or_uuid' => 'group_name_or_uuid', 'user_name_or_uuid' => 'user name or uuid']);
+//$user_remove_group = Usergrid::groups()->removeUser(['entity_name_or_uuid' => 'group_name_or_uuid', 'user_name_or_uuid' => 'user name or uuid']);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/examples.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/examples.php b/sdks/php5/apache-usergrid/Examples/examples.php
index b896ec7..0348610 100644
--- a/sdks/php5/apache-usergrid/Examples/examples.php
+++ b/sdks/php5/apache-usergrid/Examples/examples.php
@@ -17,8 +17,8 @@
 include('vendor/autoload.php');
 
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
 use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 /** Source your config from file I'm using array here just for ease of use.
  * When using Laravel Framework publish the package config file when using with
@@ -213,9 +213,8 @@ $fEdited_entity = Usergrid::applications()->EntityPut($fCustom_entity_edit);
 //var_dump($fEdited_entity->entities);
 
 
-
 /** Relationships */
-$related_data =[
+$related_data = [
     'collection' => 'required',
     'entity_id' => 'required',
     'relationship' => 'required',

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/management/management.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/management/management.php b/sdks/php5/apache-usergrid/Examples/management/management.php
index 5808a6c..cfc5d61 100644
--- a/sdks/php5/apache-usergrid/Examples/management/management.php
+++ b/sdks/php5/apache-usergrid/Examples/management/management.php
@@ -16,8 +16,8 @@
 include('vendor/autoload.php');
 
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
 use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 /**
  * When working with the management api any calls that require a application to target will use the default app name set in the config but some times you may want to
@@ -74,7 +74,7 @@ $activity_feed = Usergrid::management()->OrgFeedGet();
 $organization_details = Usergrid::management()->OrgGet();
 
 //get organizations application
-$organization_applications  = Usergrid::management()->OrgAppsGet();
+$organization_applications = Usergrid::management()->OrgAppsGet();
 
 //create application
 $app = ['name' => 'app name -- required'];

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/messages/messages.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/messages/messages.php b/sdks/php5/apache-usergrid/Examples/messages/messages.php
index 3cac534..0eded4a 100644
--- a/sdks/php5/apache-usergrid/Examples/messages/messages.php
+++ b/sdks/php5/apache-usergrid/Examples/messages/messages.php
@@ -17,8 +17,8 @@ include('vendor/autoload.php');
 
 include('data.php');
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
 use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 
 /** Source your config from file I'm using array here just for ease of use.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/notifications/notifications.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/notifications/notifications.php b/sdks/php5/apache-usergrid/Examples/notifications/notifications.php
index c484d57..1a76ef8 100644
--- a/sdks/php5/apache-usergrid/Examples/notifications/notifications.php
+++ b/sdks/php5/apache-usergrid/Examples/notifications/notifications.php
@@ -17,8 +17,8 @@ include('vendor/autoload.php');
 
 include('data.php');
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
 use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 
 /** Source your config from file I'm using array here just for ease of use.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/Examples/notifications/notifiers.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/Examples/notifications/notifiers.php b/sdks/php5/apache-usergrid/Examples/notifications/notifiers.php
index 89fe48a..e32f6f4 100644
--- a/sdks/php5/apache-usergrid/Examples/notifications/notifiers.php
+++ b/sdks/php5/apache-usergrid/Examples/notifications/notifiers.php
@@ -16,8 +16,8 @@
 include('vendor/autoload.php');
 include('data.php');
 
-use Apache\Usergrid\Native\UsergridBootstrapper;
 use Apache\Usergrid\Native\Facades\Usergrid;
+use Apache\Usergrid\Native\UsergridBootstrapper;
 
 
 /** Source your config from file I'm using array here just for ease of use.
@@ -54,7 +54,8 @@ $config = [
          * if you want to manage your own auth flow by calling the token api and setting the token your self just set this to false
          * */
         'enable_oauth2_plugin' => true
-    ]];
+    ]
+];
 
 // You need to add a push cert to this folder and pass the path in the apple_notifier_data array
 
@@ -65,7 +66,7 @@ Usergrid::instance($bootstrapper);
 $apple_notifier_data = [
     'name' => 'apple_test',
     'environment' => 'development',
-    'p12Certificate' =>  @'pushtest_dev.p12'
+    'p12Certificate' => @'pushtest_dev.p12'
 ];
 $apple_notifier = Usergrid::notifiers()->createApple($apple_notifier_data);
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/README.md
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/README.md b/sdks/php5/apache-usergrid/README.md
index 54d4e8f..567f3f1 100644
--- a/sdks/php5/apache-usergrid/README.md
+++ b/sdks/php5/apache-usergrid/README.md
@@ -66,7 +66,7 @@ or native use just create a config file
 
 ```
      $bootstrap = new UsergridBootstrapper($config);
-     Usergrid::instance($boostraper);
+     Usergrid::instance($bootstrap);
      $res = Usergrid::application()->EntityGet(['collection' => 'shops']);
 ```
 
@@ -151,6 +151,30 @@ The SDK will check each response to see if their is a cursor and if there is it
     // this will have all devices. 
     }
 ```
+# NEW feature - Attributes
+### Attributes (relationships) 
+The Usergrid PHP SDK has api call on the application service to get a related models but it requires that you make two api calls one to get the entity then a 2nd to get the relationship eg:
+
+```
+$users = Usergrid::users()->all(['limit' => 1]);
+$user_uuid = $users-entities->fetch('uuid');
+$data = [ 'collection' => 'users', 'entity_id' => $user_uuid, 'relationship' => 'devices'];
+$device = Usergrid::application()->GetRelationship($data);
+```
+
+Now the data we require for you to make the relationship api call is already in the SDK we should not force you to make a 2nd api call and give us data we already have. so now you don't need to any more. Just access the default relationships as a property on your response Model.
+
+```
+    $users = Usergrid::users()->all();
+    $user = $users->entities->get(0);
+    $device = $user->device;
+```
+
+that's it, So the take away point is let the SDK do the work for you and if you create custom service descriptors and model classes for your custom collection then look at the User response
+model class at it's deviceAttribute method to see how you can either add it to your custom collections or add custom relationship attributes to the default collections. Remember the SDK is designed
+for you to be able to extend the Guzzle service descriptors (manifest files).
+
+
 ### HTTP headers and UserAgents
 
  When working with http clients & server system you may want to sett additional HTTP Headers. Ive have made this easy as well on the Usergrid class you 
@@ -192,4 +216,4 @@ of it as a helper as some times it good to have access to both world server side
 * Writing tests
 * Code review
 * Code
-* Manifest files
\ No newline at end of file
+* Manifest files

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/composer.lock
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/composer.lock b/sdks/php5/apache-usergrid/composer.lock
index 1dd33b1..3060421 100644
--- a/sdks/php5/apache-usergrid/composer.lock
+++ b/sdks/php5/apache-usergrid/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "b5596d79dd2dd146c428d2e33431ed20",
+    "hash": "f77c404fc8b03f21424d391e5451af8a",
     "packages": [
         {
             "name": "guzzle/guzzle",
@@ -12,12 +12,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle3.git",
-                "reference": "3c0ca2255751631f1dd64eb16bbe3b9440258297"
+                "reference": "5e6fb7097efac7180bd75006079144025255eb63"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/3c0ca2255751631f1dd64eb16bbe3b9440258297",
-                "reference": "3c0ca2255751631f1dd64eb16bbe3b9440258297",
+                "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/5e6fb7097efac7180bd75006079144025255eb63",
+                "reference": "5e6fb7097efac7180bd75006079144025255eb63",
                 "shasum": ""
             },
             "require": {
@@ -96,7 +96,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2014-10-15 19:36:56"
+            "time": "2014-10-29 23:08:23"
         },
         {
             "name": "illuminate/support",
@@ -194,17 +194,17 @@
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "dev-master",
+            "version": "2.7.x-dev",
             "target-dir": "Symfony/Component/EventDispatcher",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/EventDispatcher.git",
-                "reference": "e133748fd9165e24f8e9498ef5862f8bd37004e5"
+                "reference": "8e5829263631e686bf4d1254b02411263b8fa228"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/e133748fd9165e24f8e9498ef5862f8bd37004e5",
-                "reference": "e133748fd9165e24f8e9498ef5862f8bd37004e5",
+                "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8e5829263631e686bf4d1254b02411263b8fa228",
+                "reference": "8e5829263631e686bf4d1254b02411263b8fa228",
                 "shasum": ""
             },
             "require": {
@@ -224,7 +224,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.6-dev"
+                    "dev-master": "2.7-dev"
                 }
             },
             "autoload": {
@@ -248,7 +248,7 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "http://symfony.com",
-            "time": "2014-10-04 06:08:58"
+            "time": "2014-11-10 18:00:54"
         }
     ],
     "packages-dev": [
@@ -312,12 +312,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/padraic/mockery.git",
-                "reference": "8e567de2249a8f7eb8051a855b9d0a6472d38c8e"
+                "reference": "30eb319efcf2ebe6b4529be51f60df78340bdbb5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/padraic/mockery/zipball/8e567de2249a8f7eb8051a855b9d0a6472d38c8e",
-                "reference": "8e567de2249a8f7eb8051a855b9d0a6472d38c8e",
+                "url": "https://api.github.com/repos/padraic/mockery/zipball/30eb319efcf2ebe6b4529be51f60df78340bdbb5",
+                "reference": "30eb319efcf2ebe6b4529be51f60df78340bdbb5",
                 "shasum": ""
             },
             "require": {
@@ -370,7 +370,115 @@
                 "test double",
                 "testing"
             ],
-            "time": "2014-10-16 09:15:15"
+            "time": "2014-11-10 08:31:38"
+        },
+        {
+            "name": "phpdocumentor/reflection-docblock",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+                "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/fd0ac2007401505fb596fdfb859ec4e103d69e55",
+                "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~4.0"
+            },
+            "suggest": {
+                "dflydev/markdown": "~1.0",
+                "erusev/parsedown": "~1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "phpDocumentor": [
+                        "src/"
+                    ]
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mike van Riel",
+                    "email": "mike.vanriel@naenius.com"
+                }
+            ],
+            "time": "2014-09-02 14:26:20"
+        },
+        {
+            "name": "phpspec/prophecy",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/phpspec/prophecy.git",
+                "reference": "2bbc78d0b4b1ce8049479395ba950d4b13f21d94"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/2bbc78d0b4b1ce8049479395ba950d4b13f21d94",
+                "reference": "2bbc78d0b4b1ce8049479395ba950d4b13f21d94",
+                "shasum": ""
+            },
+            "require": {
+                "doctrine/instantiator": "~1.0,>=1.0.2",
+                "phpdocumentor/reflection-docblock": "~2.0"
+            },
+            "require-dev": {
+                "phpspec/phpspec": "~2.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Prophecy\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Konstantin Kudryashov",
+                    "email": "ever.zet@gmail.com",
+                    "homepage": "http://everzet.com"
+                },
+                {
+                    "name": "Marcello Duarte",
+                    "email": "marcello.duarte@gmail.com"
+                }
+            ],
+            "description": "Highly opinionated mocking framework for PHP 5.3+",
+            "homepage": "http://phpspec.org",
+            "keywords": [
+                "Double",
+                "Dummy",
+                "fake",
+                "mock",
+                "spy",
+                "stub"
+            ],
+            "time": "2014-10-05 19:43:51"
         },
         {
             "name": "phpunit/php-code-coverage",
@@ -378,12 +486,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "28d21b57c189cb72829056353de603c4d4da55a0"
+                "reference": "21b9006b7ceb7e1cb0b705615af31f67c8cd1692"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/28d21b57c189cb72829056353de603c4d4da55a0",
-                "reference": "28d21b57c189cb72829056353de603c4d4da55a0",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/21b9006b7ceb7e1cb0b705615af31f67c8cd1692",
+                "reference": "21b9006b7ceb7e1cb0b705615af31f67c8cd1692",
                 "shasum": ""
             },
             "require": {
@@ -432,7 +540,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2014-10-05 10:46:54"
+            "time": "2014-11-11 14:18:30"
         },
         {
             "name": "phpunit/php-file-iterator",
@@ -622,12 +730,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "628bcfbbefa0e47dbb7d773021338590bd7586ee"
+                "reference": "247756f342dfb0a319f8985ef06f21a00d98b59c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/628bcfbbefa0e47dbb7d773021338590bd7586ee",
-                "reference": "628bcfbbefa0e47dbb7d773021338590bd7586ee",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/247756f342dfb0a319f8985ef06f21a00d98b59c",
+                "reference": "247756f342dfb0a319f8985ef06f21a00d98b59c",
                 "shasum": ""
             },
             "require": {
@@ -637,6 +745,7 @@
                 "ext-reflection": "*",
                 "ext-spl": "*",
                 "php": ">=5.3.3",
+                "phpspec/prophecy": "~1.2",
                 "phpunit/php-code-coverage": "3.0.*@dev",
                 "phpunit/php-file-iterator": "~1.3.2",
                 "phpunit/php-text-template": "~1.2",
@@ -685,7 +794,7 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2014-10-22 11:54:43"
+            "time": "2014-11-06 08:43:29"
         },
         {
             "name": "phpunit/phpunit-mock-objects",
@@ -812,12 +921,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/diff.git",
-                "reference": "92d423df43b160006907ea4297b916fdf00415d8"
+                "reference": "3e22c89be2e1cddf7db89699cb23a9159df12e0c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/92d423df43b160006907ea4297b916fdf00415d8",
-                "reference": "92d423df43b160006907ea4297b916fdf00415d8",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e22c89be2e1cddf7db89699cb23a9159df12e0c",
+                "reference": "3e22c89be2e1cddf7db89699cb23a9159df12e0c",
                 "shasum": ""
             },
             "require": {
@@ -856,7 +965,7 @@
             "keywords": [
                 "diff"
             ],
-            "time": "2014-10-19 13:19:30"
+            "time": "2014-11-05 15:28:21"
         },
         {
             "name": "sebastian/environment",
@@ -864,12 +973,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d"
+                "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0d9bf79554d2a999da194a60416c15cf461eb67d",
-                "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7",
+                "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7",
                 "shasum": ""
             },
             "require": {
@@ -906,7 +1015,7 @@
                 "environment",
                 "hhvm"
             ],
-            "time": "2014-10-22 06:38:05"
+            "time": "2014-10-25 08:00:45"
         },
         {
             "name": "sebastian/exporter",
@@ -1061,17 +1170,17 @@
         },
         {
             "name": "symfony/yaml",
-            "version": "dev-master",
+            "version": "2.7.x-dev",
             "target-dir": "Symfony/Component/Yaml",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/Yaml.git",
-                "reference": "499f7d7aa96747ad97940089bd7a1fb24ad8182a"
+                "reference": "6165f4b5224c22de2873deb6a3a4e622044f0705"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Yaml/zipball/499f7d7aa96747ad97940089bd7a1fb24ad8182a",
-                "reference": "499f7d7aa96747ad97940089bd7a1fb24ad8182a",
+                "url": "https://api.github.com/repos/symfony/Yaml/zipball/6165f4b5224c22de2873deb6a3a4e622044f0705",
+                "reference": "6165f4b5224c22de2873deb6a3a4e622044f0705",
                 "shasum": ""
             },
             "require": {
@@ -1080,7 +1189,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.6-dev"
+                    "dev-master": "2.7-dev"
                 }
             },
             "autoload": {
@@ -1104,7 +1213,7 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "http://symfony.com",
-            "time": "2014-10-05 13:53:50"
+            "time": "2014-11-10 18:00:54"
         }
     ],
     "aliases": [],

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Exception/BadRequestException.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Exception/BadRequestException.php b/sdks/php5/apache-usergrid/src/Api/Exception/BadRequestException.php
index c6a2453..1e63c40 100644
--- a/sdks/php5/apache-usergrid/src/Api/Exception/BadRequestException.php
+++ b/sdks/php5/apache-usergrid/src/Api/Exception/BadRequestException.php
@@ -28,6 +28,7 @@ namespace Apache\Usergrid\Api\Exception;
  * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
  * @link       http://baas-platform.com
  */
-class BadRequestException extends UsergridException{
+class BadRequestException extends UsergridException
+{
 
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Exception/NotFoundException.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Exception/NotFoundException.php b/sdks/php5/apache-usergrid/src/Api/Exception/NotFoundException.php
index a13277b..c371538 100644
--- a/sdks/php5/apache-usergrid/src/Api/Exception/NotFoundException.php
+++ b/sdks/php5/apache-usergrid/src/Api/Exception/NotFoundException.php
@@ -27,6 +27,7 @@ namespace Apache\Usergrid\Api\Exception;
  * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
  * @link       http://baas-platform.com
  */
-class NotFoundException extends UsergridException {
+class NotFoundException extends UsergridException
+{
 
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Exception/ServerErrorException.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Exception/ServerErrorException.php b/sdks/php5/apache-usergrid/src/Api/Exception/ServerErrorException.php
index 2525e12..2286133 100644
--- a/sdks/php5/apache-usergrid/src/Api/Exception/ServerErrorException.php
+++ b/sdks/php5/apache-usergrid/src/Api/Exception/ServerErrorException.php
@@ -27,6 +27,7 @@ namespace Apache\Usergrid\Api\Exception;
  * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
  * @link       http://baas-platform.com
  */
-class ServerErrorException extends UsergridException {
+class ServerErrorException extends UsergridException
+{
 
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Exception/UnauthorizedException.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Exception/UnauthorizedException.php b/sdks/php5/apache-usergrid/src/Api/Exception/UnauthorizedException.php
index d7d3694..3e3ae41 100644
--- a/sdks/php5/apache-usergrid/src/Api/Exception/UnauthorizedException.php
+++ b/sdks/php5/apache-usergrid/src/Api/Exception/UnauthorizedException.php
@@ -28,6 +28,7 @@ namespace Apache\Usergrid\Api\Exception;
  * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
  * @link       http://baas-platform.com
  */
-class UnauthorizedException extends UsergridException {
+class UnauthorizedException extends UsergridException
+{
 
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Exception/UsergridException.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Exception/UsergridException.php b/sdks/php5/apache-usergrid/src/Api/Exception/UsergridException.php
index 4c6057f..8aedb03 100644
--- a/sdks/php5/apache-usergrid/src/Api/Exception/UsergridException.php
+++ b/sdks/php5/apache-usergrid/src/Api/Exception/UsergridException.php
@@ -68,14 +68,11 @@ class UsergridException extends Exception implements ErrorResponseExceptionInter
 
         $message = array_get($errors, 'error.message', null);
 
-        $class = '\\Apache\\Usergrid\\Api\\Exception\\'.studly_case($type).'Exception';
+        $class = '\\Apache\\Usergrid\\Api\\Exception\\' . studly_case($type) . 'Exception';
 
-        if (class_exists($class))
-        {
+        if (class_exists($class)) {
             $exception = new $class($message, $response->getStatusCode());
-        }
-        else
-        {
+        } else {
             $exception = new static($message, $response->getStatusCode());
         }
 
@@ -101,7 +98,7 @@ class UsergridException extends Exception implements ErrorResponseExceptionInter
     /**
      * Sets the Guzzle request.
      *
-     * @param  \Guzzle\Http\Message\Request  $request
+     * @param  \Guzzle\Http\Message\Request $request
      * @return void
      */
     public function setRequest(Request $request)
@@ -122,7 +119,7 @@ class UsergridException extends Exception implements ErrorResponseExceptionInter
     /**
      * Sets the Guzzle response.
      *
-     * @param  \Guzzle\Http\Message\Response  $response
+     * @param  \Guzzle\Http\Message\Response $response
      * @return void
      */
     public function setResponse(Response $response)
@@ -143,7 +140,7 @@ class UsergridException extends Exception implements ErrorResponseExceptionInter
     /**
      * Sets the error type returned by Usergrid.
      *
-     * @param  string  $errorType
+     * @param  string $errorType
      * @return void
      */
     public function setErrorType($errorType)

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/BaseCollection.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/BaseCollection.php b/sdks/php5/apache-usergrid/src/Api/Models/BaseCollection.php
index 9384fde..4cc7d67 100644
--- a/sdks/php5/apache-usergrid/src/Api/Models/BaseCollection.php
+++ b/sdks/php5/apache-usergrid/src/Api/Models/BaseCollection.php
@@ -17,7 +17,7 @@
 namespace Apache\Usergrid\Api\Models;
 
 
-use  Apache\Usergrid\Api\Usergrid;
+use Apache\Usergrid\Api\Usergrid;
 use Illuminate\Support\Collection;
 
 /**
@@ -48,28 +48,6 @@ class BaseCollection extends Collection
     protected $apiClient;
 
     /**
-     * Returns the Usergrid API client instance.
-     *
-     * @return  /Apache\Usergrid\Api\Usergrid  /Apache\Usergrid\Api\Usergrid
-     */
-    public function getApiClient()
-    {
-        return $this->apiClient;
-    }
-
-    /**
-     * Sets the Usergrid API client instance.
-     *
-     * @param Usergrid $client
-     * @internal param $ /Apache\Usergrid\Api\Usergrid $client
-     * @return void
-     */
-    public function setApiClient(Usergrid $client)
-    {
-        $this->apiClient = $client;
-    }
-
-    /**
      * Returns the given key value from the collection.
      *
      * @param  mixed $key
@@ -87,14 +65,52 @@ class BaseCollection extends Collection
             } else {
                 $data = $this->get($key, []);
             }
+            // create a new class of self so subclasses get new collection from entities of the correct model
+            // eg: before when asking  the User Model for its entities returned a collection of the BaseCollection class not the user class..
+            $class = self::instance($data);
+            //set the api client on collection so api attribute properties can make api calls to get related models
+            $class->setApiClient($this->getApiClient());
+            // return class.
+            return $class;
 
-            return new Collection($data);
         }
-
+        // check to see if the property you asked for is a attribute method
         if (method_exists($this, $method = "{$key}Attribute")) {
             return $this->{$method}($this->get($key));
         }
 
+        //else return key
         return $this->get($key, null);
     }
+
+    /**
+     * @param $data
+     * @return static
+     */
+    private static function instance($data)
+    {
+        return new static($data);
+    }
+
+    /**
+     * Returns the Usergrid API client instance.
+     *
+     * @return  /Apache\Usergrid\Api\Usergrid  /Apache\Usergrid\Api\Usergrid
+     */
+    public function getApiClient()
+    {
+        return $this->apiClient;
+    }
+
+    /**
+     * Sets the Usergrid API client instance.
+     *
+     * @param Usergrid $client
+     * @internal param $ /Apache\Usergrid\Api\Usergrid $client
+     * @return void
+     */
+    public function setApiClient(Usergrid $client)
+    {
+        $this->apiClient = $client;
+    }
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/Device.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/Device.php b/sdks/php5/apache-usergrid/src/Api/Models/Device.php
index 4949ffe..403ff8d 100644
--- a/sdks/php5/apache-usergrid/src/Api/Models/Device.php
+++ b/sdks/php5/apache-usergrid/src/Api/Models/Device.php
@@ -33,7 +33,18 @@ class Device extends BaseCollection implements ResponseClassInterface
 {
     use GuzzleCommandTrait;
 
-
-
+    public function userAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'devices',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'users'
+        ])->toArray();
+    }
+
+    public function notifierAttribute()
+    {
+
+    }
 
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/Group.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/Group.php b/sdks/php5/apache-usergrid/src/Api/Models/Group.php
new file mode 100644
index 0000000..6b034ca
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Api/Models/Group.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+namespace Apache\Usergrid\Api\Models;
+
+
+use Guzzle\Service\Command\ResponseClassInterface;
+
+/**
+ * Class Group
+ *
+ * @package    Apache/Usergrid
+ * @version    1.0.0
+ * @author     Jason Kristian <ja...@gmail.com>
+ * @license    Apache License, Version  2.0
+ * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
+ * @link       http://baas-platform.com
+ */
+class Group extends BaseCollection implements ResponseClassInterface
+{
+
+    use GuzzleCommandTrait;
+
+    public function usersAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'groups',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'users'
+        ])->toArray();
+    }
+
+    public function rolesAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'groups',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'roles'
+        ])->toArray();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/GuzzleCommandTrait.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/GuzzleCommandTrait.php b/sdks/php5/apache-usergrid/src/Api/Models/GuzzleCommandTrait.php
index f8bd6fa..e6ccb68 100644
--- a/sdks/php5/apache-usergrid/src/Api/Models/GuzzleCommandTrait.php
+++ b/sdks/php5/apache-usergrid/src/Api/Models/GuzzleCommandTrait.php
@@ -47,4 +47,13 @@ trait GuzzleCommandTrait
         // Return the collection
         return $collection;
     }
+
+    /**
+     *  Returns true if there is a cursor or false if there is not
+     * @return bool
+     */
+    public function hasNextPage()
+    {
+        return $this->has('cursor');
+    }
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/Notifier.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/Notifier.php b/sdks/php5/apache-usergrid/src/Api/Models/Notifier.php
new file mode 100644
index 0000000..a4c21c8
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Api/Models/Notifier.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+namespace Apache\Usergrid\Api\Models;
+
+
+use Guzzle\Service\Command\ResponseClassInterface;
+
+/**
+ * Class Application
+ *
+ * @package    Apache/Usergrid
+ * @version    1.0.0
+ * @author     Jason Kristian <ja...@gmail.com>
+ * @license    Apache License, Version  2.0
+ * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
+ * @link       http://baas-platform.com
+ */
+class Notifier extends BaseCollection implements ResponseClassInterface
+{
+    use GuzzleCommandTrait;
+
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/Organization.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/Organization.php b/sdks/php5/apache-usergrid/src/Api/Models/Organization.php
index adf9833..d58d3d4 100644
--- a/sdks/php5/apache-usergrid/src/Api/Models/Organization.php
+++ b/sdks/php5/apache-usergrid/src/Api/Models/Organization.php
@@ -34,27 +34,5 @@ class Organization extends BaseCollection implements ResponseClassInterface
 
     use GuzzleCommandTrait;
 
-    /**
-     * @var
-     */
-    protected $name;
 
-    /**
-     *  Collection Applications
-     *
-     * @var \Apache\Usergrid\Api\Models\Application $properties
-     */
-    protected $applications;
-
-    /** Organization UUID
-     * @var UUID $uuid
-     */
-    protected $uuid;
-
-
-    /**
-     *
-     * @var Array $properties
-     */
-    protected $properties = array();
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/Receipt.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/Receipt.php b/sdks/php5/apache-usergrid/src/Api/Models/Receipt.php
new file mode 100644
index 0000000..bc09235
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Api/Models/Receipt.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+namespace Apache\Usergrid\Api\Models;
+
+
+use Guzzle\Service\Command\ResponseClassInterface;
+
+/**
+ * Class Application
+ *
+ * @package    Apache/Usergrid
+ * @version    1.0.0
+ * @author     Jason Kristian <ja...@gmail.com>
+ * @license    Apache License, Version  2.0
+ * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
+ * @link       http://baas-platform.com
+ */
+class Receipt extends BaseCollection implements ResponseClassInterface
+{
+    use GuzzleCommandTrait;
+
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/Role.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/Role.php b/sdks/php5/apache-usergrid/src/Api/Models/Role.php
new file mode 100644
index 0000000..3e93465
--- /dev/null
+++ b/sdks/php5/apache-usergrid/src/Api/Models/Role.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright 2010-2014 baas-platform.com, Pty Ltd. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+namespace Apache\Usergrid\Api\Models;
+
+
+use Guzzle\Service\Command\ResponseClassInterface;
+
+/**
+ * Class Role
+ *
+ * @package    Apache/Usergrid
+ * @version    1.0.0
+ * @author     Jason Kristian <ja...@gmail.com>
+ * @license    Apache License, Version  2.0
+ * @copyright  (c) 2008-2014, Baas Platform Pty. Ltd
+ * @link       http://baas-platform.com
+ */
+class Role extends BaseCollection implements ResponseClassInterface
+{
+
+    use GuzzleCommandTrait;
+
+    public function usersAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'roles',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'users'
+        ])->toArray();
+    }
+
+    public function groupsAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'roles',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'groups'
+        ])->toArray();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Models/User.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Models/User.php b/sdks/php5/apache-usergrid/src/Api/Models/User.php
index d8ddd81..8bec6d3 100644
--- a/sdks/php5/apache-usergrid/src/Api/Models/User.php
+++ b/sdks/php5/apache-usergrid/src/Api/Models/User.php
@@ -34,4 +34,44 @@ class User extends BaseCollection implements ResponseClassInterface
 
     use GuzzleCommandTrait;
 
-} 
\ No newline at end of file
+    public function deviceAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'users',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'devices'
+        ])->toArray();
+    }
+
+    public function notificationAttribute()
+    {
+
+    }
+
+    public function groupsAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'users',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'groups'
+        ])->toArray();
+    }
+
+    public function rolesAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'users',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'roles'
+        ])->toArray();
+    }
+
+    public function connectionsAttribute()
+    {
+        return $this->getApiClient()->application()->GetRelationship([
+            'collection' => 'users',
+            'entity_id' => $this->entities->fetch('uuid')->first(),
+            'relationship' => 'connections'
+        ])->toArray();
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/QueryAggregator.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/QueryAggregator.php b/sdks/php5/apache-usergrid/src/Api/QueryAggregator.php
index f1362a7..eacfcd5 100644
--- a/sdks/php5/apache-usergrid/src/Api/QueryAggregator.php
+++ b/sdks/php5/apache-usergrid/src/Api/QueryAggregator.php
@@ -17,8 +17,8 @@
 namespace Apache\Usergrid\Api;
 
 
-use Guzzle\Http\QueryString;
 use Guzzle\Http\QueryAggregator\QueryAggregatorInterface;
+use Guzzle\Http\QueryString;
 
 /**
  * Class QueryAggregator

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/ResourceIterator.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/ResourceIterator.php b/sdks/php5/apache-usergrid/src/Api/ResourceIterator.php
index 7926d08..7df0dd7 100644
--- a/sdks/php5/apache-usergrid/src/Api/ResourceIterator.php
+++ b/sdks/php5/apache-usergrid/src/Api/ResourceIterator.php
@@ -66,4 +66,4 @@ class ResourceIterator extends BaseIterator
         return $data;
     }
 
-} 
+} 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Api/Usergrid.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Api/Usergrid.php b/sdks/php5/apache-usergrid/src/Api/Usergrid.php
index 3353630..279f2b2 100644
--- a/sdks/php5/apache-usergrid/src/Api/Usergrid.php
+++ b/sdks/php5/apache-usergrid/src/Api/Usergrid.php
@@ -19,9 +19,9 @@ namespace Apache\Usergrid\Api;
 
 use Apache\Usergrid\Guzzle\Plugin\Oauth2\Oauth2Plugin;
 use Guzzle\Common\Event;
-use InvalidArgumentException;
-use Guzzle\Service\Description\ServiceDescription;
 use Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin;
+use Guzzle\Service\Description\ServiceDescription;
+use InvalidArgumentException;
 
 /**
  * Class Usergrid
@@ -42,9 +42,9 @@ class Usergrid
      */
     protected $token;
 
+
     /**
-     *  Grant Type Client Id or password
-     * @var
+     * @var \Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType\GrantTypeInterface
      */
     protected $grantType;
     /**
@@ -52,7 +52,7 @@ class Usergrid
      *
      * @var string
      */
-    protected $version = '1.0.0';
+    protected $version = '1.0.1';
     /**
      * The manifests path.
      *
@@ -72,24 +72,6 @@ class Usergrid
      */
     protected $oauth2_plugin;
     /**
-     * @return string
-     */
-    public function getManifestPath()
-    {
-        return $this->manifestPath;
-    }
-
-    /**
-     * @param string $manifestPath
-     * @return $this
-     */
-    public function setManifestPath($manifestPath)
-    {
-        $this->manifestPath = $manifestPath;
-        return $this;
-    }
-
-    /**
      * The cached manifests data.
      *
      * @var array
@@ -101,14 +83,12 @@ class Usergrid
      * @var string
      */
     protected $userAgent = 'BaaS-Usergrid/1.0.0';
-
     /**
      * The headers to be sent to the Guzzle client.
      *
      * @var array
      */
     protected $headers = [];
-
     private $org_name;
     private $app_name;
 
@@ -120,8 +100,14 @@ class Usergrid
      * @param $baseUrl
      * @param Oauth2Plugin $oauth2_plugin
      */
-    function __construct($orgName = null, $appName = null, $manifestPath, $version, $baseUrl, Oauth2Plugin $oauth2_plugin = null)
-    {
+    function __construct(
+        $orgName = null,
+        $appName = null,
+        $manifestPath,
+        $version,
+        $baseUrl,
+        Oauth2Plugin $oauth2_plugin = null
+    ) {
         //Set Version so its added to header
         $this->setVersion($version ?: $this->version);
 
@@ -131,76 +117,21 @@ class Usergrid
         $this->app_name = $appName;
 
         //check if OAuth2 plugin is enabled
-        if($oauth2_plugin != null){
+        if ($oauth2_plugin != null) {
             $this->oauth2_plugin = $oauth2_plugin;
+            $this->grantType = $this->oauth2_plugin->getGrantType();
         }
 
         // Set the manifest path
-        $this->setManifestPath($manifestPath ?: dirname(dirname(__FILE__)).'/Manifests');
-    }
-
-    /**
-     * Returns the Guzzle client headers.
-     *
-     * @return array
-     */
-    public function getHeaders()
-    {
-        return $this->headers;
-    }
-
-    /**
-     * Sets the Guzzle client headers.
-     *
-     * @param  array $headers
-     * @return $this
-     */
-    public function setHeaders(array $headers = [])
-    {
-        $this->headers = array_merge($this->headers, $headers);
-
-        return $this;
-    }
-
-    /**
-     * @return string
-     */
-    public function getVersion()
-    {
-        return $this->version;
-    }
-
-    /**
-     * @param string $version
-     * @return $this
-     */
-    public function setVersion($version)
-    {
-        $this->version = $version;
-
-        $this->setHeaders([
-            'Usergrid-Version' => (string)$version,
-        ]);
-        return $this;
-    }
-
-    /**
-     * @return string
-     */
-    public function getUserAgent()
-    {
-        return $this->userAgent;
+        $this->setManifestPath($manifestPath ?: dirname(dirname(__FILE__)) . '/Manifests');
     }
 
     /**
-     * @param string $userAgent
-     * @return $this
+     * @return mixed
      */
-    public function setUserAgent($userAgent)
+    public function getToken()
     {
-        $this->userAgent = $userAgent;
-
-        return $this;
+        return $this->token;
     }
 
     /**
@@ -219,14 +150,6 @@ class Usergrid
     }
 
     /**
-     * @return mixed
-     */
-    public function getToken()
-    {
-        return $this->token;
-    }
-
-    /**
      * Dynamically handle missing methods.
      *
      * @param  string $method
@@ -245,56 +168,6 @@ class Usergrid
     }
 
     /**
-     * Determines if the request is a single request.
-     *
-     * @return bool
-     */
-    protected function isSingleRequest($method)
-    {
-        return (str_singular($method) === $method && $this->manifestExists(str_plural($method)));
-    }
-
-    /**
-     * Handles a single request.
-     *
-     * @param  string $method
-     * @param  array $arguments
-     * @return \Guzzle\Service\Client
-     * @throws \InvalidArgumentException
-     */
-    protected function handleSingleRequest($method, array $arguments = [])
-    {
-        // Check if we have any arguments
-        if (empty($arguments)) {
-            throw new InvalidArgumentException('Not enough arguments provided!');
-        }
-
-        // Pluralize the method name
-        $pluralMethod = str_plural($method);
-
-        // Get the request manifest payload data
-        $manifest = $this->getRequestManifestPayload($pluralMethod);
-
-        if (!$parameters = array_get($manifest, 'find')) {
-            throw new InvalidArgumentException("Undefined method [{$method}] called.");;
-        }
-
-        // Get the required parameters for the request
-        $required = array_where(array_get($parameters, 'parameters'), function ($key, $value) {
-            return $value['required'] === true;
-        });
-
-        // Prepare the arguments for the request
-        $arguments = array_combine(
-            array_keys($required),
-            count($required) === 1 ? (array)$arguments[0] : $arguments
-        );
-
-        // Execute the request
-        return $this->handleRequest($pluralMethod)->find($arguments);
-    }
-
-    /**
      * Handles an iterator request.
      *
      * @param  string $method
@@ -325,7 +198,8 @@ class Usergrid
         }
 
         // Initialize the Guzzle client
-        $client = new GuzzleClient('',['command.params' => ['app_name_or_uuid' => $this->app_name, 'org_name_or_uuid' => $this->org_name]]);
+        $client = new GuzzleClient('',
+            ['command.params' => ['app_name_or_uuid' => $this->app_name, 'org_name_or_uuid' => $this->org_name]]);
 
         // Set our own usergrid api client for internal
         // usage within our api models.
@@ -352,7 +226,7 @@ class Usergrid
         });
 
         //check if Oauth 2 plugin is a instance of Oauth2Plugin
-        if($this->oauth2_plugin instanceof Oauth2Plugin) {
+        if ($this->oauth2_plugin instanceof Oauth2Plugin) {
             $dispatcher->addSubscriber($this->oauth2_plugin);
         }
 
@@ -367,13 +241,14 @@ class Usergrid
     }
 
     /**
-     * Returns the full versioned manifests path.
+     * Checks if the manifest file for the current request exists.
      *
-     * @return string
+     * @param  string $file
+     * @return bool
      */
-    protected function getFullManifestPath()
+    protected function manifestExists($file)
     {
-        return $this->getManifestPath() . '/' . $this->getVersion();
+        return file_exists($this->getManifestFilePath($file));
     }
 
     /**
@@ -388,6 +263,98 @@ class Usergrid
     }
 
     /**
+     * Returns the full versioned manifests path.
+     *
+     * @return string
+     */
+    protected function getFullManifestPath()
+    {
+        return $this->getManifestPath() . '/' . $this->getVersion();
+    }
+
+    /**
+     * @return string
+     */
+    public function getManifestPath()
+    {
+        return $this->manifestPath;
+    }
+
+    /**
+     * @param string $manifestPath
+     * @return $this
+     */
+    public function setManifestPath($manifestPath)
+    {
+        $this->manifestPath = $manifestPath;
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getVersion()
+    {
+        return $this->version;
+    }
+
+    /**
+     * @param string $version
+     * @return $this
+     */
+    public function setVersion($version)
+    {
+        $this->version = $version;
+
+        $this->setHeaders([
+            'Usergrid-Version' => (string)$version,
+        ]);
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getUserAgent()
+    {
+        return $this->userAgent;
+    }
+
+    /**
+     * @param string $userAgent
+     * @return $this
+     */
+    public function setUserAgent($userAgent)
+    {
+        $this->userAgent = $userAgent;
+
+        return $this;
+    }
+
+    /**
+     * Returns the Guzzle client headers.
+     *
+     * @return array
+     */
+    public function getHeaders()
+    {
+        return $this->headers;
+    }
+
+    /**
+     * Sets the Guzzle client headers.
+     *
+     * @param  array $headers
+     * @return $this
+     */
+    public function setHeaders(array $headers = [])
+    {
+        $this->headers = array_merge($this->headers, $headers);
+
+        return $this;
+    }
+
+    /**
      * Returns the current request payload.
      *
      * @param  string $method
@@ -432,14 +399,54 @@ class Usergrid
     }
 
     /**
-     * Checks if the manifest file for the current request exists.
+     * Determines if the request is a single request.
      *
-     * @param  string $file
+     * @param $method
      * @return bool
      */
-    protected function manifestExists($file)
+    protected function isSingleRequest($method)
     {
-        return file_exists($this->getManifestFilePath($file));
+        return (str_singular($method) === $method && $this->manifestExists(str_plural($method)));
+    }
+
+    /**
+     * Handles a single request.
+     *
+     * @param  string $method
+     * @param  array $arguments
+     * @return \Guzzle\Service\Client
+     * @throws \InvalidArgumentException
+     */
+    protected function handleSingleRequest($method, array $arguments = [])
+    {
+        // Check if we have any arguments
+        if (empty($arguments)) {
+            throw new InvalidArgumentException('Not enough arguments provided!');
+        }
+
+        // Pluralize the method name
+        $pluralMethod = str_plural($method);
+
+        // Get the request manifest payload data
+        $manifest = $this->getRequestManifestPayload($pluralMethod);
+
+        if (!$parameters = array_get($manifest, 'find')) {
+            throw new InvalidArgumentException("Undefined method [{$method}] called.");;
+        }
+
+        // Get the required parameters for the request
+        $required = array_where(array_get($parameters, 'parameters'), function ($key, $value) {
+            return $value['required'] === true;
+        });
+
+        // Prepare the arguments for the request
+        $arguments = array_combine(
+            array_keys($required),
+            count($required) === 1 ? (array)$arguments[0] : $arguments
+        );
+
+        // Execute the request
+        return $this->handleRequest($pluralMethod)->find($arguments);
     }
 
 } 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/AuthorizationCode.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/AuthorizationCode.php b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/AuthorizationCode.php
index 0a31df6..b03d4a7 100755
--- a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/AuthorizationCode.php
+++ b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/AuthorizationCode.php
@@ -18,7 +18,6 @@ namespace Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType;
 
 use Guzzle\Common\Collection;
 use Guzzle\Http\ClientInterface;
-use Guzzle\Http\Exception\RequestException;
 
 /**
  * Authorization code grant type.
@@ -47,7 +46,8 @@ class AuthorizationCode implements GrantTypeInterface
             'scope' => '',
             'redirect_uri' => '',
         ), array(
-            'client_id', 'code',
+            'client_id',
+            'code',
         ));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/ClientCredentials.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/ClientCredentials.php b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/ClientCredentials.php
index bec4968..729f6a5 100755
--- a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/ClientCredentials.php
+++ b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/ClientCredentials.php
@@ -18,7 +18,6 @@ namespace Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType;
 
 use Guzzle\Common\Collection;
 use Guzzle\Http\ClientInterface;
-use Guzzle\Http\Exception\RequestException;
 
 /**
  * Client credentials grant type.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/HWIOAuthBundleRefreshToken.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/HWIOAuthBundleRefreshToken.php b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/HWIOAuthBundleRefreshToken.php
index c0d3713..f30d593 100755
--- a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/HWIOAuthBundleRefreshToken.php
+++ b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/HWIOAuthBundleRefreshToken.php
@@ -16,8 +16,8 @@
 
 namespace Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType;
 
-use Symfony\Component\Security\Core\SecurityContextInterface;
 use HWI\Bundle\OAuthBundle\Security\Http\ResourceOwnerMap;
+use Symfony\Component\Security\Core\SecurityContextInterface;
 
 /**
  * HWIOAuthBundle Aware Refresh token grant type.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/PasswordCredentials.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/PasswordCredentials.php b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/PasswordCredentials.php
index 44cf77b..6afc482 100755
--- a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/PasswordCredentials.php
+++ b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/PasswordCredentials.php
@@ -17,7 +17,6 @@ namespace Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType;
 
 use Guzzle\Common\Collection;
 use Guzzle\Http\ClientInterface;
-use Guzzle\Http\Exception\RequestException;
 
 /**
  * Resource owner password credentials grant type.
@@ -45,7 +44,9 @@ class PasswordCredentials implements GrantTypeInterface
             'client_secret' => '',
             'scope' => '',
         ), array(
-            'client_id', 'username', 'password'
+            'client_id',
+            'username',
+            'password'
         ));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/RefreshToken.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/RefreshToken.php b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/RefreshToken.php
index 10999b2..149d570 100755
--- a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/RefreshToken.php
+++ b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/GrantType/RefreshToken.php
@@ -17,7 +17,6 @@ namespace Apache\Usergrid\Guzzle\Plugin\Oauth2\GrantType;
 
 use Guzzle\Common\Collection;
 use Guzzle\Http\ClientInterface;
-use Guzzle\Http\Exception\RequestException;
 
 /**
  * Refresh token grant type.

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9ffe2b0d/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php
----------------------------------------------------------------------
diff --git a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php
index e5671f5..8454309 100755
--- a/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php
+++ b/sdks/php5/apache-usergrid/src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php
@@ -84,34 +84,6 @@ class Oauth2Plugin implements EventSubscriberInterface
     }
 
     /**
-     * Request error event handler.
-     *
-     * Handles unauthorized errors by acquiring a new access token and
-     * retrying the request.
-     *
-     * @param Event $event Event received
-     */
-    public function onRequestError(Event $event)
-    {
-        if ($event['response']->getStatusCode() == 401) {
-            if ($event['request']->getHeader('X-Guzzle-Retry')) {
-                // We already retried once, give up.
-                return;
-            }
-
-            // Acquire a new access token, and retry the request.
-            $newAccessToken = $this->acquireAccessToken();
-            if ($newAccessToken) {
-                $newRequest = clone $event['request'];
-                $newRequest->setHeader('Authorization', 'Bearer ' . $newAccessToken['access_token']);
-                $newRequest->setHeader('X-Guzzle-Retry', '1');
-                $event['response'] = $newRequest->send();
-                $event->stopPropagation();
-            }
-        }
-    }
-
-    /**
      * Get the access token.
      *
      * Handles token expiration for tokens with an "expires" timestamp.
@@ -144,26 +116,6 @@ class Oauth2Plugin implements EventSubscriberInterface
     }
 
     /**
-     * Get the refresh token.
-     *
-     * @return string
-     */
-    public function getRefreshToken()
-    {
-        return $this->refreshToken;
-    }
-
-    /**
-     * Set the refresh token.
-     *
-     * @param string $refreshToken The refresh token
-     */
-    public function setRefreshToken($refreshToken)
-    {
-        $this->refreshToken = $refreshToken;
-    }
-
-    /**
      * Acquire a new access token from the server.
      *
      * @return array|null
@@ -201,4 +153,60 @@ class Oauth2Plugin implements EventSubscriberInterface
 
         return $this->accessToken;
     }
+
+    /**
+     * Request error event handler.
+     *
+     * Handles unauthorized errors by acquiring a new access token and
+     * retrying the request.
+     *
+     * @param Event $event Event received
+     */
+    public function onRequestError(Event $event)
+    {
+        if ($event['response']->getStatusCode() == 401) {
+            if ($event['request']->getHeader('X-Guzzle-Retry')) {
+                // We already retried once, give up.
+                return;
+            }
+
+            // Acquire a new access token, and retry the request.
+            $newAccessToken = $this->acquireAccessToken();
+            if ($newAccessToken) {
+                $newRequest = clone $event['request'];
+                $newRequest->setHeader('Authorization', 'Bearer ' . $newAccessToken['access_token']);
+                $newRequest->setHeader('X-Guzzle-Retry', '1');
+                $event['response'] = $newRequest->send();
+                $event->stopPropagation();
+            }
+        }
+    }
+
+    /**
+     * Get the refresh token.
+     *
+     * @return string
+     */
+    public function getRefreshToken()
+    {
+        return $this->refreshToken;
+    }
+
+    /**
+     * Set the refresh token.
+     *
+     * @param string $refreshToken The refresh token
+     */
+    public function setRefreshToken($refreshToken)
+    {
+        $this->refreshToken = $refreshToken;
+    }
+
+    /**
+     * @return GrantTypeInterface
+     */
+    public function getGrantType()
+    {
+        return $this->grantType;
+    }
 }


[11/11] incubator-usergrid git commit: Merge remote-tracking branch 'apps4u/master' into apache_usergrid/master

Posted by ro...@apache.org.
Merge remote-tracking branch 'apps4u/master' into apache_usergrid/master


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/3032dfaa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/3032dfaa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/3032dfaa

Branch: refs/heads/master
Commit: 3032dfaa18fbb59f64309e57f5d53db21f879987
Parents: cad90cd 9ffe2b0
Author: Rod Simpson <ro...@apigee.com>
Authored: Wed Dec 10 18:50:38 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Wed Dec 10 18:50:38 2014 -0700

----------------------------------------------------------------------
 .../Examples/attrubites/attributes.php          |  122 +
 .../Examples/collections/books.php              |   26 +-
 .../Examples/collections/data.php               |   40 +-
 .../Examples/collections/users.php              |   29 +-
 sdks/php5/apache-usergrid/Examples/examples.php |    5 +-
 .../Examples/management/management.php          |    4 +-
 .../Examples/messages/messages.php              |    2 +-
 .../Examples/notifications/notifications.php    |    2 +-
 .../Examples/notifications/notifiers.php        |    7 +-
 sdks/php5/apache-usergrid/README.md             |   28 +-
 sdks/php5/apache-usergrid/composer.json         |    2 +-
 sdks/php5/apache-usergrid/composer.lock         |  183 +-
 .../src/Api/Exception/BadRequestException.php   |    3 +-
 .../src/Api/Exception/NotFoundException.php     |    3 +-
 .../src/Api/Exception/ServerErrorException.php  |    3 +-
 .../src/Api/Exception/UnauthorizedException.php |    3 +-
 .../src/Api/Exception/UsergridException.php     |   15 +-
 .../src/Api/Models/BaseCollection.php           |   66 +-
 .../apache-usergrid/src/Api/Models/Device.php   |   15 +-
 .../apache-usergrid/src/Api/Models/Group.php    |   54 +
 .../src/Api/Models/GuzzleCommandTrait.php       |    9 +
 .../apache-usergrid/src/Api/Models/Notifier.php |   36 +
 .../src/Api/Models/Organization.php             |   22 -
 .../apache-usergrid/src/Api/Models/Receipt.php  |   36 +
 .../apache-usergrid/src/Api/Models/Role.php     |   54 +
 .../apache-usergrid/src/Api/Models/User.php     |   42 +-
 .../apache-usergrid/src/Api/QueryAggregator.php |    2 +-
 .../src/Api/ResourceIterator.php                |    2 +-
 sdks/php5/apache-usergrid/src/Api/Usergrid.php  |  319 +-
 .../Oauth2/GrantType/AuthorizationCode.php      |    4 +-
 .../Oauth2/GrantType/ClientCredentials.php      |    1 -
 .../GrantType/HWIOAuthBundleRefreshToken.php    |    2 +-
 .../Oauth2/GrantType/PasswordCredentials.php    |    5 +-
 .../Plugin/Oauth2/GrantType/RefreshToken.php    |    1 -
 .../src/Guzzle/Plugin/Oauth2/Oauth2Plugin.php   |  104 +-
 .../Laravel/ApacheUsergridServiceProvider.php   |   40 +-
 .../src/Manifests/1.0.0/Errors.php              |   71 +-
 .../src/Manifests/1.0.1/Application.php         |    3 -
 .../src/Manifests/1.0.1/Custom.php              |    3 +-
 .../src/Manifests/1.0.1/Devices.php             |   88 +-
 .../src/Manifests/1.0.1/Groups.php              |   19 +-
 .../src/Manifests/1.0.1/Notifiers.php           |   39 +-
 .../src/Manifests/1.0.1/Roles.php               |   15 +-
 .../src/Manifests/1.0.1/Users.php               |    3 +-
 .../src/Manifests/Application.php               |  985 ----
 .../src/Manifests/Management.php                | 1381 ------
 .../apache-usergrid/src/Manifests/Manifest.php  |   23 -
 .../apache-usergrid/src/Manifests/Usergrid.php  | 4689 ------------------
 .../src/Manifests/applications.json             | 1262 -----
 .../src/Manifests/management.json               | 1905 -------
 .../src/Manifests/resources.json                |   15 -
 .../Manifests/swagger-json/applications.json    | 1262 +++++
 .../src/Manifests/swagger-json/management.json  | 1905 +++++++
 .../src/Manifests/swagger-json/resources.json   |   15 +
 .../src/Native/Facades/Usergrid.php             |   63 +-
 .../src/Native/UsergridBootstrapper.php         |   25 +-
 sdks/php5/apache-usergrid/src/config/config.php |   12 -
 .../tests/Api/ApplicationTest.php               |    2 +-
 .../apache-usergrid/tests/Api/AttributeTest.php |   59 +
 .../Api/Exception/BadRequestExceptionTest.php   |    4 +-
 .../Api/Exception/InvalidIdExceptionTest.php    |    4 +-
 .../Api/Exception/NotFoundExceptionTest.php     |    4 +-
 .../Api/Exception/ServerErrorExceptionTest.php  |    4 +-
 .../Api/Exception/UnauthorizedExceptionTest.php |    4 +-
 .../tests/Api/Filters/BooleanTest.php           |    2 +-
 .../tests/Api/Filters/DateTest.php              |    2 +-
 .../tests/Api/ManagementTest.php                |    2 +-
 .../tests/Api/QueryAggregatorTest.php           |    2 -
 .../apache-usergrid/tests/Api/UsergridTest.php  |    8 +-
 .../tests/Laravel/Facades/UsergridTest.php      |    2 +-
 sdks/php5/apache-usergrid/tests/bootstrap.php   |   14 +-
 71 files changed, 4389 insertions(+), 10798 deletions(-)
----------------------------------------------------------------------