Send Docs Feedback

Note: Most user interface tasks can be performed in Edge Classic or the New Edge experience. For an overview, getting started topics, and release notes specific to the New Edge experience, see the docs.

General-purpose endpoints

See all application entities

This document describes App services endpoints for managing entities other than users, groups, and roles.

Note: Although not shown in the API examples below, you need to provide a valid access token with each API call. See Authenticating users and application clients for details.

Creating a new entity or collection

Use the POST method to post an entity to the specified collection.

Collections do not need to be defined before being used; simply posting an entity to a collection creates the collection if it does not already exist.

Request URI

POST /{org_id}/{app_id}/{collection}{request body}

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
request body

Either a single property or set of entity properties:

{ "foo" : "bar", "a" : { "b" : 1, "c" : 2 } }

or an array to create multiple entities in the same collection:

[ { "foo" : "bar" }, { "foo" : "baz"} ]

Example - Request: Create an entity

curl -X POST "https://api.usergrid.com/my-org/my-app/cats" -d '{"name":"nico"}'

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'POST',
    endpoint:'cats',
    body: {name:'nico'}
};
client.createEntity(options, function (err, cat) {
    if (err) {
        //error
    } else {
        //success          
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
result = app.create_cat name: 'nico'
mynewcat = result.entity

The example assumes use of the Node.js module.

var options = {
    method:'POST',
    endpoint:'cats',
    body: {name:'nico'}
};
client.createEntity(options, function (err, cat) {
    if (err) {
        //error
    } else {
        //success          
    }
});

Example - Response

{
"action": "post",
"application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
"params": {},
"path": "/cats",
"uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/cats",
"entities": [
       {
        "uuid": "1a7c2177-67cb-11e1-8223-12313d14bde7",
        "type": "cat",
        "name": "nico",
        "created": 1331065781819,
        "modified": 1331065781819,
        "metadata": {
          "path": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7"
        },
      }
],
"timestamp": 1331065781798,
"duration": 74,
"organization": "my-org",
"applicationName": "my-app"
}

Example - Request: Create multiple entities

curl -X POST "https://api.usergrid.com/my-org/my-app/cats" -d '[ {"name":"mopsy"},{"name": "topsy"}]

The example assumes use of the JavaScript (HTML5) SDK.

Note: Creating multiple entities is not possible with the Entity or Collection object, so you must use a basic request.
var options = {
    method:'POST',
    endpoint:'cats',
    body:[{"name":"mopsy"},{"name": "topsy"}]
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success — data will contain raw results from API call        
    }
});

 

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
result=app.create_cats [{name: "mopsy"}, {name: "topsy"}]
cats = result.collection

The example assumes use of the Node.js module.

Note: Creating multiple entities is not possible with the Entity or Collection object, so you must use a basic request.
var options = {
    method:'POST',
    endpoint:'cats',
    body:[{"name":"mopsy"},{"name": "topsy"}]
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success — data will contain raw results from API call        
    }
});

 

Example - Response

{
 "action": "post",
 "application": "7fb8d891-477d-11e1-b2bd-22000a1c4e221",
 "params":  {},
 "path": "/cats",
 "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/cats",
 "entities":  [
    {
     "uuid": "187d31d9-0742-11e2-a7b5-12313d21509c",
     "type": "cat",
     "name": "mopsy",
     "created": 1348599123463,
     "modified": 1348599123463,
     "metadata":  {
       "path": "/cats/187d31d9-0742-11e2-a7b5-12313d21509c"
     }
   },
    {
    "uuid": "188f815b-0742-11e2-a7b5-12313d21509c",
    "type": "cat",
    "name": "topsy",
    "created": 1348599123583,
    "modified": 1348599123583,
    "metadata":  {
        "path": "/cats/187d31d9-0742-11e2-a7b5-12313d21509c"
    }
   }
  ],
  "timestamp": 1348599123461,
  "duration": 415,
  "organization": "my-org",
  "applicationName": "my-app"

Entity contents are specified in JSON format. Any valid JSON object can be stored in an entity, regardless of the level of complexity, and can be more than just name/value pairs. For example, an entity can contain subentities.

Example - Request: Create an entity with subentities

curl -X POST "https://api.usergrid.com/my-org/my-app/cats" -d '{"name":"phantom","awardcodes":{"BIS":"Best in show","FRU":"First runner up", "SRU":"Second runner up"}}'

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
        method:'POST',
        endpoint:'cats',
        body:{ 
          name:'phantom', 
          awardcodes:'{"BIS":"Best in show",FRU:"First runner up", SRU:"Second runner up"}' }
    };
