http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2a55601f/content/docs/orgs-and-apps/managing.html ---------------------------------------------------------------------- diff --git a/content/docs/orgs-and-apps/managing.html b/content/docs/orgs-and-apps/managing.html new file mode 100644 index 0000000..817a6f2 --- /dev/null +++ b/content/docs/orgs-and-apps/managing.html @@ -0,0 +1,340 @@ + + + + + + + + + + + Organization & application management — Apache Usergrid 1.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+
+ +
+

Organization & application management

+

Your application can use the App Services API to request a variety of +management operations on App Services resources. For example, your +application can request an access token to use in operations on entities +and collections. Or it can create an organization to contain the +applications, entities, and collections for a company, team, or project.

+

Your application makes requests through the API using HTTP methods such +as GET, POST, PUT, and DELETE, and specifies the pertinent resource URL. +For management operations, the URL begins with /management/. See +Using the API for general +usage information, such as how to construct an API request.

+

The following table lists and describes resources accessible through the +App Services API on which your application can perform management +operations. Click on a resource for further details about the resource +and its methods.

+ + + + + + + + + + + + + + + + + + + + + +

Resource

+

Description

+

Access +Token

+

Carries the credentials and authorization information needed to access +other resources through the Usergrid API.

+

Client +Authorization

+

Authorizes the client.

+

Organization

+

The highest level structure in the Usergrid data hierarchy.

+

Admin User

+

A user that has full access to perform any operation on all organization +accounts of which the user is a member.

+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2a55601f/content/docs/orgs-and-apps/organization.html ---------------------------------------------------------------------- diff --git a/content/docs/orgs-and-apps/organization.html b/content/docs/orgs-and-apps/organization.html new file mode 100644 index 0000000..47f0c4f --- /dev/null +++ b/content/docs/orgs-and-apps/organization.html @@ -0,0 +1,1017 @@ + + + + + + + + + + + Organization — Apache Usergrid 1.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+
+ +
+

Organization

+

An organization represents the highest level of the API Services BaaS +data hierarchy. It contains applications (and the entities and +collections they contain) and is associated with one or more +administrators. An organization can be representative of a company, +team, or project. It allows multiple applications to be shared within +the organization with other administrators.

+
+

Creating an organization

+

Use the POST method to create an organization through a form post.

+
+

Request URI

+
POST /organizations|orgs {request body}
+
+
+

Parameters

+

Expected to be sent form data in the body of the request.

+ ++++ + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription
organization (string)The name of the organization.
username (string)The username of the administrator.
name (string)The name of the administrator.
email (string)The email address of the administrator.
password (string)The password of the administrator.
+
+
+

Example - Request

+
curl -X -i POST "https://api.usergrid.com/management/orgs" -d '{"password":"test12345","email":"tester123@hotmail.com","name":"test","username":"test123","organization":"testorg"}'
+
+
+
+
+

Example - Response

+
{
+  "action": "new organization",
+  "status": "ok",
+  "data":  {
+    "owner":  {
+      "applicationId": "00000000-0000-0000-0000-000000000001",
+      "username": "tester123",
+      "name": "test",
+      "email": "tester123@hotmail.com",
+      "activated": false,
+      "disabled": false,
+      "uuid": "48c92c73-0d7e-11e2-98b9-12313d288ee0",
+      "adminUser": true,
+      "displayEmailAddress": "tester123 <tester123@hotmail.com>",
+      "htmldisplayEmailAddress": "tester123 <<a href="mailto:tester123@hotmail.com">tester123@hotmail.com</a>>"
+    },
+    "organization":  {
+      "name": "testorg",
+      "uuid": "5de0bb69-0d7f-11e2-87b9-12313d288ff0"
+    }
+  },
+  "timestamp": 1349284674173,
+  "duration": 21376
+}
+
+
+
+
+
+

Getting an organization

+

Use the GET method to retrieve an organization given a specified UUID or +username.

+
+

Request URI

+
GET /organizations|orgs/{org_name}|{uuid}
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
org_name|arg uuidOrganization name or organization UUID.
+

Note: You also need to provide a valid access token with the API call. +See Authenticating users and application +clients +for details.

+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg"
+
+
+
+
+

