Usergrid API Reference

Methods are organized by tag. Follow the methods are the [Model Definitions](#models).

Table of Contents

* [Access-Tokens](#access-tokens) * [Activities](#activities) * [Admin-Users](#admin-users) * [App-Users](#app-users) * [Entities-Collections](#entities-collections) * [Events](#events) * [Groups](#groups) * [Notifications](#notifications) * [Organizations-Applications](#organizations-applications) * [Permissions-Roles](#permissions-roles)

## Methods ### Access-Tokens

POST /management/token

Login with Admin-User or Organization credentials.

Parameters

* __login-credentials__ ([LoginCredentials](#logincredentials)) Login credentials either username/password or id/secret. (Specified in body).

Responses

__200__ * Description: Object containing access_token. * Schema: [AccessTokenResponse](#accesstokenresponse) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/token

Login with App-User or Application credentials.

Parameters

* __login-credentials__ ([LoginCredentials](#logincredentials)) Login credentials either username/password or id/secret. (Specified in body).

Responses

__200__ * Description: Object containing access_token. * Schema: [AccessTokenResponse](#accesstokenresponse) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Activities

GET /{orgId}/{appId}/groups/{groupId}/feed

Get a group's feed through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupId__ (string) One of the group's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of group's activity. * Schema: [ActivityFeed](#activityfeed) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/users/{userId}/activities

Create an activity in the activities collection.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path). * __CreateActivity__ ([CreateActivity](#createactivity)) One or more sets of activity properties. (Specified in body).

Responses

__200__ * Description: An array of user's activity. * Schema: [ActivityFeed](#activityfeed) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{appId}/users/{userId}/feed

Retrieve a user's feed through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of user's activity feed. * Schema: [ActivityFeed](#activityfeed) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Admin-Users

GET /management/orgs/{orgId}/users

Retrieve details about the admin users in an organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved Admin user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /management/orgs/{orgId}/users/{userId}

Remove an admin user from an organization through providing both Id of application and organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __userId-2__ (string) One of the user's identification which includes username, email address or UUID. (Specified in path).

Responses

__200__ * Description: An array of deleted Admin user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /management/users

Create a whole new admin user.

Parameters

* __CreateAdminUser__ ([CreateAdminUser](#createadminuser)) User entity with fields required for User creation. (Specified in body).

Responses

__200__ * Description: An API Response with a entities array containing the newly created Admin User. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/users/resetpw

Initiate the reset of an admin user's password.

Parameters

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /management/users/resetpw

Complete the password reset through getting the newpassword and the old one for identification.

Parameters

* __ResetPWMsg__ ([ResetPWMsg](#resetpwmsg)) Parameters and value for the Captcha challenge, the admin user's response to the Captcha challenge, and the admin user's email address. (Specified in body).

Responses

__200__ * Description: An array of complete messages. * Schema: [](#) __default__ * Description: * Schema: [Error](#error)

GET /management/users/{userId}

Retrieve details about an admin user.

Parameters

* __userId__ (string) One of the user's identification which includes username, real name, email address or UUID. (Specified in path).

Responses

__200__ * Description: An API Response with a entities array containing the Admin User. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /management/users/{userId}

Update the info of an admin user.

Parameters

* __userId__ (string) One of the user's identification which includes username, real name, email address or UUID. (Specified in path).

Responses

__200__ * Description: An API Response with a entities array containing the updated Admin User * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/users/{userId}/activate

Activate an admin user from a link provIded in an email notification.

Parameters

* __userId__ (string) One of the user's identification which includes username, real name, email address or UUID. (Specified in path). * __token__ (string) Activation token's query statement. (Specified in query). * __confirm_email__ (boolean) Query statement of whether send confimation email or not. (Specified in query).

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /management/users/{userId}/password

Update an admin user's password through getting the newpassword and the old one for identification.

Parameters

* __userId__ (string) One of the user's identification which includes username, real name, email address or UUID. (Specified in path). * __ResetPW__ ([ResetPW](#resetpw)) The user's old and new password. (Specified in body).

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/users/{userId}/reactivate

Reactivate an expired admin user.

Parameters

* __userId__ (string) One of the user's identification which includes username, real name, email address or UUID. (Specified in path).

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### App-Users

GET /{orgId}/{appId}/users

Retrieve users though query statement.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __queryStatement__ (string) The query statement of the User. (Specified in query).

Responses

__200__ * Description: An array of retrieved user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/users

Create a user in the users collection through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __CreateUser__ ([CreateUser](#createuser)) The properties of the user. (Specified in body).

Responses

__200__ * Description: An array of created user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{appId}/users/{userId}

Retrieve a user through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __userId-2__ (string) One of the user's identification which includes username, email address or UUID. (Specified in path).

Responses

__200__ * Description: An array of retrieved user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /{orgId}/{appId}/users/{userId}

Update a user through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of updated user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/users/{userId}

Remove a user through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of deleted user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/users/{user}/password

Set a user's password or reset the user's existing password.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __username__ (string) The username of the user. (Specified in path). * __ResetPW__ ([ResetPW](#resetpw)) The user's old and new password. (Specified in body).

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Entities-Collections

GET /{orgId}/{appId}/users/{userId}/{relation}

Retrieve a user's collections or connections through query statement.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path). * __relation__ (string) The relation between user and collections. (Specified in path). * __queryStatement__ (string) The query statement of the user. (Specified in query).

Responses

__200__ * Description: An array of user's collections info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{appId}/{collectionId}

Retrieve collection through query statement.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __queryStatement__ (string) Any values specified in the query statement should be enclosed in single-quotes. (Specified in query).

Responses

__200__ * Description: An array of retrieved collection's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /{orgId}/{appId}/{collectionId}

Update collection through query statement.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __queryStatement__ (string) Any values specified in the query statement should be enclosed in single-quotes. (Specified in query).

Responses

__200__ * Description: An array of updated collection's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/{collectionId}/{entityId1}/{relation}/{entityId2}

Add an entity to a collection through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __entityId1__ (string) The Id of the 1st entity. (Specified in path). * __relation__ (string) The relation between 1st entity and 2nd entity. (Specified in path). * __entityId2__ (string) The Id of the 2nd entity. (Specified in path).

Responses

__200__ * Description: An array of added entity's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/{collectionId}/{entityId1}/{relation}/{entityId2}

Remove an entity from a collection through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __entityId1__ (string) The Id of the 1st entity. (Specified in path). * __relation__ (string) The relation between 1st entity and 2nd entity. (Specified in path). * __entityId2__ (string) The Id of the 2nd entity. (Specified in path).

Responses

__200__ * Description: An array of deleted entity's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{appId}/{collectionId}/{entityId}

Retrieve an entity through providing Id of application, organization, collection and entity.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __entityId__ (string) One of the entity's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved entity's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /{orgId}/{appId}/{collectionId}/{entityId}

One or more properties can be updated with a single request.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __entityId__ (string) One of the entity's identification which includes name or uuid. (Specified in path). * __entityproperty__ ([CreateEntities](#createentities)) The properties of the entity. (Specified in body).

Responses

__200__ * Description: An array of updated entity's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/{collectionId}/{entityId}

Delete an entity from the collection.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __collectionId__ (string) One of the collection's identification which includes name or uuid. (Specified in path). * __entityId__ (string) One of the entity's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of deleted entity's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/{entitytype}

When a new entity is created, Usergrid will automatically create a corresponding collection if one does not already exist. The collection will automatically be named with the plural form of the entity type.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __entitytype__ (string) The entity type to create. (Specified in path). * __entityproperty__ ([CreateEntities](#createentities)) The properties of the entity. (Specified in body).

Responses

__200__ * Description: An array of created custom entity's info. * Schema: [Entity](#entity) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Events

POST /{orgId}/{appId}/events

Create an event through providing both Id of organization and application.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __CreateEvent__ ([CreateEvent](#createevent)) The required property of the event. (Specified in body).

Responses

__200__ * Description: An array of created event's info. * Schema: [Event](#event) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Groups

POST /{orgId}/{appId}/groups

Create a new group through providing both Id of organization and application.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupproperty__ ([CreateGroup](#creategroup)) The property of the created group. (Specified in body).

Responses

__200__ * Description: An array of created group's info. * Schema: [Group](#group) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/groups/{groupId}/activities

Create an activity to a specific group. In this case the activity is created in the activities collection and is accessible at the /activities endpoint to users who have the permission to read that endpoint. In addition, a relationship is established between the activity and the group, and because of that, the activity will appear in the group’s feed. The group 'owns' the activity. Also, the activity will be published in the feed of all users that are members of the group.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupId__ (string) One of the group's identification which includes name or uuid. (Specified in path). * __CreateActivity__ ([CreateActivity](#createactivity)) One or more sets of activity properties. (Specified in body).

Responses

__200__ * Description: * Schema: [ActivityFeed](#activityfeed) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/groups/{groupId}/users/{userId}

Add a user to a group through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupId__ (string) One of the group's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of added user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/groups/{groupId}/users/{userId}

Delete user from a group through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupId__ (string) One of the group's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of deleted user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{org_Id}/{app_Id}/groups/{groupId}

Get a group through through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupId__ (string) One of the group's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved group's info. * Schema: [Group](#group) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /{org_Id}/{app_Id}/groups/{groupId}

Update a group through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __groupId__ (string) One of the group's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of updated group's info. * Schema: [Group](#group) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Notifications

POST /{orgId}/{applicationId}/devices

Create notifications for user through targeting by location and providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __notification__ ([CreateNotifications](#createnotifications)) These parameters are used when forming the notification portion of the request. (Specified in body). * __queryStatement__ (string) The query statement of the location of the user. (Specified in query).

Responses

__200__ * Description: An array of created notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{applicationId}/devices/*/notifications

Create notifications for all devices. This request will target all device entities.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __notification__ ([CreateNotifications](#createnotifications)) These parameters are used when forming the notification portion of the request. (Specified in body).

Responses

__200__ * Description: An array of created notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{applicationId}/devices/{deviceId}/notifications

Create notifications for a single device. This request will target a specific device entity.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __deviceId__ (string) One of the device's identification which includes name or uuid. (Specified in path). * __notification__ ([CreateNotifications](#createnotifications)) These parameters are used when forming the notification portion of the request. (Specified in body).

Responses

__200__ * Description: An array of created notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{applicationId}/groups/{path}/notifications

Create notifications for a group. This request will target all users associated with a specific group entity.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __path__ (string) The path of the group. (Specified in path). * __notification__ ([CreateNotifications](#createnotifications)) These parameters are used when forming the notification portion of the request. (Specified in body).

Responses

__200__ * Description: An array of created notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/notifications

Retrieve one or more notifications through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path).

Responses

__200__ * Description: An array of retrieved notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

PUT /{orgId}/{applicationId}/notifications/{notificationId}

Update a Notification in order to cancel the notifcation or set a new expiration time.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __notificationId__ (string) One of the notification's identification which includes name or uuid. (Specified in path). * __notificationUpdate__ ([NotificationUpdate](#notificationupdate)) Object with Notification fields to be updated. (Specified in body).

Responses

__200__ * Description: An API Response object containing an entity of type Notification. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{applicationId}/notifications/{notificationId}

Delete an unsent Notification from the system.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __notificationId__ (string) One of the notification's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: API Response containing Notification entity that was deleted. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/receipts

Retrieve one or more receipts through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path).

Responses

__200__ * Description: An array of retrieved receipt's info. * Schema: [Receipt](#receipt) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{applicationId}/users/{userId}/notifications

Create notifications for a user. This request will target a specific user entity.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path). * __notification__ ([CreateNotifications](#createnotifications)) These parameters are used when forming the notification portion of the request. (Specified in body).

Responses

__200__ * Description: An array of created notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/{deviceId}/*/receipts

Retrieve receipts associated with one or more devices through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __deviceId__ (string) One of the device's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved receipt's info. * Schema: [Receipt](#receipt) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/{notificationId}/*/queue

Retrieve the list of devices associated with one or more notifications before the notifications are sent through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __notificationId__ (string) One of the notification's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved device's info. * Schema: [Device](#device) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/{notificationId}/*/receipts

Retrieve receipts for one or more notifications through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __notificationId__ (string) One of the notification's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved receipt's info. * Schema: [Receipt](#receipt) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/{receiptId}/*/notifications

Retrieve notifications associated with one or more receipts through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __applicationId__ (string) One of the application's identification which includes name or uuid (same as appId). (Specified in path). * __receiptId__ (string) One of the receipt's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved notification's info. * Schema: [Notification](#notification) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Organizations-Applications

POST /management/orgs

Create an organization through a form post.

Parameters

* __CreateOrg__ ([CreateOrg](#createorg)) A set of organization properties supplied through a form. (Specified in body).

Responses

__200__ * Description: An array of created Organization. * Schema: [Organization](#organization) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}

Retrieve an organization given a specified UUID or username.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of created Organization. * Schema: [Organization](#organization) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}/activate

Activate an organization from a link provIded in an email notification.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __token__ (string) Activation token. (Specified in query). * __confirm_email__ (boolean) Send confirmation email or not. (Specified in query).

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}/apps

Retrieve the applications in an organization through providing both Id of application and organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved application data. * Schema: [AppData](#appdata) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /management/orgs/{orgId}/apps/{appId}

Remove an application from an organization through providing both Id of application and organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of deleted application info. * Schema: [AppData](#appdata) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}/apps/{appId}/credentials

Retrieve the client Id and client secret credentials for an application in an organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved credentials info. * Schema: [Credential](#credential) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /management/orgs/{orgId}/apps/{appId}/credentials

Generate the client Id and client secret credentials for an application in an organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of generated credentials info. * Schema: [Credential](#credential) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}/credentials

Retrieve the credentials for an organization client.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of Credential * Schema: [Credential](#credential) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /management/orgs/{orgId}/credentials

Generate whole new credentials for an organization client.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of Credential * Schema: [Credential](#credential) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}/feed

Retrieve an organization's activity feed.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of the organization's ActivityFeed. * Schema: [ActivityFeed](#activityfeed) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/orgs/{orgId}/reactivate

Reactivate an expired organization.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of complete messages. * Schema: [Action](#action) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /management/users/{userId}/feed

Retrieve an admin user's activity feed.

Parameters

* __userId__ (string) One of the user's identification which includes username, real name, email address or UUID. (Specified in path).

Responses

__200__ * Description: An array of user's activity * Schema: [ActivityFeed](#activityfeed) __default__ * Description: Unexpected error. * Schema: [Error](#error) ### Permissions-Roles

GET /{orgId}/{appId}/roles

Retrieve the roles in an application through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An array of retrieved role's info. * Schema: [Role](#role) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/roles

Create a new role through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleproperty__ ([AddRole](#addrole)) The required properties of the role. (Specified in body).

Responses

__200__ * Description: An array of created role's info. * Schema: [Role](#role) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/roles/{roleId}/permissions

Remove permissions from a role.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleId__ (string) One of the role's identification which includes name or uuid. (Specified in path). * __Permissions__ ([Permissions](#permissions)) The query statement of the url pattern. (Specified in body).

Responses

__200__ * Description: Permissions object with array of the deleated Usergrid Permission strings. * Schema: [Permissions](#permissions) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{appId}/roles/{roleId}/users

Retrieve the users in a role through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleId__ (string) One of the role's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: An API Response with a entities array of Users. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{appId}/roles/{roleId}/users/{userId}

Add a user to a role through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleId__ (string) One of the role's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of added user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/roles/{roleId}/users/{userId}

Remove a user from a role through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleId__ (string) One of the role's identification which includes name or uuid. (Specified in path). * __userId-3__ (string) One of the user's identification which includes username or UUID. (Specified in path).

Responses

__200__ * Description: An array of deleted user's info. * Schema: [User](#user) __default__ * Description: Unexpected error. * Schema: [Error](#error)

DELETE /{orgId}/{appId}/roles/{rolename}

Remove a role through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __rolename__ (string) The name of the role. (Specified in path).

Responses

__200__ * Description: An array of deleted role's info. * Schema: [Role](#role) __default__ * Description: Unexpected error. * Schema: [Error](#error)

GET /{orgId}/{applicationId}/roles/{roleId}/permissions

Retrieve permissions for a Role.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleId__ (string) One of the role's identification which includes name or uuid. (Specified in path).

Responses

__200__ * Description: Permissions object with array of Usergrid Permission strings. * Schema: [Permissions](#permissions) __default__ * Description: Unexpected error. * Schema: [Error](#error)

POST /{orgId}/{applicationId}/roles/{roleId}/permissions

Add permissions to a role through providing all the identifications.

Parameters

* __orgId__ (string) One of the organization's identification which includes name or uuid. (Specified in path). * __appId__ (string) One of the application's identification which includes name or uuid. (Specified in path). * __roleId__ (string) One of the role's identification which includes name or uuid. (Specified in path). * __Permissions__ ([Permissions](#permissions)) Permissions object with array of Usergrid Permission strings to be added. (Specified in body).

Responses

__200__ * Description: Permissions object with array of Usergrid Permission strings. * Schema: [Permission](#permission) __default__ * Description: Unexpected error. * Schema: [Error](#error) ## Models This section lists the properties for the Usergrid Default Entities: ### AccessTokenResponse __Properties__
Name Type Description Required
access_token string Access-token that may be used on subsequent requests. false
expires_in number Time (in milliseconds) until access-token expires. false
user [User](#user) User object if login was done as a user. false
### Action __Properties__
Name Type Description Required
action string The requested action. false
status string The status of the requested action. false
timestamp number The timestamp of the requested action. false
duration number The duration of the requested action. false
token string The token required for getting an AdminUser. false
__Referring Definitions__ * [Receipt](#receipt) * [Device](#device) * [Notification](#notification) * [Role](#role) * [Event](#event) * [Group](#group) * [Credential](#credential) * [Organization](#organization) * [AppData](#appdata) * [User](#user) * [ActivityFeed](#activityfeed) ### ActivityFeed __Properties__
Name Type Description Required
entityproperty [Entity](#entity) false
category string The category of the activity. false
metadataproperty [Metadata](#metadata) false
objectproperty [Object](#object) false
title string The title of the activity. false
verb string The verb of the activity. false
published number UTC timestamp of the feed publish time. false
completeMsg [Action](#action) false
### AddRole __Properties__
Name Type Description Required
title string The title of the role. true
role name string The name of the role. true
### AppData __Properties__
Name Type Description Required
tester/sandbox string The UUID of tester/sandbox. false
tester/app1 string The UUID of tester/app1. false
tester/app2 string The UUID of tester/app2. false
completeMsg [Action](#action) false
__Referring Definitions__ * [Organization](#organization) ### CreateActivity __Properties__
Name Type Description Required
displayName string true
uuid string true
username string true
image [ImageModel](#imagemodel) false
verb string true
content string true
### CreateAdminUser __Properties__
Name Type Description Required
username string true
email string false
name string false
password string false
### CreateEntities __Properties__
Name Type Description Required
### CreateEvent __Properties__
Name Type Description Required
timestamp string true
### CreateGroup __Properties__
Name Type Description Required
title string The title of the group. true
path string The path of the group. true
### CreateNotifications An array of Notifications to be created. __Properties__
Name Type Description Required
### CreateOrg __Properties__
Name Type Description Required
organization string true
username string true
name string true
email string true
password string true
### CreateUser __Properties__
Name Type Description Required
username string true
### Credential __Properties__
Name Type Description Required
client_Id string The Id of the client. false
client_secret string The secret of the client. false
completeMsg [Action](#action) false
### Device Represents a single Device that is registered for recieving of Push Notifications. __Properties__
Name Type Description Required
uuid string Unique entity Id. false
type string Type of entity. false
name string Notifier display name. false
created number UTC timestamp in milliseconds of when the entity was created. false
modified number UTC timestamp in milliseconds of when the entity was last modified. false
metadata [Metadata](#metadata) false
completeMsg [Action](#action) false
### Entity __Properties__
Name Type Description Required
uuid string The UUID of the entity. false
type string The type of the entity. false
created number UTC timestamp of entity creation time. false
modified [Actor](#actor) UTC timestamp of entity modified time. false
metadata [Metadata](#metadata) false
name string The name of the entity. false
message string false
__Referring Definitions__ * [Role](#role) * [Event](#event) * [ActivityFeed](#activityfeed) ### Error __Properties__
Name Type Description Required
code integer false
message string false
fields object false
### Event __Properties__
Name Type Description Required
applicationName string The application name of the event. false
entity [Entity](#entity) false
url string The url of the event. false
applicationId string The application UUID of the event. false
parameters string The parameters of the event. false
organization string The title of the organization. false
completeMsg [Action](#action) false
### Group __Properties__
Name Type Description Required
uuid string The UUID of the group. false
type string The type of the group. false
created string The created Id for the group. false
modified string The modified Id for the group. false
path string The path of the group. false
metadata [Metadata](#metadata) false
title string The title of the group. false
completeMsg [Action](#action) false
### LoginCredentials __Properties__
Name Type Description Required
grant_type string Grant-type must be 'password' or 'client_credentials'. false
username string Username of user attempting login, required only if grant_type is 'password'. false
password string Password of user attempting login, required only if grant_type is 'password'. false
client_id string Client-ID portion of credentials, required only if grant_type is 'client_credentials'. false
client_secret string Client-Secret portion of credentials, required only if grant_type is 'client_credentials'. false
### Notification Represents a Push Notification that is either scheduled, finished or cancelled. __Properties__
Name Type Description Required
uuid string Unique entity Id. false
type string Type of entity. false
created number UTC timestamp in milliseconds of when the entity was created. false
modified number UTC timestamp in milliseconds of when the entity was last modified. false
payloads string The push notifications to be delivered. true
errorMessage string Error message returned by the notification service (APNs or GCM) if the notification fails entirely. false
scheduled boolean Whether the notification is currently scheduled for delivery. false
state string The current delivery status of the notification 'FINISHED', 'SCHEDULED' or 'CANCELED'. false
metadata [Metadata](#metadata) false
completeMsg [Action](#action) false
### NotificationUpdate Represents fields that may be updated on a Notification to cause changes in Push Notification processing. __Properties__
Name Type Description Required
canceled boolean Setting this field to true will cancel a Notification, if it has not yet been sent. false
deliver number Specifies the UNIX timestamp time at which the Notification should be sent. false
expired number Specifies the UNIX timestamp time at which this Notification has expired. false
### Organization __Properties__
Name Type Description Required
applicationId string The application Id of the owner. false
username string The username of the owner. false
name string The name of the owner. false
email string The email of the owner. false
activated boolean Indicate whether the account is activated or not. false
disabled boolean Indicate whether the account is disabled or not. false
uuid string The UUID of the owner. false
adminUser boolean Indicate whether the use is a adminUser or not. false
displayEmail string The display of the email of the owner. false
htmldisplayEmail string The HTML display of the email of the owner. false
orgname string The name of the organization. false
orguuId string The UUID of the organization. false
applicationdata [AppData](#appdata) false
completeMsg [Action](#action) false
### Permissions Represents a set of Permissions associated with a User or a Role, each being a Usergrid Permission String. __Properties__
Name Type Description Required
application string The UUID of the associated application. false
applicationName string The name of the associated application. false
organization string The name of the associated organization. false
data array Array of strings each being a Usergrid Permission String. true
### Receipt Represents response received from Notification service indicating success or failure. __Properties__
Name Type Description Required
uuid string Unique entity Id. false
type string Type of entity. false
created number UTC timestamp in milliseconds of when the entity was created. false
modified number UTC timestamp in milliseconds of when the entity was last modified. false
payloads string The push notifications to be delivered. false
errorMessage string Error message returned by the notification service (APNs or GCM) if the notification fails entirely. false
errorCode string Error code returned by the notification service. false
sent number UTC timestamp in milliseconds for when the notification was sent. false
metadata [Metadata](#metadata) false
completeMsg [Action](#action) false
### ResetPW __Properties__
Name Type Description Required
password string true
newpassword string true
### ResetPWMsg __Properties__
Name Type Description Required
recaptcha_response string Parameters and value for the Captcha challenge. true
recaptcha_challenge string The admin user's response to the Captcha challenge. true
email string true
### Role __Properties__
Name Type Description Required
applicationName string The application name of the event. false
count number The numebr of the roles. false
entity [Entity](#entity) false
url string The url of the event. false
applicationId string The application UUID of the event. false
parameters string The parameters of the event. false
organization string The title of the organization. false
completeMsg [Action](#action) false
path string The path of the role. false
### User Represents a User account which may be a user within an Application's User collection, or may be an Admin User. __Properties__
Name Type Description Required
applicationId string The application Id of a user. false
username string The username of a user. false
name string The name of a user. false
email string The email of a user. false
activated boolean Indicate whether the account is activated or not. false
disabled boolean Indicate whether the account is disabled or not. false
uuid string The UUID of a user. false
adminUser boolean Indicate whether the use is a adminUser or not. false
displayEmail string The display of the email of a user. false
htmldisplayEmail string The HTML display of the email of a user. false
organization string The organization of the user. false
picture string The uri of the user's picture. false
uri string The uri of the user. false
path string The path of the user. false
completeMsg [Action](#action) false
__Referring Definitions__ * [AccessTokenResponse](#accesstokenresponse) ## Sub-Types This section lists the properties for sub-types used in Usergrid Default Entities. ### Collections __Properties__
Name Type Description Required
activities string false
feed string false
roles string false
users string false
__Referring Definitions__ * [Metadata](#metadata) ### ImageModel __Properties__
Name Type Description Required
duration number false
height number false
url string false
wIdth integer false
email string false
__Referring Definitions__ * [CreateActivity](#createactivity) ### Metadata __Properties__
Name Type Description Required
cursor string The cursor of the metadata. false
path string The path of the metadata. false
sets [Sets](#sets) false
collections [Collections](#collections) false
__Referring Definitions__ * [Receipt](#receipt) * [Device](#device) * [Notification](#notification) * [Notifier](#notifier) * [Group](#group) * [Entity](#entity) * [ActivityFeed](#activityfeed) ### Object __Properties__
Name Type Description Required
displayname string The display of the name of the object. false
objecttype string The type of the object. false
objectuuId string The UUID of the object. false
entitytype string The entitytype of the object. false
__Referring Definitions__ * [ActivityFeed](#activityfeed) ### Sets __Properties__
Name Type Description Required
rolenames string false
permissions string false
__Referring Definitions__ * [Metadata](#metadata)