client.createEntity(options, function (err, cat) {
    if (err) {
        //error
    } else {
        //success          
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
result = app.create_cat name: 'phantom', awardcodes: { counters: {BIS: 'Best in show', FRU: 'First runner up', SRU: 'Second runner up'}}

The example assumes use of the Node.js module.

var options = {
        method:'POST',
        endpoint:'cats',
        body:{ 
          name:'phantom', 
          awardcodes:'{"BIS":"Best in show",FRU:"First runner up", SRU:"Second runner up"}' }
    };
client.createEntity(options, function (err, cat) {
    if (err) {
        //error
    } else {
        //success          
    }
});

Example - Response

{
 "action": "post",
 "application": "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
 "params":  {},
 "path": "/cats",
 "uri":      "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/cats",
 "entities":  [
    {
     "uuid": "b5c88a20-08ce-11e2-9d8d-12313d04be1e",
     "type": "cat",
     "name": "phantom",
     "created": 1331065781819,
     "modified": 13310657818194,
     "awardcodes":  {
       "BIS": "Best in show",
       "FRU": "First runner up",
       "SRU": "Second runner up"
     },
     "metadata":  {
       "path": "/cats/b5c88a20-08ce-11e2-9d8d-12313d04be1e"
     }
   }
 ],
 "timestamp": 1348769467049,
 "duration": 3508,
 "organization": "my-org",
 "applicationName": "my-app"

Entity types are defined by the type of collection to which they are posted. For example, posting to a collection named “cats” creates entities of type cat.

All user-defined properties are indexed. Entities are fully indexed, and strings that contain multiple words are keyword-indexed as well.

For all application-specific entities, you can provide a property called name that you can use to retrieve the entity rather than its UUID. The value for the name property must be unique. Some predefined entities (such as user) specify a different look-up property that can be used for identifying an entity. For example, user entities specify the username property rather than name. Refer to specific system-defined entity descriptions for details.

Getting an entity

Use the GET method to retrieve an entity given the specified UUID or entity lookup property.

For any application-specific entity type, if there is a name property specified for the entity, you can specify name instead of the UUID to retrieve the entity. For system-provided entities, there might be a different property than name defined for doing look-ups. For example, the user entity defines username as its look-up property. Refer to the entity descriptions to see if there is an alternate look-up property defined for a system-provided entity type.

Request URI

GET /{org_id}/{app_id}/{collection}/{uuid|name}

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string uuid|name Entity UUID or name

When the entity is a user, use username instead of name to retrieve the entity.

Example - Request

curl -X GET "https://api.usergrid.com/my-org/my-app/things/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0"

The example assumes use of the JavaScript (HTML5) SDK.

//If you already have your entity object, and just want to fetch the data for it from the database, you can just call fetch:

myEntity.fetch(function(err){
    if (err){
        //entity not refreshed from database
    } else {
        //entity has been refreshed from the database
    }
});
//You can also make a straight GET request: 

var options = { 
   method:'GET', 
   endpoint:'things/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0' 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //success — data will contain raw results from API call 
   } 
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
thing = app['things/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0'].entity

The example assumes use of the Node.js module.

//If you already have your entity object, and just want to fetch the data for it from the database, you can just call fetch:

myEntity.fetch(function(err){
    if (err){
        //entity not refreshed from database
    } else {
        //entity has been refreshed from the database
    }
});
//You can also make a straight GET request: 

var options = { 
   method:'GET', 
   endpoint:'things/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0b' 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //success — data will contain raw results from API call 
   } 
});

Example - Response

{
    "action": "get",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {}
    "path": "/things",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/things",
    "entities": [
        {
            "uuid": "da4a50dc-38dc-11e2-b2e4-02e81adcf3d0",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "metadata": {
                "path": "/things/da4a50dc-38dc-11e2-b2e4-02e81adcf3d0"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org",
    "applicationName": "my-app"
}

Example - Request: Get multiple entities

You can retrieve multiple entities by specifying their UUIDs in the resource path. You cannot specify entity names. Use a semicolon (not a slash) to separate the collection name from the UUIDs and a semicolon to separate each UUID.

curl -X GET "https://api.usergrid.com/my-org/my-app/cats;2d6de40f-072f-11e2-a7b5-12313d21509c;92643d37-666c-11e2-8b37-02e81ac5a17b"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'GET',
    endpoint:'cats;2d6de40f-072f-11e2-a7b5-12313d21509c;92643d37-666c-11e2-8b37-02e81ac5a17b'
};
client.request(options, function (err, data) {
    if (err) {
        //error — GET failed
    } else {
        //success — data will contain raw results from API call       
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
cats = app['cats;2d6de40f-072f-11e2-a7b5-12313d21509c;92643d37-666c-11e2-8b37-02e81ac5a17b'].entity

The example assumes use of the Node.js module.

var options = {
    method:'GET',
    endpoint:'cats;2d6de40f-072f-11e2-a7b5-12313d21509c;92643d37-666c-11e2-8b37-02e81ac5a17b'
};
client.request(options, function (err, data) {
    if (err) {
        //error — GET failed
    } else {
        //success — data will contain raw results from API call       
    }
});

Example - Response: Get multiple entities

{
  "action" : "get",
  "application" : "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
  "params" : { },
  "path" : "/cats",
  "uri" : "http://api.usergrid.com/edort1/sandbox/cats",
  "entities" : [ {
    "uuid" : "92643d37-666c-11e2-8b37-02e81ac5a17b",
    "type" : "cat",
    "name" : "tabby",
    "created" : 1359062727308,
    "modified" : 1359062727308,
    "metadata" : {
      "path" : "/cats/92643d37-666c-11e2-8b37-02e81ac5a17b"
    },
    "name" : "tabby"
  }, {
    "uuid" : "2d6de40f-072f-11e2-a7b5-12313d21509c",
    "type" : "cat",
    "name" : "fluffy",
    "created" : 1348590998157,
    "modified" : 1350688632830,
    "awards" : [ {
      "event" : "Pacific Cat Fanciers",
      "designation" : "First Runner Up"
    }, {
      "event" : "Cat World",
      "designation" : "Blue Ribbon"
    } ],
    "metadata" : {
      "path" : "/cats/2d6de40f-072f-11e2-a7b5-12313d21509c"
    },
    "name" : "fluffy"
  } ],
  "timestamp" : 1360255095608,
  "duration" : 32,
  "organization" : "my-org",
  "applicationName" : "my-app"
}

Updating an entity

Use the PUT method to update an entity in a collection. New property values are stored in the entity.

Request URI

PUT /{org_id}/{app_id}/{collection}/{uuid|name}{request body}

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string uuid|name Entity UUID or name
request body

Set of entity properties:

{"alpha":"bravo"}

Example - Request

curl -X PUT https://api.usergrid.com/my-org/my-app/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb" -d '{"alpha":"bravo"}'

The example assumes use of the JavaScript (HTML5) SDK.

//after  the entity is created, you can set single properties:
myEntity.set('data','Value');

//or set a full JSON object:
var data = {
   somedata:'one',
   someotherdata:'two'
}
//set is additive, so previously set properties are not overwritten
myEntity.set(data);

//finally, call save on the object to save it back to the database
myEntity.save(function(err){
   if (err){
      //error
   } else {
      //success
   }
});

//You can also simply make a straight PUT call to the database: 
var options = { 
   method:'PUT', 
   endpoint:'things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb', 
   body:{ alpha:'bravo' } 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //data will contain raw results from API call 
      //success 
   } 
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
thing = app['things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb'].entity
thing.alpha = 'bravo'
thing.save

The example assumes use of the Node.js module.

//after  the entity is created, you can set single properties:
myEntity.set('data','Value');

//or set a full JSON object:
var data = {
   somedata:'one',
   someotherdata:'two'
}
//set is additive, so previously set properties are not overwritten
myEntity.set(data);

//finally, call save on the object to save it back to the database
myEntity.save(function(err){
   if (err){
      //error
   } else {
      //success
   }
});

//You can also simply make a straight PUT call to the database: 
var options = { 
   method:'PUT', 
   endpoint:'things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb', 
   body:{ alpha:'bravo' } 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //data will contain raw results from API call 
      //success 
   } 
});

Example - Response

{
    "action": "put",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {},
    "path": "/things",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/things",
    "entities": [
        {
            "uuid": "4c469e8a-d8ed-11e0-bcc1-12313f0204bb",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "a": {
                "b": 1,
                "c": 2
            },
            "alpha": "bravo",
            "foo": "bar",
            "metadata": {
                "path": "/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org",
    "applicationName": "my-app"
}

To update a subentity, specify values for all previously-specified properties of the subentity. Any property values that are not provided in the subentity update will be erased. For example, if the subentity has values specified for three properties, such as:

awardcodes":  {
        "BIS": "Best in show",
        "FRU": "First runner up",
        "SRU": "Second runner up"
      }

but only two propertes are specified in the update (such as BIS and FRU), the other property (in this case, SRU) will be erased.

Deleting an entity

Use the DELETE method to delete the message with the specified UUID or entity look-up name.

Returns the contents of the deleted entity.

Request URI

DELETE /{org_id}/{app_id}/{collection}/{uuid|name}

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string uuid|name Entity UUID or name

Example - Request

curl -X DELETE "https://api.usergrid.com/my-org/my-app/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"

The example assumes use of the JavaScript (HTML5) SDK.

//If your Entity is already created, simply call destroy:
myEntity.destroy(function(err){
    if (err){
        //error
    } else {
        //success
        myEntity = null; //get rid of the object locally
    }
});
//to make a straight DELETE call, use the standard format: 
var options = { 
   method:'DELETE', 
   endpoint:'things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb' 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //success — data will contain raw results from API call       
   } 
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
thing = app['things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb'].entity
thing.delete

The example assumes use of the Node.js module.

//If your Entity is already created, simply call destroy:
myEntity.destroy(function(err){
    if (err){
        //error
    } else {
        //success
        myEntity = null; //get rid of the object locally
    }
});
//to make a straight DELETE call, use the standard format: 
var options = { 
   method:'DELETE', 
   endpoint:'things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb' 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //success — data will contain raw results from API call       
   } 
});

Example - Response

{
    "action": "delete",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {},
    "path": "/things",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/things",
    "entities": [
        {
            "uuid": "4c469e8a-d8ed-11e0-bcc1-12313f0204bb",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "a": {
                "b": 1,
                "c": 2
            },
            "foo": "bar",
            "metadata": {
                "path": "/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org",
    "applicationName": "my-app"
}

Querying a collection

Use the GET method to retrieve the set of entities that meet the query criteria, or a maximum of 10 entities if no query filters are provided. See Queries and parameters for details on options for querying or filtering.

Request URI

GET /{org_id}/{app_id}/{collection}?{query}

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
optparam string query Query in the query language. See Queries and parameters.

Example - Request

curl -X GET "https://api.usergrid.com/my-org/my-app/things?ql=select%20*%20where%20foo%3D'bar'"

The example assumes use of the JavaScript (HTML5) SDK.

//if you are using the Collection object, simply add a query (qs) parameter:
var options = {
    type:'things',
    qs:{'ql':"select * where foo='bar'"}
};
client.createCollection(options, function (err, things) {
    if (err) {
        //error
    } else {
        //success - things now contains the collection
    }
});
//or, to make a straight request to the API: 
var options = { 
   method:'GET', 
   endpoint:'things', 
   qs = {'ql':"select * where foo='bar'"} 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //success - data will contain raw results from API call  
   } 
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
result = app['things'].query "select * where foo = 'bar'"
things = result.collection

The example assumes use of the Node.js module.

//if you are using the Collection object, simply add a query (qs) parameter:
var options = {
    type:'things',
    qs:{'ql':"select * where foo='bar'"}
}
client.createCollection(options, function (err, things) {
    if (err) {
        //error
    } else {
        //success - things now contains the collection
    }
});
//or, to make a straight request to the API: 
var options = { 
   method:'GET', 
   endpoint:'things', 
   qs = {'ql':"select * where foo='bar'"} 
}; 
client.request(options, function (err, data) { 
   if (err) { 
      //error 
   } else { 
      //success - data will contain raw results from API call  
   } 
});

Example - Response

{
    "action": "get",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {
      "filter": [
        "foo='bar'?_=1329766451716"
      ]
    },
    "path": "/things",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/things",
    "entities": [
        {
            "uuid": "4c469e8a-d8ed-11e0-bcc1-12313f0204bb",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "a": {
                "b": 1,
                "c": 2
            },
            "foo": "bar",
            "metadata": {
                "cursor": "gGkAAQEAgHMAA2JhcgCAdQAQf6_KZ1vpEeGsRiIAChxaZwCAdQAQf6-jVlvpEeGsRiIAChxaZwA",
                "path": "/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org",
    "applicationName": "my-app"
}

Updating a collection by query

Use the PUT method to update all entities that meet the specified criteria.

Request URI

PUT /{org_id}/{app_id}/{collection}?{query}

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
optparam string query Query in the query language. See Queries and parameters.

Example - Request

curl -X PUT "https://api.usergrid.com/my-org/my-app/things?ql=select%20*%20where%20foo%3D'bar'" -d '{"alpha":"bravo"}'

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'PUT',
    endpoint:'things'
    body:{ alpha:'bravo' }
    things.qs = {'ql':"select * where foo='bar'"};
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
result = app['things'].update_query {alpha: 'bravo'}, "select * where foo = 'bar'"

The example assumes use of the Node.js module.

var options = {
    method:'PUT',
    endpoint:'things'
    body:{ alpha:'bravo' }
    things.qs = {'ql':"select * where foo='bar'"};
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response

{
    "action": "put",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {},
    "path": "/things",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/things",
    "entities": [
        {
            "uuid": "4c469e8a-d8ed-11e0-bcc1-12313f0204bb",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "a": {
                "b": 1,
                "c": 2
            },
            "alpha": "bravo",
            "foo": "bar",
            "metadata": {
                "path": "/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org,
    "applicationName": "my-app"
}

Querying an entity’s collections or connections

Use the GET method to retrieve the set of entities that meet the query criteria, or a maximum of up to 10 entities if no query filters are provided. See Queries and parameters for details on options for querying or filtering.

Request URI

GET /{org_id}/{app_id}/{collection}/{entity_id}/{relationship}?{query}

Parameters

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
optparam string query Query in the query language. See Queries and parameters.

Example - Request

curl -X GET "https://api.usergrid.com/my-org/my-app/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb/likes"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'GET',
    endpoint:'things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb/likes'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb/likes']

The example assumes use of the Node.js module.

var options = {
    method:'GET',
    endpoint:'things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb/likes'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response

{
    "action": "get",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {},
    "path": "/things",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/438a1ca1-cf9b-11e0-bcc1-12313f0204bb/things",
    "entities": [
        {
            "uuid": "4c469e8a-d8ed-11e0-bcc1-12313f0204bb",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "a": {
                "b": 1,
                "c": 2
            },
            "alpha": "bravo",
            "foo": "bar",
            "metadata": {
                "path": "/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org",
    "applicationName": "my-app"
}

Adding an entity to a collection or creating a connection

Use the POST method to add an entity to a collection or create a connection between entities.

There are two common use cases, described separately as Use Case 1 and 2 below.

Request URI - Use Case 1

POST /{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_id}

Parameters - Use Case 1

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string first_entity_id Entity UUID or entity name
arg string relationship Collection name or connection type (e.g., likes)
arg uuid second_entity_id Entity UUID

If the relationship is a collection (such as a users collection for a group), this request adds the second entity to the first entity’s collection of the specified name. (Note that employees is an entity name within the groups collection.) For groups, this is how you add users as group members.

Example - Request - Use Case 1 (Add an entity to a collection)

curl -X POST "https://api.usergrid.com/my-org/my-app/groups/employees/users/jane.doe"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'POST',
    endpoint:'groups/employees/users/jane.doe'    
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['groups/employees/users/jane.doe'].post nil

The example assumes use of the Node.js module.

var options = {
    method:'POST',
    endpoint:'groups/employees/users/jane.doe'    
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response - Use Case 1 (Add an entity to a collection)

{
"action": "post",
"application": "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
"params": {},
"path": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users",
"uri": "https://api.usergrid.com/12313d14bde7-3e163873-6725-11e1-8223/3400ba10-cd0c-11e1-bcf7-12313d1c4491/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users",
"entities": [
   "uuid": "ab225e6d-d503-11e1-b36a-12313b01d5c1",
   "type": "user",
   "created": 1343074753060,
   "modified": 1350688633477,
   "activated": true,
   "city": "san Francisco",
   "email": "jane.doe@gmail.com",
   "metadata": {
     "path": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1",
     "sets": {
       "rolenames": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/rolenames",
       "permissions": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/permissions"
        },
       "collections": {
          "activities": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/activities",
          "devices": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/devices",
          "feed": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/feed",
          "groups": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/groups",
          "roles": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/roles",
          "following": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/following",
          "followers": "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/followers"
        }
      },
      "username": "jane.doe"
    }
],
"timestamp": 1331075231504,
"duration": 42,
"organization": "my-org",
"applicationName": "my-app"
}

If the relationship is not previously defined for the entity, a connection is created. For example, if the relationship is specified as likes, and that relationship has not been previously been defined for the entity, the second entity is connected to the first with a likes relationship.

Example - Request - Use Case 1 (Create a connection)

curl -X POST "https://api.usergrid.com/my-org/my-app/users/john.doe@mail.com/likes/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'POST',
    endpoint:'users/john.doe@mail.com/likes/4c469e8a-d8ed-11e0-bcc1-12313f0204bb'    
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['users/john.doe@mail.com/likes/4c469e8a-d8ed-11e0-bcc1-12313f0204bb'].post nil

The example assumes use of the Node.js module.

var options = {
    method:'POST',
    endpoint:'users/john.doe@mail.com/likes/4c469e8a-d8ed-11e0-bcc1-12313f0204bb'    
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response - Use case 1 (Create a connection)

{
    "action": "post",
    "application": "438a1ca1-cf9b-11e0-bcc1-12313f0204bb",
    "params": {},
    "path": "/users/34e26bc9-2d00-11e2-a065-02e81ae640dc/likes",
    "uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/34e26bc9-2d00-11e2-a065-02e81ae640dc/likes",
    "entities": [
        {
            "uuid": "4c469e8a-d8ed-11e0-bcc1-12313f0204bb",
            "type": "thing",
            "created": 1315357451966016,
            "modified": 1315357451966016,
            "a": {
                "b": 1,
                "c": 2
            },
            "alpha": "bravo",
            "foo": "bar",
            "metadata": {
                "path": "/things/4c469e8a-d8ed-11e0-bcc1-12313f0204bb"
            }
        }
    ],
    "timestamp": 1315357451949,
    "duration": 52,
    "organization": "my-org",
    "applicationName": "my-app"
}

Request URI - Use case 2

POST /{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_type}/{second_entity_id}

Parameters - Use Case 2

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string first_entity_id Entity UUID or entity name
arg string relationship Collection name or connection type (e.g., likes)
arg string second_entity_type Type of the second entity
arg uuid|string second_entity_id Entity UUID or entity name

Example - Request - Use Case 2

curl -X POST "https://api.usergrid.com/my-org/my-app/cats/nico/owners/user/john.doe"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'POST',
    endpoint:'cats/nico/owners/user/john.doe'    
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['cats/nico/owners/user/john.doe'].post nil

The example assumes use of the Node.js module.

var options = {
    method:'POST',
    endpoint:'cats/nico/owners/user/john.doe'    
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

When creating a connection, if you specify the entity type for the second entity, then you can create the connection using the entity’s name rather than its UUID.

Example - Response - Use Case 2

{
"action": "post",
"application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
"params": {},
"path": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners",
"uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners",
"entities": [
    {
      "uuid": "6fbc8157-4786-11e1-b2bd-22000a1c4e22",
      "type": "user",
      "name": "John Doe",
      "created": 1327517852364015,
      "modified": 1327517852364015,
      "activated": true,
      "email": "john.doe@mail.com",
      "metadata": {
        "path": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22",
        "sets": {
          "rolenames": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/rolenames",
          "permissions": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/permissions"
        },
        "collections": {
          "activities": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/activities",
          "devices": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/devices",
          "feed": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/feed",
          "groups": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/groups",
          "roles": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/roles",
          "following": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/following",
          "followers": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/followers"
        }
      },
      "picture": "https://www.gravatar.com/avatar/90f823ba15655b8cc8e3b4d63377576f",
      "username": "john.doe"
    }
 ],
"timestamp": 1331065802496,
"duration": 85,
"organization": "my-org",
"applicationName": "my-app"
}

Removing an entity from a collection or deleting a connection

Use the DELETE method to remove an entity from a collection or delete a connection between entities.

There are two common use cases, described separately as Use Case 1 and 2 below.

Request URI

DELETE /{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_id}

Parameters - Use Case 1

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string first_entity_id Entity UUID or entity name
arg string relationship Collection name or connection type (e.g., likes)
arg uuid second_entity_id Entity UUID or entity name

Example - Request - Use Case 1 (Remove an entity from a collection)

curl -X DELETE "https://api.usergrid.com/my-org/my-app/groups/employees/users/jane.doe"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'DELETE',
    endpoint:'groups/employees/users/jane.doe'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['groups/employees/users/jane.doe'].delete

The example assumes use of the Node.js module.

var options = {
    method:'DELETE',
    endpoint:'groups/employees/users/jane.doe'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response - Use Case 1 (Remove an entity from a collection)

{
  "action" : "delete",
  "application" : "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
  "params" : {
    "_": [
    "1352238031139"
    ]
  },
  "path" : "https://api.usergrid.com/d87edec7-fc4d-11e1-9917-12313d1520f1/users",
  "uri" : "https://api.usergrid.com/005056c00008-4353136f-e978-11e0-8264/d87edec7-fc4d-11e1-9917-12313d1520f1/users",
  "entities" : [ {
    "uuid" : "ab225e6d-d503-11e1-b36a-12313b01d5c1",
    "type" : "user",
    "created" : 1343074753060,
    "modified" : 1352227377822,
    "activated" : true,
    "email" : "jane.doe@gmail.com",
    "metadata" : {
      "path" : "groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1",
      "sets" : {
        "rolenames" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/rolenames",
        "permissions" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/permissions"
      },
      "collections" : {
        "activities" : "//groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/activities",
        "devices" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/devices",
        "feed" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/fee",
        "groups" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/groups",
        "roles" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/roles",
        "following" : /groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/following",
        "followers" : "/groups/d87edec7-fc4d-11e1-9917-12313d1520f1/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/follower"
      }
    },
    "username" : "jane.doe"
  } ],
  "timestamp" : 1352238030137,
  "duration" : 477,
  "organization" : "my-org",
  "applicationName": "my-app"
}

For connections, you provide the connection type. For example, if the second entity is connected to the first with a likes relationship, the delete request removes the connection.

Example - Request - Use Case 1 (Remove a connection)

curl -X DELETE "https://api.usergrid.com/my-org/my-app/users/jane.doe/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'DELETE',
    endpoint:'users/jane.doe/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['users/jane.doe/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1'].delete

The example assumes use of the Node.js module.

var options = {
    method:'DELETE',
    endpoint:'users/jane.doe/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

Example - Response - Use Case 1 (Remove a connection)

{
"action": "delete",
"application": "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
"params": {
  "_": [
    "1352240517081"
  ]
},
"path": "ab225e6d-d503-11e1-b36a-12313b01d5c1/likes",
"uri": "https://api.usergrid.com/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes",
"entities": [
   "uuid": "5c0c1789-d503-11e1-b36a-12313b01d5c1",
   "type": "user",
   "created": 134307462037,
   "modified": 1352227377728,
   "activated": true,
   "city": "san Francisco",
   "email": "jane.doe@gmail.com",
   "metadata": {
        "connecting": {
          "likes": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/connecting/likes"
        },
     "path": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1",
     "sets": {
       "rolenames": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/rolenames",
       "permissions": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/permissions"
        },
        "connections": {
          "likes": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/likes"
        },
       "collections": {
          "activities": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/activities",
          "devices": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/devices",
          "feed": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/feed",
          "groups": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/group",
          "roles": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/roles",
          "following": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/following",
          "followers": "/users/ab225e6d-d503-11e1-b36a-12313b01d5c1/likes/5c0c1789-d503-11e1-b36a-12313b01d5c1/followers"
        }
      },
      "username": "john.doe"
    }
],
"timestamp": 1352240516683,
"duration": 196,
"organization": "my-org",
"applicationName": "my-app"
}

If the relationship is a collection (such as a users collection for the group employees), the request removes the second entity from the specified first entity’s collection. In the case of the group employees, users are removed from the group.

For connections, you provide the connection type. For example, if the second entity is connected to the first with a likes relationship, the delete request removes the connection:

DELETE https://api.usergrid.com/my-org/my-app/users/ed@anuff.com/likes/4c469e8a-d8ed-11e0-bcc1-12313f0204bb

 

Request URI - Use Case 2

DELETE /{org_id}/{app_id}/{collection}/{first_entity_id}/{relationship}/{second_entity_type}/{second_entity_id}

Parameters - Use Case 2

Parameter Description
arg uuid|string org_id Organization UUID or organization name
arg uuid|string app_id Application UUID or application name
arg string collection Collection name
arg uuid|string first_entity_id Entity UUID or entity name
arg string relationship Collection name or connection type (e.g., likes)
arg string second_entity_type Type of the second entity
arg uuid|string second_entity_id Entity UUID or entity name

Example - Request - Use Case 2

curl -X DELETE "https://api.usergrid.com/my-org/my-app/cats/nico/owners/user/john.doe"

The example assumes use of the JavaScript (HTML5) SDK.

var options = {
    method:'DELETE',
    endpoint:'cats/nico/owners/user/john.doe'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

The example assumes use of the Ruby SDK.

app = Usergrid::Application.new 'https://api.usergrid.com/my-org/my-app/'
app['cats/nico/owners/user/john.doe'].delete

The example assumes use of the Node.js module.

var options = {
    method:'DELETE',
    endpoint:'cats/nico/owners/user/john.doe'
};
client.request(options, function (err, data) {
    if (err) {
        //error
    } else {
        //success - data will contain raw results from API call
    }
});

When deleting a connection, if you specify the entity type for the second entity, then you can delete the connection using the entity’s name rather than its UUID.

Example - Response - Use Case 2

{
"action": "delete",
"application": "7fb8d891-477d-11e1-b2bd-22000a1c4e22",
"params": {
     "_": [
       "1331065920372"
     ]
},
"path": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners",
"uri": "https://api.usergrid.com/22000a1c4e22-7fb8d891-477d-11e1-b2bd/7fb8d891-477d-11e1-b2bd-22000a1c4e22/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners",
"entities": [
     {
       "uuid": "6fbc8157-4786-11e1-b2bd-22000a1c4e22",
       "type": "user",
       "created": 1327517852364015,
       "modified": 1327517852364015,
       "activated": true,
       "email": "john.doe@mail.com",
       "metadata": {
         "connecting": {
           "owners": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/connecting/owners"
         },
         "path": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22",
         "sets": {
           "rolenames": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/rolenames",
           "permissions": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/permissions"
         },
         "collections": {
           "activities": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/activities",
           "devices": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/devices",
           "feed": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/feed",
           "groups": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/groups",
           "roles": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/roles",
           "following": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/following",
           "followers": "/cats/1a7c2177-67cb-11e1-8223-12313d14bde7/owners/6fbc8157-4786-11e1-b2bd-22000a1c4e22/followers"
         }
       },
       "name": "John Doe",
       "picture": "https://www.gravatar.com/avatar/90f823ba15655b8cc8e3b4d63377576f",
       "username": "john.doe"
     }
 ],
"timestamp": 1331065921042,
"duration": 45,
"organization": "my-org",
"applicationName": "my-app"
}

 

Help or comments?