Example - Response

+
{
+  "timestamp": 1349286861746,
+  "duration": 18,
+  "organization":  {
+    "users":  {
+      "tester123":  {
+        "applicationId": "00000000-0000-0000-0000-000000000001",
+        "username": "tester123",
+        "name": "test",
+        "email": "tester123@hotmail.com",
+        "activated": true,
+        "disabled": false,
+        "uuid": "327b527f-cd0c-11e1-bcf7-12313d1c4491",
+        "adminUser": true,
+        "displayEmailAddress": "tester123 <tester123@hotmail.com>",
+        "htmldisplayEmailAddress": "tester123 <<a href="mailto:tester123@hotmail.com">tester123@hotmail.com</a>>"
+      }
+    },
+    "name": "testorg",
+    "applications":  {
+      "tester123/sandbox": "3400ba10-cd0c-11e1-bcf7-12313d1c4491",
+      "tester123/testapp1": "be08a5f9-fdd3-11e1-beca-12313d027471",
+      "tester123/testapp2": "cede5b7e-fe90-11e1-95c8-12313b122c56"
+    },
+    "uuid": "33dd0563-cd0c-11e1-bcf7-12313d1c4491"
+}
+
+
+
+
+
+

Activating an organization

+

Use the GET method to activate an organization from a link provided in +an email notification.

+
+

Request URL

+
GET /organizations|orgs/{org_name}|{uuid}/activate?token={token}&confirm={confirm_email}
+
+
+

Parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription
org_name|arg uuidOrganization name or organization UUID.
tokenActivation token (supplied via email).
confirm_email(boolean) Send confirmation email (false is the default).
+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg/activate?token=33dd0563-cd0c-11e1-bcf7-12313d1c4491"
+
+
+
+
+

Example - Response

+
{
+  "action": "activate organization",
+  "timestamp": 1337928462810,
+  "duration": 3342
+}
+
+
+
+
+
+

Reactivating an organization

+

Use the GET method to reactivate an organization.

+
+

Request URI

+
GET /organizations|orgs/{org_name}|{uuid}/reactivate
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
string org_name|arg uuidOrganization name or organization UUID.
+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg/reactivate"
+
+
+
+
+

Example - Response

+
{
+  "action": "reactivate organization",
+  "timestamp": 1349385280891,
+  "duration": 3612
+}
+
+
+
+
+
+

Generating organization client credentials

+

Use the POST method to generate new credentials for an organization +client.

+
+

Request URI

+
POST /organizations|orgs/{org_name}|{uuid}/credentials
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
string org_name|arg uuidOrganization name or organization UUID.
+

Note: You also need to provide a valid access token with the API +call. Authenticating users and application +clients +for details.

+
+
+

Example - Request

+
curl -X POST "https://api.usergrid.com/management/orgs/credentials"
+
+
+
+
+

Example - Response

+
{
+  "action": "generate organization client credentials",
+  "timestamp": 1349385795647,
+  "duration": 7,
+  "credentials":  {
+    "client_id": "c2V7N61DY90MCdG78xIxPRxFdQ",
+    "client_secret": "c2V7WEdXIutZWEkWdySLCt_lYDFVMMN"
+  }
+}
+
+
+
+
+
+

Retrieving organization client credentials

+

Use the GET method to retrieve the credentials for an organization +client.

+
+

Request URL

+
GET /organizations|orgs/{org_name}|{uuid}/credentials
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
string org_name|arg uuidOrganization name or organization UUID.
+

Note: You also need to provide a valid access token with the API +call. See Authenticating users and application +clients +for details.

+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg/credentials"
+
+
+
+
+

Example - Response

+
{
+  "action": "get organization client credentials",
+  "timestamp": 1349386672984,
+  "duration": 690,
+  "credentials":  {
+    "client_id": "c2V7N61DY90MCdG78xIxPRxFdQ",
+    "client_secret": "c2V7WEdXIutZWEkWdySLCt_lYDFVMMN"
+  }
+}
+
+
+
+
+
+

Getting an organization’s activity feed

+

Use the GET method to get an organization’s activity feed.

+
+

Request URI

+
GET /organizations|orgs/{org_name}|{uuid}/feed
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
string org_name|arg uuidOrganization name or organization UUID.
+

Note: You also need to provide a valid access token with the API +call. See Authenticating users and application +clients +for details.

+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg/feed"
+
+
+
+
+

Example - Response

+
{
+ {
+  "action": "get organization feed",
+  "status": "ok",
+  "entities":  [
+     {
+      "uuid": "cf4d981c-fe90-11e1-95c8-12313b122c56",
+      "type": "activity",
+      "created": 1347643370454,
+      "modified": 1347643370454,
+      "actor":  {
+        "displayName": "tester123",
+        "objectType": "person",
+        "uuid": "327b527f-cd0c-11e1-bcf7-12313d1c4491",
+        "entityType": "user"
+      },
+      "category": "admin",
+      "metadata":  {
+        "cursor": "gGkAAQMAgGkABgE5xc3r1gCAdQAQz02YHP6QEeGVyBIxOxIsVgCAdQAQz3SoH_6QEeGVyBIxOxIsVgA",
+        "path": "/groups/33dd0563-cd0c-11e1-bcf7-12313d1c4491/feed/cf4d981c-fe90-11e1-95c8-12313b122c56"
+      },
+"object":  {
+        "displayName": "testapp2",
+        "objectType": "Application",
+        "uuid": "cede5b7e-fe90-11e1-95c8-12313b122c56",
+        "entityType": "application_info"
+      },
+      "published": 1347643370454,
+      "title": "<a mailto="mailto:tester123@hotmail.com">tester123 (tester123@hotmail.com)</a> created a new application named testapp2",
+      "verb": "create"
+    },...
+,
+  "timestamp": 1349387253811
+}
+
+
+
+
+
+

Getting the applications in an organization

+

Use the GET method to retrieve the applications in an organization.

+
+

Request URI

+
GET /organizations|orgs/{org_name}|{uuid}/applications|apps
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
string org_name|arg uuidOrganization name or organization UUID.
+

Note: You also need to provide a valid access token with the API +call. See Authenticating users and application +clients +for details.

+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg/apps"
+
+
+
+
+

Example - Response

+
{
+  "action": "get organization application",
+  "data":  {
+    "testorg/sandbox": "3500ba10-cd0c-11e1-bcf8-12313d1c5591",
+    "testorg/testapp1": "be09a5f9-fdd3-11e1-beca-12313d027361",
+    "testorg/testapp2": "cede5b8e-fe90-11e1-65c8-12313b111c56"
+  },
+  "timestamp": 1349815338635,
+  "duration": 22
+}
+
+
+
+
+
+

Adding an admin user to an organization

+

Use the PUT method to add an existing admin user to an organization.

+
+

Request URI

+
PUT /organizations|orgs/{org_name}|{org_uuid}/users/{username|email|uuid}
+
+
+

Parameters

+ ++++ + + + + + + + + + + + + + +
ParameterDescription
string org_name|arg org_uuidOrganization name or organization UUID.
string username|string email|arg uuidUser name, user email address, or user UUID.
+
+
+

Example - Request

+
curl -X PUT "https://api.usergrid.com/management/orgs/testorg/users/test123"
+
+
+
+
+

Example - Response

+
{
+  "action": "add user to organization",
+  "status": "ok",
+  "data":  {
+    "user":  {
+      "applicationId": "00000000-0000-0000-0000-000000000001",
+      "username": "tester123",
+      "name": "test",
+      "email": "tester123@hotmail.com",
+      "activated": true,
+      "disabled": false,
+      "uuid": "335b527f-cd0d-11e1-bef8-12331d1c5591",
+      "adminUser": true,
+      "displayEmailAddress": "tester123 <tester123@hotmail.com>",
+      "htmldisplayEmailAddress": "tester123 <<a href="mailto:tester123@hotmail.com">tester123@hotmail.com</a>>"
+    }
+  },
+  "timestamp": 1349390189106,
+  "duration": 11808
+}
+
+
+
+
+
+

Getting the admin users in an organization

+

Use the GET method to retrieve details about the admin users in an +organization.

+
+

Request URI

+
GET /organizations|orgs/{org_name}|{org_uuid}/users
+
+
+

Parameters

+ ++++ + + + + + + + + + + +
ParameterDescription
org_name|arg org_uuidOrganization name or organization UUID.
+
+
+

Example - Request

+
curl -X GET "https://api.usergrid.com/management/orgs/testorg/users"
+
+
+
+
+

Example - Response

+
{
+  "action": "get organization users",
+  "data":  {
+    "user":  {
+      "applicationId": "00000000-0000-0000-0000-000000000001",
+      "username": "tester123",
+      "name": "test",
+      "email": "tester123@hotmail.com",
+      "activated": true,
+      "disabled": false,
+      "uuid": "335b527f-cd0d-11e1-bef8-12331d1c5591",
+      "adminUser": true,
+      "displayEmailAddress": "tester123 <tester123@hotmail.com>",
+      "htmldisplayEmailAddress": "tester123 <<a href="mailto:tester123@hotmail.com">tester123@hotmail.com</a>>"
+    }
+  },
+  "timestamp": 13494542201685,
+  "duration": 10
+}
+
+
+
+
+
+

Removing an admin user from an organization

+

Use the DELETE method to remove an admin user from an organization. All +organizations must have a minimum of one user with org admin privileges. +If you attempt to delete the last org admin in an organization, the API +will return a 400 Bad Request error.

+
+

Request URI

+
DELETE /organizations|orgs/{org_name}|{org_uuid}/users/{username|email|uuid}
+
+
+

Parameters

+ ++++ + + + + + + + + + + + + + +
ParameterDescription
org_name|arg org_uuidOrganization name or organization UUID.
username|string email|arg uuidUser name, user email address, or user UUID.
+
+
+

Example - Request

+
curl -X DELETE "https://api.usergrid.com/management/orgs/testorg/users/test123"
+
+
+
+
+

Example - Response

+
{
+  "action": "remove user from organization",
+  "status": "ok",
+  "data":  {
+    "user":  {
+      "applicationId": "00000000-0000-0000-0000-000000000001",
+      "username": "tester123",
+      "name": "test",
+      "email": "tester123@hotmail.com",
+      "activated": true,
+      "disabled": false,
+      "uuid": "335b527f-cd0d-11e1-bef8-12331d1c5591",
+      "adminUser": true,
+      "displayEmailAddress": "tester123 <tester123@hotmail.com>",
+      "htmldisplayEmailAddress": "tester123 <<a href="mailto:tester123@hotmail.com">tester123@hotmail.com</a>>"
+    }
+  },
+  "timestamp": 1349453590005,
+  "duration": 727
+}
+
+
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2a55601f/content/docs/overview/index.html ---------------------------------------------------------------------- diff --git a/content/docs/overview/index.html b/content/docs/overview/index.html deleted file mode 100644 index d512f30..0000000 --- a/content/docs/overview/index.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - Apache Usergrid (incubating) — App Security Overview - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
- - -

App Security Overview

-

Any app you put into production should feature security that protects your app, your users, and your app’s data. Implementing security means taking steps in your mobile app’s code and in your Apache Usergrid application.

-

Warning: When you register for Apache Usergrid, you get a sandbox application that you can use to try things out. This application is not for use in production. By default, the sandbox application is not protected by any security measures whatsoever. Use the sandbox only for experimentation, and only with data that isn’t in any way sensitive.

-

When securing your app, follow these high-level steps:

-
    -
  1. In your Apache Usergrid application, use the admin portal to define your app users’ access to your app’s data and features. You do this by creating permission rules, then associating those rules with your users. For more information, see Managing access by defining permission rules.
  2. -
  3. In your app, write code through which your app’s users can verify who they are to your Apache Usergrid application. You do this by writing code that uses their username and password as credentials to initially authenticate with the Apache Usergrid application, then uses a token thereafter. (This authentication style supports the OAuth 2.0 model.) For more information, see Authenticating users and application clients.
  4. -
  5. Be sure to use coding best practices that help ensure that your app is protected from malicious attacks. For more information, see Securing your app.
  6. -
-

The following illustration describes these high-level areas.

-
- -
-
-
-
-
-
-
-
- Questions? Please do ask on the mailing-lists!
- -
-
-
-
- - - - - - - - - - - -