Stormpath is a cloud Identity and Access Management service that automates user management and security for your applications. Using Stormpath, an application can easily and safely automate user authentication, access control, and common security workflows like Password Reset and Account Email Verification.
Stormpath secures user credentials with military-grade encryption and security best-practices so you never need to worry about managing passwords again. If you have existing identity systems, we have you covered there too - Stormpath integrates with LDAP and Active Directory, even if they are behind a corporate firewall.
Stormpath is a highly available clustered service that can easily handle millions of user accounts. It is accessible via a web UI console or REST+JSON API for developers. If you don't want to use the REST+JSON API directly, there are supported API client libraries for Ruby, PHP, and the JVM (Java, Scala, etc), with more languages on the way.
A set of quick, simple tutorials to help you connect to the Stormpath API, register your application and start securely authenticating users.
A comprehensive guide to Stormpath IAM and its key features and functions.
Our java sample app covers Stormpath's basic features. Download and play with the code to see how Stormpath can work for you.
SDKs for PHP, Ruby and Java help you implement Stormpath user management quickly. C#, Node.js, and Python coming soon.
Our handy reference guide covers each public REST endpoint, what operations can be run against it, and how to use it.
Our engineers and support team are logged into IRC channel during the day (PST). Point your favorite IRC client at irc.mibbit.net:6667 and join #stormpath or simply click here to connect to the Stormpath IRC-channel.
You can also click the "Contact us" button (below, to the right) to chat or leave a message.
Stormpath's Quickstart guides are short, simple guides to help you get started using Stormpath API and Admin Console.
This guide shows how to succesfully communicate with the Stormpath REST API.
Automate security features for your application by registering it with Stormpath.
Learn how to authenticate your application users with the Stormpath REST API.
Before you can use Stormpath, you must first sign up for the service. Sign-up and Developer-tier usage is 100% free, and no credit card is required.
After completing this process, you are ready to use Stormpath for free!
If you need to make REST API requests to Stormpath, those requests must be authenticated with an API Key.
API keys are personally assigned to you and only you and should never be shared with anyone else, not even co-workers (co-workers should have their own API Keys if they need to communicate with Stormpath).
Here's how you get an API Key:


apiKey.id = 144JVZINOF5EBNCMG9EXAMPLE apiKey.secret = lWxOiKqKPNwJmSldbiSkEbkNjgh2uRSNAb+AEXAMPLE
This quickstart guide will help you connect to Stormpath's REST API quickly.
For example, if using curl:
curl --user YOUR_API_KEY_ID:YOUR_API_KEY_SECRET --header "Accept: application/json" https://api.stormpath.com/v1/tenants/current
or perhaps httpie (which assumes application/json by default):
http -a YOUR_API_KEY_ID:YOUR_API_KEY_SECRET https://api.stormpath.com/v1/tenants/current
If you see a successful JSON response for your Tenant data, you've successfully made an API request!
You are now ready to make REST requests to access all of your data via our full REST API.
To test the connection via one of the Stormpath SDK's you will need to create a Client instance with your API key, and retrieve your current tenant.
The following examples assume the user already has the specific SDK installed.
Using Java SDK:
(The Java SDK documentation is here: https://github.com/stormpath/stormpath-sdk-java/wiki)
import com.stormpath.sdk.client.*;
...
String path = System.getProperty("user.home") + "/.stormpath/apiKey.properties";
//assuming that the apiKey.properties file with your Stormpath API key was saved in this location with read access
Client client = new ClientBuilder().setApiKeyFileLocation(path).build();
Tenant tenant = client.getCurrentTenant();
Using Ruby SDK:
(The Ruby SDK documentation is here: https://github.com/stormpath/stormpath-sdk-ruby/wiki)
require "stormpath-sdk" include Stormpath::Client ... api_key_file = '/home/myhomedir/.stormpath/apiKey.yml' #assuming that the apiKey.yml file with your Stormpath API key (in YAML format) was saved in this location with read access client = ClientBuilder.new.set_api_key_file_location(api_key_file).build tenant = client.current_tenant
Using PHP SDK:
(The PHP SDK documentation is here: https://github.com/stormpath/stormpath-sdk-php/wiki)
$path = '/home/myhomedir/.stormpath/apiKey.yml'; //assuming that the apiKey.yml file with your Stormpath API key (in YAML format) was saved in this location with read access $builder = new Services_Stormpath_Client_ClientBuilder; $client = $builder->setApiKeyFileLocation($path)->build(); $tenant = $client->getCurrentTenant();
If you are NOT using one of the official Stormpath SDKs, you will need to configure your rest client for authentication and also to accept JSON content.
Depending on your REST library or client, you accept JSON typically by setting the Accept header with a value of application/json:
Accept: application/json
This ensures that the Stormpath API Server will respond with JSON data.
Once your REST client can authenticate and accept JSON, you will be able to access all of your data via our full REST API.
This guide shows how to register an application with Stormpath. Registering an application quickly enables Stormpath's full user management features and security workflows for that application.
This guide assumes that you have already signed up for Stormpath.






Congratulations! You have registered your first application in Stormpath.
You will probably want to make sure users can log in to your application. Feel free to try that next:
This guide shows you how to use Stormpath to log in (authenticate) your application's user accounts.
To authenticate users in an application, it is assumed that you have already:
When you use Stormpath's REST API (via cURL, httpie, or one of our wrapper SDKs) to authenticate your application's user accounts, the basic flow is as follows:
Your application's loginAttempts URL is the application's Stormpath REST URL with /loginAttempts added to the end. For example, if your application's Stormpath REST URL is:
https://api.stormpath.com/v1/applications/dRvH4y0nT6uNl6gEXAMPLE
then your application's login attempts URL is the following:
https://api.stormpath.com/v1/applications/dRvH4y0nT6uNl6gEXAMPLE/loginAttempts
This loginAttempts URL will be referenced in the instructions below.
When your user logs into your application, they submit their username (or email address) and password directly to you. For example, they might visit https://www.myAwesomeApplication.com/login, fill out a username/password form, and hit 'submit'.
Collect the user's submitted username (or email address) and password. These are the raw text values submitted by your application's end user. You can collect them in any way you wish (web form, mobile interface, desktop application, etc).
Web applications MUST collect usernames/emails and passwords over HTTPS to ensure security. (e.g. https://myapplication.com/login). DO NOT use http for collecting login information.
Concatenate the username, the colon character ':', and the raw text password into a String. Get the String's UTF-8 bytes, and then Base64 encode the bytes. For example:
byte[] bytes = getUTF8Bytes( usernameOrEmailString + ":" + rawPasswordString)
String encoded = base64Encode( bytes )
This encoded value will be used in the next step.
After constructing the encoded value above, send an HTTP POST it to the application's loginAttempts URL with the following JSON body (don't forget to set the Accept and Content-Type headers!):
POST /v1/applications/dRvH4y0nT6uNl6gEXAMPLE/loginAttempts
Accept: application/json
Content-Type: application/json
{
"type": "basic",
"value": "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
If the login attempt is successful, a 200 OK response will be returned with a link to the successfully authenticated Account:
Example Login Attempt success response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"account": {
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02bAb"
}
}
If the login attempt fails, a 400 Bad Request will be returned with an error payload explaining the details of why the attempt failed:
Example Login Attempt failure response:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
{
"status": 400,
"code": 400,
"message": "Invalid username or password.",
"developerMessage": "Invalid username or password.",
"moreInfo": "mailto:support@stormpath.com"
}
For more information, see the complete LoginAttempt REST API documentation.
This example assumes you are using the Stormpath Java SDK.
Use your application's REST URL as the href variable value:
import com.stormpath.sdk.client.*;
import com.stormpath.sdk.ds.*;
import com.stormpath.sdk.application.*;
import com.stormpath.sdk.account.*;
import com.stormpath.sdk.authc.*;
...
String userHome = System.getProperty("user.home");
String path = userHome + "/.stormpath/apiKey.properties";
Client client = new ClientBuilder().setApiKeyFileLocation(path).build();
DataStore dataStore = client.getDataStore();
String href = "https://api.stormpath.com/v1/applications/APP_UID_HERE";
Application application = dataStore.getResource(href, Application.class);
// when the account is authenticated, it produces an AuthenticationResult
String un = "usernameOrEmail"; //get from form
String pw = "password"; //get from form
AuthenticationRequest request = new UsernamePasswordRequest(un,pw);
AuthenticationResult result = application.authenticateAccount(request);
// from the result instance we get the authenticated Account
Account account = result.getAccount();
This example assumes you are using the Stormpath Ruby SDK.
Use your application's REST URL as the href variable value:
require "stormpath-sdk" include Stormpath::Client include Stormpath::Resource include Stormpath::Authentication ... api_key_file = '/home/myhomedir/.stormpath/apiKey.yml' client = ClientBuilder.new.set_api_key_file_location(api_key_file).build href = 'https://api.stormpath.com/v1/applications/APP_UID_HERE' application = client.data_store.get_resource href, Application # when the account is authenticated, it produces an AuthenticationResult request = UsernamePasswordRequest.new 'usernameOrEmail', 'password' result = application.authenticate_account request # from the result, we obtain the authenticated Account account = result.get_account
This example assumes you are using the Stormpath PHP SDK.
Use your application's REST URL as the $href variable value:
$path = '/home/myhomedir/.stormpath/apiKey.yml'; $builder = new Services_Stormpath_Client_ClientBuilder; $client = $builder->setApiKeyFileLocation($path)->build(); $href = 'https://api.stormpath.com/v1/applications/APP_UID_HERE'; $ds = $client->getDataStore(); $application = $ds->getResource($href, Services_Stormpath::APPLICATION); // when the account is authenticated, it produces an AuthenticationResult $un = 'usernameOrEmail'; $pw = 'rawPassword'; $req = new Services_Stormpath_Authc_UsernamePasswordRequest($un,$pw); $authResult = $application->authenticateAccount($req); // from the result, we obtain the authenticated Account $account = $authResult->getAccount();
The Stormpath Product Guide is comprehesive guide to our Identity and Access Management (IAM) product and its key features and functions.
A high-level overview of Stormpath IAM and its key concepts.
Create and manage directories of user accounts.
Register and manage applications that use Stormpath IAM.
Add and manage user accounts in your Stormpath directories.
Create and manage user groups and roles, as well as their member accounts.
Account - Sometimes called 'users', an Account is more specifically a unique identity within a Directory. Stormpath does not call these Users because the word 'user' usually implies a person. Accounts however can also represent 3rd-party software or non-human clients. But you can essentially think of an account as Stormapth's 'User' concept. Accounts may be used login to Applications.
API Key - A unique ID paired with a very secret value. The ID + the secret together are an API Key. API Keys are used by software applications to communicate with Stormpath IAM via the Stormpath REST API.
Application - A software application that can communicate with Stormpath. This is usually your real world application that you are building, such as a web application, but it can also be infrastructural software, like a unix machine or web server.
Authentication - the act of proving someone (or something) is actually who they say they are. When you authenticate an account, you have a high degree of certainty that the account identity is legitimate.
Authorization - (aka Access Control): the process of managing and enforcing access to protected resources, functionality or behavior.
Directory - A collection of accounts and groups. Administrators can use different directories to create silos of accounts. For example, you might store your customers in one directory and your employees in another.
Directory Agent - A Stormpath software application that you install in your corporate network to securely synchronize an on-premise Directory like LDAP or Active Directory into a Stormpath Cloud Directory.
Directory Mirroring - Securely replicating selected data from one directory (called the source directory) into another directory (the 'target' or 'mirrored' directory) for the purposes of authentication and access control. The source directory is the authoritative source for all data. Changes are propagated to the target/mirror directory for convenience and performance benefits.
Group - A collection of accounts within a directory. In Stormpath this serves the same purpose of a 'Role' for those familiar with Role-Based Access Control.
IAM - Identity and Access Manager. The name of the core Stormpath product, accessed via API or web console.
Identity Management - the management of individual identities, their authentication, authorization, and permissions to increase security and productivity and decrease cost, downtime, and repetitive tasks.
Login Source - A Directory or Group associated with an Application for the purpose of account authentication. Accounts within Login Sources that are associated with an Application may login to that Application.
Role - A classification of accounts, like 'administrators' or 'employees'. In Stormpath IAM, roles are represented as Groups. There is no concrete role concept - the word 'Role' is effectively a synonym for 'Group' in Stormpath.
Role-Based Access Control (aka RBAC) - The act of controlling access to protected resources or behavior based the groups assigned to a particular account. In Stormpath, the word 'Group' is used instead of 'role'. You perform RBAC using Stormpath Groups.
REST API - a software architectural style enabling data transfer and functionality via common web-based communication protocols. Stormpath provides a REST API for Tenants so they may easily integrate Stormpath with their own software applications.
Tenant - A private partition within Stormpath that contains all of your data and settings—namely your applications, directories, groups and accounts. When you sign up for Stormpath, a tenant is created for you. You can add other user accounts (for example, for your co-workers) to your tenant to help you manage your data. Many companies like to have one tenant where they can easily manage all of their applications, directories and accounts across their organization for convenience.

The Stormpath Administration Console allows authorized administrators to:
To access the Stormpath Administration Console, visit https://api.stormpath.com/login
The Stormpath API offers authorized developers and administrators programmatic access to:
For more detailed documentation on the Stormpath API, visit the API Reference Documentation.
Directories contain authentication and authorization information about users, groups and roles. Stormpath supports an unlimited number of directories. Administrators can use different directories to create silos of users. For example, you might store your customers in one directory and your employees in another.
A directory can be one of the following types:
Once you have created a directory in Stormpath, you can map it to applications. Stormpath will then route an application's login requests to the directory. Modification of directory entities (users accounts, groups and roles) can be done via the Stormpath Administration Console or Stormpath REST API.
You can also map multiple directories to an application, providing the application with a single view of multiple directories in a specified order.
Directories managed by Stormpath can be listed through the console user interface or programmatically via API and SDKs.
Contents
A 'Disabled' directory cannot be used by any applications, regardless of whether or not they are mapped to it.
The Stormpath Administrators directory is set up by default when you first signed up for Stormpath IAM. To add more directories, see Adding a Directory
Screenshot: 'Directory Browser'

Example request:
GET https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW/directories
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW/directories"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q"
},
{
"href" : "https://api.stormpath.com/v1/directories/lIKeabOss8w9fJf0fJfb34"
},
{
"href" : "https://api.stormpath.com/v1/directories/Hfjks7kj9sfKfh9fhsPifa"
}
]
}
To retrieve directories via one of the Stormpath SDK's you need to do the following:
Tenant tenant = client.getCurrentTenant();
DirectoryList directories = tenant.getDirectories();
for (Directory directory : directories) {
System.out.println("Directory " + directory.getName());
}
tenant = client.current_tenant directories = tenant.get_directories directories.each do |dir| p 'Directory ' + dir.get_name end
$tenant = $client->getCurrentTenant();
$directories = $tenant->getDirectories();
foreach ($directories as $directory) {
echo 'Directory ' . $directory->getName();
}
Directories contain authentication and authorization information about users, groups and roles. Stormpath supports an unlimited number of directories.
Stormpath supports the following types of directory:
You can add as many directories of each type as you need.
To add a directory,
Once a directory has been configured, you can then map the directory to appropriate applications.
Screenshot: 'Select Directory Type'

Cloud Directories are hosted by Stormpath and use the Stormpath data model to store user, group and role information. This is the most common type of directory in Stormpath.
Cloud Directories can be created via the Console UI or via the REST API. SDKs do not yet support directory creation.
Contents
Once you complete the creation process. You can then map the directory to appropriate applications.
Screenshot: Create cloud directory 
|
Attributes |
Description |
|---|---|
|
Name |
The name used to identify the directory within Stormpath IAM. This is useful when there are multiple directories configured, e.g. Employees or Customers. This value must be unique, i.e. it cannot be used by more than one directory. |
|
Description |
Details about this specific directory. |
|
Status |
'Enabled' by default. Only set to 'Disabled' if you wish to prevent all user accounts in the directory from authenticating even where the directory is set as a login source to an application. |
|
Min Characters |
The minimum number of characters an account's password can have in this directory. |
|
Max Characters |
The maximim number of characters an account's password can have in this directory. |
|
Mandatory Characters |
TThe required character patterns which new passwords will be validated against. For example, for an alphanumeric password of at least 8 characters with at least one lowercase and one uppercase character, you would select the following options: abc, ABC, 123 The more patterns selected the more secure the passwords but the more complicated for a human user. |
Example request:
POST https://api.stormpath.com/v1/directories
Content-Type: application/json
{
"name" : "Captains",
"description" : "Captains from a variety of stories"
}
Example response:
HTTP/1.1 201 Created
Location: https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q",
"name" : "Captains",
"description" : "Captains from a variety of stories",
"status" : "enabled",
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
},
"accounts" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/accounts"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups"
}
}
Stormpath provides a synchronization agent for your existing LDAP directory. This Agent sits in your corporate network in order to communicate with your LDAP Directory Services and then makes calls out to Stormpath. User management will be done on your existing LDAP directory but the cloud mirror can be accessed via the Stormpath APIs by your applications.
To setup an LDAP directory Agent,
Screenshot 1: Directory details 
|
Attribute |
Description |
|---|---|
|
Name |
The name used to identify the directory within Stormpath IAM. This is useful when there are multiple directories configured, e.g. Employees or Customers. |
|
Description |
Details about this specific directory. |
|
Status |
'Enabled' by default. Only set to 'Disabled' if you wish to prevent all accounts in the directory from authenticating even where the account is set as a login source to an application |
After completing this form click the 'Next.'
Screenshot 2: Agent details 
|
Attribute |
Description |
|---|---|
|
Directory Host |
The domain portion of the URL to use when connecting to the directory server. This domain must be accessible to the Agent, e.g. behind any firewall that may exist. |
|
Directory Port |
The port to use when connecting to the directory server. Example: 10389 for ldap, 10689 for ldaps, however your directory server maybe configured differently. |
|
Use SSL |
Specifies whether the connection to the directory server is an SSL connection. |
|
Agent User DN |
The Distinguished Name of the user the Agent should authenticate as when communicating with the directory server. Example: |
|
Agent Password |
The password of the user user specified above. |
|
Base DN |
The root Distinguished Name to use when running queries agains the directory server. |
|
Directory Services Poll Interval |
The time interval that the Agent will wait before subsequent pollings of the directory service to check for new/updated information. |
You can specify various LDAP object and attribute settings of the specific LDAP server for users and groups as shown on the screenshots below.
If your Agent's status is Online but you are unable to see any data when browsing your LDAP mapped directory, it is likely that your object and filters are configured incorrectly.
After completing this form click the 'Next.'
Screenshot 3: Account configuration 
|
Attribute |
Description |
|---|---|
|
Account DN |
This value is used in addition to the base DN (distinguished name) when searching and loading users as ccounts. An example is |
|
Account Object Class |
This is the name of the class used for the LDAP user object. Example: |
|
Account Email Attribute |
The attribute field to use when loading the user's email address. Example: |
|
Account First Name Attribute |
The attribute field to use when loading the account's first name. Example: |
|
Account Middle Name Attribute |
The attribute field to use when loading the account's middle name. Example: |
|
Account Last Name Attribute |
The attribute field to use when loading the account's last name. Example: |
|
Account Username Attribute |
The attribute field to use when loading the account's username. Example: |
|
Account Password Attribute |
The attribute field to use when loading the account's password. Example: |
|
Account Object Filter |
The filter to use when searching user objects. |
After completing this form click the 'Next.'
Screenshot 4: Group configuration

The Stormpath LDAP Agent assumes that all container objects (groups and roles) have the full DN to the associated member.
|
Attribute |
Description |
|---|---|
|
Group DN Suffix |
This value is used in addition to the base DN when searching and loading roles. An example is |
|
Group Object Class |
This is the name of the class used for the LDAP group object. Example: |
|
Group Name Attribute |
The attribute field to use when loading the role's name. Example: |
|
Group Description Attribute |
The attribute field to use when loading the role's description. Example: |
|
Group Members Attribute |
The attribute field to use when loading the role's members. Example: |
| Group Object Filter |
The filter to use when searching for role objects. Exampe: (objectclass=group). |
After completing this form click the 'Next.'
Screenshot 5: Review and Confirm

Screenshot 6: Download and Install Agent

The agent.id and agent.key values will be specific to this directory's Agent.
After you've created an LDAP backed directory in the Stormpath Console and installed the Stormpath LDAP Agent, synchronization of your directory's data will begin once you start the Agent.
Disabling a directory prevents any of its accounts from logging into any applications connected to Stormpath IAM but retains the directory's data and all of its group, role, and account data. You would typically disable a directory if you need to shut off a large group of accounts quickly and easily.
Deleting a directory completely erases the directory and all of its group, role, and account data from Stormpath.
We recommend that you disable a directory rather than delete it, in case an associated application contains historical data associated with accounts in the directory.
To disable a directory,
All of that directory's accounts will now be unable to log into any applications connected to Stormpath.
Screenshot: Disabling an application
To delete a directory,
The directory will be erased from Stormpath IAM and will no longer appear in the Directory Browser. In turn, its accounts, groups, and roles will also be erased from Stormpath IAM.
Screenshot: Deleting a directory 
Workflows are common user management operations that are automated for you by Stormpath IAM. Configurations for workflow automations are applied at the directory level.
To configure a workflow automation:
Currently there are two available workflows:

Account Registration and Verification workflow configurations manage how accounts are created in your directory.
To configure the 'Registration and Verification' workflow:
There are three options for the workflow:
Configuration for the various emails when this workflow is enabled are described below.
When this workflow is enabled but email verification is not required, the configuration is as follows:
Screenshot: Account Registration Success Configuration

|
ATTRIBUTE |
DESCRIPTION |
|---|---|
|
Message Format |
The message format for the body of the Account Registration Success email, either Plain Text or HTML. Available formats depend on your Tenant's Subscription Level. |
|
"From" Name |
The value to display in the "From" field of the Account Registration Success message. |
|
"From" Email Address |
The email address from which the Account Registration Success message will be sent. |
|
Subject |
The value for the subject field of the Account Registration Success message. |
| Body |
The value for the body of the message. Variable substitution is supported for the following:
|
When account email verification is required, a new account is only enabled once the account holder has verified his/her email.
Screenshot: Requiring account verification

When this workflow is enabled and email verification is required, there are two email messages to configure.
Screenshot: Account Verification Configuration

|
ATTRIBUTE |
DESCRIPTION |
|---|---|
|
Account Verification Base URL |
Your application URL that receives the token and completes the workflow. |
|
Message Format |
The message format for the body of the Account Verification email, either Plain Text or HTML. Available formats depend on your Tenant's Subscription Level. |
|
"From" Name |
The value to display in the "From" field of the Account Verification message. |
|
"From" Email Address |
The email address from which the Account Verification message will be sent. |
|
Subject |
The value for the subject field of the Account Verification message. |
| Body |
The value for the body of the message. Variable substitution is supported for the following:
|
When the new user verifies his/her email address, the account is marked as enabled in Stormpath IAM and the user receives a Verification Success Message, as configured below:
Screenshot: Account Verification Success Configuration

|
ATTRIBUTE |
DESCRIPTION |
|---|---|
|
Message Format |
The message format for the body of the Account Verification Success email, either Plain Text or HTML. Available formats depend on your Tenant's Subscription Level. |
|
"From" Name |
The value to display in the "From" field of the Account Verification Success message. |
|
"From" Email Address |
The email address from which the Account Verification Success message will be sent. |
|
Subject |
The value for the subject field of the Account Verification Success message. |
| Body |
The value for the body of the message. Variable substitution is supported for the following:
|
The Password Reset Worflow Automation configuration determines what your users will see if they have forgotten their login information.
To configure the 'Password Reset' workflow:
When a user triggers this workflow from the Login page s/he will receive and email message with a link that will allow them to reset their password. Upon successful password reset, the user will receive a second email indicating the reset was successful. You can configure, at the directory level, how these emails will appear to your users.
|
ATTRIBUTE |
DESCRIPTION |
|---|---|
|
Base URL |
Your application URL that receives the reset token and completes the workflow. |
|
Expiration Window |
The number of hours that the token remains valid from the time it's sent. |
Screenshot: Password Reset Message Configuration

|
ATTRIBUTE |
DESCRIPTION |
|---|---|
|
Message Format |
The message format for the body of the Password Reset email, either Plain Text or HTML. Available formats depend on your Tenant's Subscription Level. |
|
"From" Name |
The value to display in the "From" field of the Password Reset message. |
|
"From" Email Address |
The email address from which the Password Reset message will be sent. |
|
Subject |
The value for the subject field of the Password Reset message. |
| Body |
The value for the body of the message. Variable substitution is supported for the following:
|
Screenshot: Password Reset Success Configuration

|
ATTRIBUTE |
DESCRIPTION |
|---|---|
|
Message Format |
The message format for the Password Reset Successful email, either Plain Text or HTML. Available formats depend on your Tenant's Subscription Level. |
|
"From" Name |
The value to display in the "From" field of the Password Reset Successful message. |
|
"From" Email Address |
The email address from which the Password Reset Successful message will be sent. |
|
Subject |
The value for the subject field of the Password Reset Successful message. |
| Body |
The value for the body of the message. Variable substitution is supported for the following:
|
When communicating with the Stormpath REST API, you might need to reference a Directory via it's REST URL (aka href), for example, so you can create Accounts in it. The simplest way to find the href is to view the Directory's details screen:
To obtain a directory's REST URL,
1. Log in to the Stormpath Administration Console
2. Click the 'Directories' tab in the top navigation bar and then click the directory's name:

3. This will display the 'Directory Details' screen. The directory's REST URL (aka href) is the first property listed:

An application in Stormpath IAM represents a real world application that can communicate with and can by provisioned by Stormpath. Once defined, an application is mapped to one or more directories, groups, or roles, whose users are then granted access to the application.
When you first create your tenant in Stormpath IAM, an application 'Stormpath IAM' is added by default and listed on your Application Browser. You can control access to your Stormpath Console and API by managing the Login Sources for the 'Stormpath IAM' application listed.
To add more directories, see Adding an Application.
The Application Browser allows you to view and search for integrated applications.
To use the Application Browser,
A 'Disabled' application cannot authenticate any user accounts
Screenshot: Application Browser 
Before you start
Before adding the application, consider whether you need to add your directories, accounts, and groups.
To add an application:
Screenshot:Application Details

|
Attribute |
Description |
|---|---|
|
Name |
The name used to identify the application within Stormpath. This value must be unique, i.e. it cannot be used by more than one application. |
|
Description |
A short description of the application. Note: A URL for the application is often helpful. |
|
Status |
'Enabled' by default. Only set to 'Disabled' if you wish to turn off the application's ability to log in accounts. |
Screenshot: Select Login Sources

Click the relevant checkbox(es) to select one or more directories.
After completing this form, click the 'Next' button to go to 'Authorization' step.
Step 3. Groups: Determine the accounts that are authorized to access the application based on their group and role memberships.
Screenshot: Select Groups and Roles for Authorization

For each directory, you should do one of the following:
If your directory does not have any groups or roles then you will not see a choice. "All users" will be set by default.
To remove a group from the list after adding it, click the 'remove' link that will appear next to the authorized groups' names.
After completing this form, click the 'Next' button to go to the 'Confirm' step.
Screenshot: Confirm Application Data

Check the details of your application.
Disabling an application prevents the applicatiom from logging in any accounts in Stormpath but retains all the application's configurations. You would typically disable an application if you need to temporarily turn off log-ins.
Deleting an application completely erases the application and its configurations from Stormpath.
We recommend that you disable an application rather than delete it, if you believe you might use the application again.
To disable a application,
The application will no longer be able to log in accounts.
Screenshot: Disabling an application
To delete an application,
The application will be erased from Stormpath IAM and will no longer appear in the Application Browser.
Screenshot: Deleting an application 
An application's login sources define its user base. Sometimes known as 'application provisioning', login sources determine which user account stores will be used when authenticating and authorizing an account's access request. In Stormpath IAM, a directory, group, or role can be a login source for application. At least one login source must be associated with an application in order for accounts to log in to that application.
Multiple login sources may be configured for an application, but at least one is required for login. This allows each of your applications to view multiple directories as a single repository during a login attempt.
To manage an application's login sources,
Screenshot: 'Application — Login Sources'

Adding a login source to an application provisions a directory or group to that application. By doing so, all of the login source's user accounts can now log into the application. A login source can be a directory or group in Stormpath.
To add a login source to an application:
Screenshot: 'Add a Login Source'

When you map multiple login sources to an application, you also need to define the login source order.
The login source order is important during the login attempt for a user account, in cases where the same user account exists in multiple directories. When a user account attempts to log in to an application, Stormpath will search the listed login sources in the order you specified, and will use the credentials (password) of the first occurrence of the user account to validate the login attempt. See diagram below.
On this page:
To specify the login source order,
Screenshot: Application Login Sources

The login source order is important during a user account's login attempt against a Stormpath integrated application.
Let's assume our application 'Foo', and has been mapped to two login sources, the 'Customers' and 'Employees' directories, in that order.
Here is what happens when a user attempts to log in to the 'Foo' application:
Diagram: Login Attempt Flow

Removing a login source from an application deprovisions that directory or group from the application. By doing so, all of the login source's user accounts will no longer be able to log into that application.
To remove a login source from an application:
Screenshot - 'Remove a Login Source'

The application 'Accounts' tab shows all the user accounts in all the login sources mapped to the selected application. You will also see basic information for each user account, including the account's full name, username, email address, and status. The user account's parent directory is also listed.
To see the users visible to an application,
Screenshot: Viewing users for an application

When configuring an Application to communicate with Stormpath's REST API, you might need to configure the REST client with the Application's REST URL (aka href). The simplest way to find the href is to view the Application's details screen:
To obtain an application's REST URL,
1. Log in to the Stormpath Administration Console
2. Click the 'Applications' tab in the top navigation bar and then click the application's name:

This will display the 'Application Details' screen. The application's REST URL (aka href) is the first property listed:

In Stormpath IAM, users are referred to as user accounts objects or just accounts. Accounts are unique within a directory and are used to log into applications. Stormpath support an unlimited number of accounts per directory.
The Account Browser allows you to view and search for accounts in Stormpath.
To use the Account Browser,
A 'Disabled' account cannot log into any application, regardless of whether or not they are mapped to it.
Screenshot: 'Account Browser'

To add an account,
Creating an account will automatically initiate an Account Registration & Verifaction workflow that will send the account owner an email message. To suppress the email messages be sure to select the checkbox 'Suppress Registration and Verification emails'
After adding the account, you will be able to specify its group membership. And if the account will have administrator rights to Stormpath, you will also be to set their API keys.
Screenshot: 'Create Account'

|
Attribute |
Description |
|---|---|
|
Directory |
The directory to which the account will be added. Note that the account cannot be moved to a different directory once the account has been created. |
|
Username |
The account's login name for applications that using username instead of email. The value must be unique within its parent directory. i.e. it cannot be used by more than one account. |
|
First Name |
The account owner's first name |
|
Middle Name |
The account owner's middle name |
|
Last Name |
The account owner's last name |
|
|
The account owner's email addres. This is can be used for log in for applications that prefer email, like the Stormpath Administrator Console. The value must be unique within its parent directory. i.e. it cannot be used by more than one account. |
|
Status |
'Enabled' by default. Only set to 'Disabled' if you deny access to the account to Stormpath connected applications. |
|
Password |
The account's credentials used during a login attempt. This must adhere to the password policies set for the parent directory. |
|
Confirm Password |
Confirmation of the account's credentials. This value must match the value of the 'Password' attribute above. |
Disabling a user account prevents that account from logging into any applications in Stormpath IAM but retains all the account's information. You would typically disable an account if you need to temporarily remove access priviledges.
Deleting a user account completely erases the account from ita directory and erases all of the accounts information from Stormpath.
We recommend that you disable a directory rather than delete it, in case some applications contain historical data associated with accounts in the directory.
| Disabling accounts that resides in LDAP For applications that need users to exist for historical data, you should recreate the account and mark it disabled in a Stormpath Cloud Directory before deleting from your LDAP directory. |
To disable a Account,
The account will no longer be able to log into applications.
Screenshot: Disabling an account
To delete an account,
The account will be erased from Stormpath IAM and will no longer appear in the Account Browser.
Screenshot: Deleting an account

Groups are collections of user accounts within a directory and are often used for authorization and access control in an application. In Stormpath, a group serves the same purpose of a role so the two terms are used interchangeably.
The Group Browser allows you to search for and view existing groups and roles within a specified directory.
To use the Group Browser:
To add a new group or role, see Adding Groups and Roles
Screenshot: 'Group Browser'

To add a group,
You can now add users to the new group.
Screenshot: 'Add Group'

|
Field |
Description |
|---|---|
|
Name |
The unique name of the group. Within a given directory, the Name must be unique. Note that the Name cannot be changed once the group is created. |
|
Description |
A short description of the group. |
|
Status |
'Enabled' by default. Only set to 'Disabled' if you wish to prevent all user accounts in the group from logging into any application even when the group is set as a login source to an application. Note that if an account is also a member to another group that does have access to an application, then the account can login. |
If a group is explicitly set an application's login source, then disabling that group prevents any of its user accounts from logging into that application but retains the group's data and memberships. You would typically disable a group if you need to shut off a group of user accounts quickly and easily.
Deleting a group erases the group and all its membership relationships. User accounts that are members of the group will not be deleted.
We recommend that you disable an group rather than delete it, if you believe you might need to retain the user data or application connection.
To disable a group:
Screenshot: Disabling a group
To delete a group:
A group can only be deleted if it is not explicitly mapped to any applications.
The group will be erased from Stormpath IAM and will no longer appear in the Group Browser.
Screenshot: Deleting a group
To view the members of a group,
Screenshot: Viewing the members of a group

User accounts can be added to a group in two ways:
To add an account to a group from the account's settings:
To add an account to a group from the groups's settings:
User accounts can be removed from a group in two ways:
To remove an account from a group from the account's settings:
Screenshot 1: Remove a group from an account

To remove an account from a group from the groups's settings:
Screenshot 2: Remove an account from a group

Developer SDKs make it easy for you to use the Stormpath API from your language or framework of choice. Below you'll find a list of officially supported that are tested against the latest version of the API.
These libraries are open sourced under the business-friendly Apache Software License 2.0 and hosted on GitHub.
Stay Tuned! More SDKs are currently in development, as are several independent community projects.
Spring MVC Sample App - a Twitter clone that will help you implement Stormpath's core functionality. The example application shows Stormpath-based login, user registration, email verification, password reset, role/group assignments, role-based access control (RBAC) checks, and user profile updates.
Apache Shiro Sample Web App - A simple web application secured by the Apache Shiro security framework and Stormpath IAM. The example is based of the standard Apache Shiro web sample application. Shows login and role-bases access control (RBAC) using an authorization cache.
Stormpath provides developers a simple yet powerful ReST+JSON API enabling Identity and Access Management control for organizations and applications.
|
|
General Concepts
|
|
Resources
|
|
All URLs referenced in the API documentation begin with the following base URL:
This file has been depreceted. Please visit stormpath.com/docs
https://api.stormpath.com/v1
To help ensure data security, only HTTPS is allowed when communicating with the Stormpath API servers. HTTP is not supported.
Every request to Stormpath's REST API must be authenticated with an API Key over HTTPS. Please see our API Authentication section for more information, including requirements for configuring a REST client.
Stormpath's REST API currently only supports JSON resource representations. If you would like other formats supported, please email us and let us know!
You can retrieve a resource representation by GETting its url. The easiest way to do this is to copy and paste a URL into your web browser's address bar.
An example API GET:
GET /v1/tenants/cJoiwcorTTmkDDBsf02AbA HTTP/1.1
GET responses contain:
200 OK: The request was successful and the response body contains the representation requested.302 FOUND: A common redirect response; you can GET the representation at the URI in the Location response header.304 NOT MODIFIED: Your client's cached version of the representation is still up to date.401 UNAUTHORIZED: Authentication credentials are required to access the resource. All requests must be authenticated.403 FORBIDDEN: The supplied authentication credentials are not sufficient to access the resource.404 NOT FOUND: We couldn't locate the resource based on the specified URI.429 TOO MANY REQUESTS: Your application is sending too many simultaneous requests.500 SERVER ERROR: We couldn't return the representation due to an internal server error.503 SERVICE UNAVAILABLE: We are temporarily unable to service the request. Please wait for a bit and try again.An example API GET response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA",
"name": "My Tenant",
"key": "myTenant"
}
You create a resource by submitting an HTTP POST to a resource URI. Any POST body must be represented as JSON.
Requests that contain body content MUST specify the HTTP Content-Type header with a value of application/json
An example Create POST request:
POST /v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications HTTP/1.1
Content-Type: application/json
{
"name": "Desired name",
"description": "Desired description",
"status": "enabled"
}
Create POST responses contain:
POST Response Status Codes201 CREATED: The request was successful, we created a new resource, and the response body contains the representation. TheLocation header contains the new resource's canonical URI.400 BAD REQUEST: The data given in the POST or PUT failed validation. Inspect the response body for details.401 UNAUTHORIZED: Authentication credentials are required to access the resource. All requests must be authenticated.403 FORBIDDEN: The supplied authentication credentials are not sufficient to access the resource.404 NOT FOUND: We couldn't locate the resource based on the specified URI.405 METHOD NOT ALLOWED: POST is not supported for the resource.409 CONFLICT: You can't create or update a resource because another resource already exists or conflicts with one you are submitting.429 TOO MANY REQUESTS: Your application is sending too many simultaneous requests.500 SERVER ERROR: We couldn't create or update the resource. Please try again.503 SERVICE UNAVAILABLE: We are temporarily unable to service the request. Please wait for a bit and try again.Example Create POST response:
HTTP/1.1 201 Created
Location: https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA",
"name": "Best application ever",
"description": "Really. The best application ever.",
"status": "enabled",
"tenant": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
},
"loginSources": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/loginSources"
},
"accounts": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
}
}
If you want to update a resource, you submit an HTTP POST to a resource URI. Any POST body must be represented as JSON. You may submit one or more properties of a resource, but at least one property must be specified.
Requests that contain body content MUST specify the HTTP Content-Type header with a value of application/json
An example Update (HTTP POST) request, updating a single property:
POST /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA HTTP/1.1
Content-Type: application/json
{
"name": "New name"
}
Notice that the post body in this particular example contains only a single JSON name/value pair, although Application resources have multiple name/value pairs.
Updates enable updating one or more resource property values. At at least one resource property value must be specified.
Update POST responses contain:
200 OK: The request was successful, we updated the resource, and the response body contains the resource's full representation..400 BAD REQUEST: The data given in the POST request body failed validation. Inspect the response body for details.401 UNAUTHORIZED: The supplied credentials, if any, are not sufficient to create or update the resource.403 FORBIDDEN: The supplied authentication credentials are not sufficient to access the resource.404 NOT FOUND: We couldn't locate the resource based on the specified URI.405 METHOD NOT ALLOWED POST is not supported for the resource.409 CONFLICT: You can't create or update a resource because another resource already exists or conflicts with one you are submitting.429 TOO MANY REQUESTS: Your application is sending too many simultaneous requests.500 SERVER ERROR: We couldn't create or update the resource. Please try again.503 SERVICE UNAVAILABLE: We are temporarily unable to service the request. Please wait for a bit and try again.Example Update POST response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA",
"name": "New name",
"description": "Really. The best application ever.",
"status": "enabled",
"tenant": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
},
"loginSources": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/loginSources"
},
"accounts": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
}
}
To delete a resource make an HTTP DELETE request to the resource's URL. Not all Stormpath REST API resources support DELETE.
An example DELETE request:
DELETE /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA HTTP/1.1
Possible DELETE Response Status Codes
204 NO CONTENT: The request was successful; the resource was deleted. The deleted resource representation will not be returned.401 UNAUTHORIZED: The supplied credentials, if any, are not sufficient to create or update the resource.403 FORBIDDEN: The supplied authentication credentials are not sufficient to access the resource.404 NOT FOUND: We couldn't locate the resource based on the specified URI.405 METHOD NOT ALLOWED: DELETE is not supported for the resource.429 TOO MANY REQUESTS: Your application is sending too many simultaneous requests.500 SERVER ERROR: We couldn't create or update the resource. Please try again.503 SERVICE UNAVAILABLE: We are temporarily unable to service the request. Please wait for a bit and try again.Example DELETE response:
HTTP/1.1 204 No Content
If you need to acquire more than one Resource Instance, you may interact with a Collection Resource which represents collections of one or more Instance Resources.
If a Collection Resource represents too many items, it will not return every item in its collection. It will instead use a technique called Pagination where the results are broken up into one or more pages of data. You can acquire additional pages as separate requests.
| Property | Description | Type |
|---|---|---|
href |
The Collection Resource fully qualified location URI | String |
offset |
The starting index in the entire Collection of the first collection item to return. Default is 0 (zero). |
Integer |
limit |
The maximum number of collection items N to return for a single request. Minimum value is 1. Max is 100. Default is25. |
Integer |
items |
An array containing the current response's collection items. The number of returned items may differ than the requestedlimit size. |
array |
To acquire a Collection Resource, submit an HTTP GET to the Collection Resource URI.
There are two optional supported query parameters:
offset: This is the starting index in the entire Collection of the first collection element to return. If unspecified, the default value is 0(zero).limit: The maximum number of collection elements N to return for a single request. Minimum value is 1. Max is 100. If unspecified, the default value is 25.An example Collection Resource GET request:
GET /v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications?offset=10&limit=40 HTTP/1.1
This particular example requests from the server a Tenant's Application Resource Collection with elements starting at index 10 (i.e. the 11th element), asking for a maximum of 40 total elements.
Collection Resource GET responses contain:
Example Collection Resource response:
HTTP/1.1 200 OK
{
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications?offset=10&limit=40"
"offset": 0,
"limit": 10,
"items" : [
{
... Reference to Application 0 (the 1st element)...
},
...,
{
... Reference to Application 9 (the 10th element) ...
}
]
}
ReST resources that reference other resources (such as an Account referencing its parent Directory) will represent them as a Resource Reference object. (A 'Resource Reference' is also known in some circles as a 'Link' or 'Link Relation').
A Resource Reference is:
href property.| Property | Description | Type |
|---|---|---|
href |
The referenced Resource's fully qualified location URI. | String |
Example Resource Reference in JSON:
{
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
}
Here is an example of this Resource Reference as a property of an existing Application JSON Resource:
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA",
"name": "New name",
"description": "Really. The best application ever.",
"status": "enabled",
"tenant": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
},
"loginSources": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/loginSources"
},
"accounts": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
}
}
In this example, the tenant, loginSources, and accounts properties are all Resource Reference properties.
Upon encountering a Resource Reference object, you can use its href property to interact with that resource as necessary.
ReST API responses indicating an error or warning will be represented by a proper response HTTP status code (404, 403, etc). Additionally, a response body will be provided containing the following information:
| Property | Description | Type |
|---|---|---|
status |
The corresponding HTTP status code. | Integer |
code |
A Stormpath IAM specific error code that can be used to obtain more information. | Integer |
message |
A simple, easy to understand message that may be shown directly to the application end-user if desired. | String |
developerMessage |
A clear, plain text explanation with technical details that might assist a developer calling the Stormpath IAM API. | String |
moreInfo |
A fully qualified URL that may be accessed to obtain more information about the error. | String |
Example request for a resource that does not exist
GET /v1/applications/thisApplicationDoesNotExist
Example response:
HTTP/1.1 404 Not Found
{
"status": 404,
"code": 404,
"message": "Oops! The application you specified cannot be found.",
"developerMessage": "The specified Application cannot be found. If you accessed this url via a stale href reference, it might be helpful to acquire the tenant's Application Collection Resource to obtain the current list of applications.",
"moreInfo": "http://www.stormpath.com/docs/errors/404"
}
The Stormpath ReST API uses HTTP GET, POST, PUT and DELETE methods. Because some HTTP clients do not support PUT and DELETEmethods, you can simulate them by sending a POST request to a resource endpoint with a _method query string parameter (the word 'method' is prefixed with the underscore character '_'). The parameter value can be 'DELETE' or 'PUT' (_method=DELETE or _method=PUT).
For example, if you want to delete a particular Application resource, you would ordinarily execute an HTTP DELETE request:
DELETE /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA
But if your HTTP client only supports GET and POST, you can send a POST request with the _method query string parameter:
POST /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA?_method=DELETE
Every request to Stormpath's REST API must be authenticated with an API Key. If you wish to make a REST request to Stormpath, we assume you have already:
Once you have an API Key, you can choose one of two ways to authenticate with Stormpath: either with HTTP Basic Authentication or Digest Authentication.
Any account that may access the Stormpath IAM application within the Stormpath web UI Console has full administrative access to your Stormpath data and settings, including access to the REST API if they have an API Key.
Assign user accounts to the Stormpath IAM application (via login sources) wisely.
To help ensure data security, only secure (HTTPS) communication is allowed when communicating with the Stormpath API servers. Standard HTTP is not supported.
Most clients (including web browsers) present a dialog or prompt for you to provide a username and password for HTTP Basic Authentication.
When using an API Key with Basic authentication, the API Key id is the 'username' and the API Key secret is the 'password':
HTTP Basic username: apiKey.id value
HTTP Basic password: apiKey.secret value
For example, if using curl:
curl --user YOUR_API_KEY_ID:YOUR_API_KEY_SECRET --header "Accept: application/json" https://api.stormpath.com/v1/tenants/current
or perhaps httpie (which assumes application/json by default):
http -a YOUR_API_KEY_ID:YOUR_API_KEY_SECRET https://api.stormpath.com/v1/tenants/current
Stormpath also supports a more secure authentication scheme known as digest authentication*. This approach computes a cryptographic digest of the request and sends the digest value along with the request. If the transmitted digest matches what the Stormpath API server computes for the same request, the request is authenticated.
This technique is especially secure because the API Key secret is never transmitted outside of the application, making it extremely difficult for anything (or anyone) outside of the application to interfere with a request or see the secret.
We recommend using Digest authentication whenever possible because it is inherently more secure. However, due to its complexity, it may not be feasible for some projects.
All of the Stormpath SDKs use this more secure Digest authentication so we recommend that you use the SDKs whenever possible. However, if we do not yet have an SDK for your programming language of choice, we recommend that you use Basic Authentication over HTTPS.
Finally, if you would like to use Stormpath Digest authentication in a programming langauge that Stormpath does not yet support, you might wish to attempt to port the algorithm to that language. You can try to replicate the algorithm and use Stormpath's existing code as examples to help:
Java: Sauthc1Signer (the sign method)
Ruby: Sauthc1Signer (the sign_request method)
PHP: Sauthc1Signer (the signRequest method)
If you port the algorithm to other language(s), please do let us know! We're happy to help! Email us at support -at- stormpath.com or say hi on IRC (irc.mibbit.net:6667 and join #stormpath) and we'll help as best as we can.
*Note: Stormpath's SAuthc1 digest algorithm is NOT the same as HTTP Digest authentication. The Stormpath SAuthc1 digest-based authentication scheme is much more secure than standard HTTP Digest authentication.
An Account is a unique identity within a Directory. An account can exist in only a single Directory but may be a part of multiple Groups owned by that Directory
/v1/accounts/:accountId
| Property | Description | Type | Valid value |
|---|---|---|---|
href |
The resource fully qualified location URI | String | -- |
username |
The username for the Account. Must be unique across the owning Directory. If not specified, the username will default to the e-mail field | String | 1 < N <= 255 characters |
email |
The e-mail address for the Account. Must be unique across the owning Directory. | String | 1 < N <= 255 characters |
password |
The password for the Account. Only include this property if setting or changing the account password. | String | 1 < N <= 255 characters |
givenName |
The given (first) name for the Account holder. | String | 1 < N <= 255 characters |
middleName |
The middle (second) name for the Account holder. | String | 1 < N <= 255 characters |
surname |
The surname (last name) for the Account holder. | String | 1 < N <= 255 characters |
status |
Enabled Accounts are able to login to their assigned Applications. | enum | enabled,disabled |
groups |
A link to the Groups that the Account belongs to. | link | -- |
directory |
A link to the owning Directory. | link | -- |
tenant |
A link to the Tenant owning the Directory the Group belongs to. | link | -- |
The following operations are supported on an existing individual Application instance resource:
HTTP GET returns a representation of an Account resources that includes the above properties.
Example request:
GET /v1/accounts/cJoiwcorTTmkDDBsf02AbA
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA",
"username" : "jlpicard",
"email" : "capt@enterprise.com",
"givenName" : "Jean-Luc",
"middleName" : "",
"surname" : "Picard",
"status" : "enabled",
"directory" : {
"href" : "https://api.stormpath.com/v1/directories/WpM9nyZ2TbaEzfbRvLk9KA"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA/groups"
}
}
Use HTTP POST when you want to change one or more specific properties of an Account resource. Unspecified properties will not be changed. At least one property must be specified.
Example Request:
POST /v1/accounts/cJoiwcorTTmkDDBsf02bAb
Content-Type: application/json
{
"username" : "jlpicard",
"givenName" : "Jean-Luc",
"surname" : "Picard",
}
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA",
"username" : "jlpicard",
"email" : "capt@enterprise.com",
"givenName" : "Jean-Luc",
"middleName" : "",
"surname" : "Picard",
"status" : "enabled",
"directory" : {
"href" : "https://api.stormpath.com/v1/directories/WpM9nyZ2TbaEzfbRvLk9KA"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA/groups"
}
}
Permanently deletes an Account resource.
Example request:
DELETE /v1/accounts/cJoiwcorTTmkDDBsf02bAb
Example response:
HTTP/1.1 204 No Content
Creates a new Account resource instance within a specified Directory.
/v1/directories/:directoryId/accounts
Example request:
POST /v1/directories/WpM9nyZ2TbaEzfbRvLk9KA/accounts
Content-Type: application/json
{
"username" : "jlpicard",
"email" : "capt@enterprise.com",
"givenName" : "Jean-Luc",
"surname" : "Picard",
"password" : "uGhd%a8Kl!"
}
Example response:
HTTP/1.1 201 Created
Location: https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA",
"username" : "jlpicard",
"email" : "capt@enterprise.com",
"givenName" : "Jean-Luc",
"middleName" : "",
"surname" : "Picard",
"status" : "enabled",
"directory" : {
"href" : "https://api.stormpath.com/v1/directories/WpM9nyZ2TbaEzfbRvLk9KA"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA/groups"
}
}
The following Collections are supported on an existing individual Account instance resource:
For more information on working with Collections please read their section in our General Concepts documentation.
An Account Groups Collection Resource represents all Groups where a specific Account is a member.
/v1/accounts/:accountId/groups
HTTP GET returns a Collection Resource containing links for all Groups where a specific Account is a member.
GET /v1/accounts/cJoiwcorTTmkDDBsf02AbA/groups
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02AbA/groups"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ"
},
{
"href" : "https://api.stormpath.com/v1/groups/sUcKIttrebEcKhgU86Kl0u"
},
{
"href" : "https://api.stormpath.com/v1/groups/Yu8ihas7HOpjHs3uhd7jGd"
}
]
}
An Application instance resource represents a software application that is registered with (and communicates with) Stormpath IAM to for its own application-specific Identity and Access Management needs. A Tenant may register one or more Applications with Stormpath IAM.
/v1/applications/:applicationId
| Property | Description | Type | Valid value |
|---|---|---|---|
href |
The resource fully qualified location URI | String | -- |
name |
Name of the application. Must be unique within a Tenant | String | 1 < N <= 255 characters |
description |
Application description | String | 0 < N <= 1000 characters |
status |
Enabled applications accept logins from Accounts in assigned loginSources. Disabled applications deny logins. |
enum | enabled,disabled |
accounts |
A link to the Accounts that may log in to the application. This list is an aggregate view of all accounts in the application's assigned loginSources. |
link | -- |
tenant |
A link to the owning Tenant | link | -- |
The following operations are supported on an existing individual Application instance resource:
GET)POST)DELETE)POST)GET)New applications may be registered with Stormpath IAM by Creating an application instance resource via the Application Collection ResourceURI
Returns a representation of an Application resource that includes the above resource properties.
Example request:
GET /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA",
"name": "Best application ever",
"description": "Really. The best application ever.",
"status": "enabled",
"accounts": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
}
"tenant": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
}
}
Use HTTP Post when you want to change one or more specific properties of an Application resource. Unspecified properties will not be changed. At least one property must be specified.
Example request:
POST /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA
Content-Type: application/json
{
"description": "A new description."
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA",
"name": "Best application ever",
"description": "A new description.",
"status": "enabled",
"accounts": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
},
"tenant": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
}
}
Permanently deletes a specific Application resource.
Example request:
DELETE /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA
Example response:
HTTP/1.1 204 No Content
Creates a new application instance within the caller's Tenant.
/v1/applications
name - must be unique across all of the Tenant's applications.descriptionstatus - if unspecified, the default is enabled.POST /v1/applications
Content-Type: application/json
{
"name": "Best application ever",
"description": "A new description.",
"status": "enabled"
}
Example response:
HTTP/1.1 201 Created
Location: https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA",
"name": "Best application ever",
"description": "A new description.",
"status": "enabled",
"accounts": {
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
},
"tenant": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA"
}
}
The following Collections are supported on an existing individual Application instance resource:
For more information on working with Collections please read their section in our General Concepts documentation.
An Application Accounts Collection Resource represents all Accounts that may log in to the application.
/v1/applications/:applicationId/accounts
HTTP GET returns a paginated list of links for Accounts within a specified Application.
Example request:
GET /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/accounts"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02bAb"
},
{
"href" : "https://api.stormpath.com/v1/accounts/tHEcAkeiSAlIe9sdh8KjdJda"
},
{
"href" : "https://api.stormpath.com/v1/accounts/Gu8oshf7HdsspjHs3uhd7jGd"
}
]
}
The Application Login Attempts endpoint allows an Application to authenticate its associated Accounts.
/v1/applications/:applicationId/loginAttempts
| Property | Description | Type | Valid value |
|---|---|---|---|
type |
The type of the login attempt. The only currently supported type is basic. Additional types will likely be supported in the future. |
enum | basic |
value |
The Base64 encoded username:plaintextPassword pair. For example, for username base64_encode("jsmith:mySecretPassword");
The |
String | Base64 encoded String |
An HTTP POST authenticates an associated application Account. Only HTTP POST is supported.
The POST body must be a JSON object with the above Login Attempt Resource Properties.
Example request:
POST /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/loginAttempts
Content-Type: application/json
{
"type": "basic",
"value": "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
If the login attempt is successful, a 200 OK response will be returned with a link to the successfully authenticated Account:
Example Login Attempt success response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"account": {
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02bAb"
}
}
If the login attempt fails, a 400 Bad Request will be returned with an error payload explaining the details of why the attempt failed:
Example Login Attempt failure response:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
{
"status": 400,
"code": 400,
"message": "Invalid username or password.",
"developerMessage": "Invalid username or password.",
"moreInfo": "mailto:support@stormpath.com"
}
The Application Password Reset Tokens endpoint supports the password reset workflow for an Account in an Application's assigned login sources.
Creating a new Password Reset Token will automatically send a password reset email to the destination email address if that email corresponds to an account that can login to the corresponding application.
/v1/applications/:applicationId/passwordResetTokens |
| Property | Description | Type | Valid value |
|---|---|---|---|
|
href |
Fully qualified URL of the Password Reset Token resource | String | -- |
email |
Email address of the account for which the password reset will occur. | String | Valid email address. Required. |
| account | A link to the Account for which the password reset will occur. | Link | Cannot set in a request. Returned in a response only. |
A successful HTTP POST sends a password reset email to the first discovered Account associated with the corresponding Application. The email recipient can then click on a password reset URL in the email to reset their password in a web form.
The POST body must be a JSON object with a single email property:
Example request:
POST /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/passwordResetTokensContent-Type: application/json { "email": "john.smith@stormpath.com"} |
Example response
HTTP/1.1 200 OKContent-Type: application/json;charset=UTF-8 { "email" : "john.smith@stormpath.com" "account" : { }} |
A 200 OK response indicates that a password reset email will be sent as soon as possible to the email specified.
If the password reset token creation fails, a 400 Bad Request will be returned with an error payload explaining the details of why the attempt failed:
Example Password Reset Token creation failure response:
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8 { "status": 400, "code": 400, "message": "There is no account with that email address.", "developerMessage": "There is no account with the specified email address currently accessible to the specified application.", "moreInfo": "mailto:support@stormpath.com"} |
Reading a token resource successfully indicates the token is valid. If you obtained the token because the email recipient clicked a link into your application and it verifies successfully, you can assume the token is valid.
After verifying that the token is valid, you can then collect the account's new password (e.g. via a web form over HTTPS) and submit the new password as an Account update.
Example GET request:
GET /v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/passwordResetTokens/j6HqguWPSBSXM2xmcOUShw
Example success response (if token is valid):
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA/passwordResetTokens/j6HqguWPSBSXM2xmcOUShw",
"email": "john.smith@stormpath.com",
"account": {
"href": "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02bAb"
}
}
If the Password Reset Token is invalid (e.g. never existed or has expired), a 404 Not Found response will be returned.
Example error response:
HTTP/1.1 404 Not FoundContent-Type: application/json;charset=UTF-8 { "status": 404, "code": 404, "message": "The password validation link is not valid. You might want to try to reset your password again.", "developerMessage": "The specified password reset token does not exist. It may have expired. A new password reset token should be created to reset the account password.", "moreInfo": "mailto:support@stormpath.com"}Receving a 404 from a Password Reset Token resource indicates the token is invalid and the end-user should not be asked to present a new password. A new Password Reset Token should be constructed to initiate the password reset workflow.
A Directory is a named root-level container of Groups and Accounts within a Tenant.
/v1/directories/:directoryId
| Property | Description | Type | Valid value |
|---|---|---|---|
href |
The resource fully qualified location URI | String | -- |
name |
Name of the directory. Must be unique within a Tenant | String | 1 < N <= 255 characters |
description |
Directory description | String | 0 < N <= 1000 characters |
status |
Enabled directories may be used as loginSources for Applications. Disabled directories cannot be used for login. | enum | enabled, disabled |
accounts |
A link to the Accounts owned by the Directory. | link | -- |
groups |
A link to the Groups owned by the Directory. | link | -- |
tenant |
A link to the owning Tenant | link | -- |
The following operations are supported on an existing individual Directory instance resource:
HTTP GET returns a representation of a Directory resource that includes the above resource properties.
Example request:
GET /v1/directories/bckhcGMXQDujIXpbCDRb2Q
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q",
"name" : "Captains",
"description" : "Captains from a variety of stories",
"status" : "enabled",
"accounts" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/accounts"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups"
},
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
}
}
Use HTTP POST when you want to change one or more specific properties of a Directory resource. Unspecified properties will not be changed. At least one property must be specified.
Example request:
POST /v1/directories/bckhcGMXQDujIXpbCDRb2Q
Content-Type: application/json
{
"name" : "Captains",
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q",
"name" : "Captains",
"description" : "Captains from a variety of stories",
"status" : "enabled",
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
},
"accounts" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/accounts"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups"
}
}
Permanently deletes a specific a Directory resource.
Example request:
DELETE /v1/directories/bckhcGMXQDujIXpbCDRb2Q
Example response:
HTTP/1.1 204 No Content
Creates a new Directory resource within the caller's Tenant.
/v1/directories
Example request:
POST /v1/directories
Content-Type: application/json
{
"name" : "Captains",
"description" : "Captains from a variety of stories"
}
Example response:
HTTP/1.1 201 Created
Location: https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q",
"name" : "Captains",
"description" : "Captains from a variety of stories",
"status" : "enabled",
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
},
"accounts" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/accounts"
},
"groups" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups"
}
}
The following Collections are supported on an existing individual Directory instance resource:
For more information on working with Collections please read their section in our General Concepts documentation.
A Directory Groups Collection Resource represents all Groups owned by a specific Directory.
/v1/directories/:directoryId/groups
HTTP GET returns a Collection Resource containing links for all Groups owned by a specific Directory.
GET /v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ"
},
{
"href" : "https://api.stormpath.com/v1/groups/sUcKIttrebEcKhgU86Kl0u"
},
{
"href" : "https://api.stormpath.com/v1/groups/Yu8ihas7HOpjHs3uhd7jGd"
}
]
}
A Directory Accounts Collection Resource represents all Accounts owned by a specific Directory.
/v1/directories/:directoryId/accounts
HTTP GET returns a paginated list of links for Accounts within a specified directory.
GET /v1/directories/bckhcGMXQDujIXpbCDRb2Q/accounts
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q/accounts"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02bAb"
},
{
"href" : "https://api.stormpath.com/v1/accounts/tHEcAkeiSAlIe9sdh8KjdJda"
},
{
"href" : "https://api.stormpath.com/v1/accounts/Gu8oshf7HdsspjHs3uhd7jGd"
}
]
}
A Group is a named collection of Accounts within a Directory. Groups may be used as Login Sources within Applications to control who may login to an Application.
/v1/groups/:groupId
| Property | Description | Type | Valid value |
|---|---|---|---|
| The resource fully qualified location URI. | String | -- | |
name |
The name of the group. Must be unique within a Directory. | String | 1 < N <= 255 characters |
description |
Group description | String | 1 < N <= 1000 characters |
status |
Enabled groups are able to authenticate against an Application. Disabled groups cannot authenticate against an Application. | enum | enabled,disabled |
tenant |
The Tenant that owns the Directory containing this group. | link | -- |
directory |
A link to the Directory resource that the group belongs to. | link | -- |
accounts |
A link to the Accounts that are contained within this group. | link | -- |
The following operations are supported on an existing individual Group instance resource:
HTTP GET returns a representation of a Group resource that includes the above resource properties.
Example request:
GET /v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ",
"name" : "Aquanauts",
"description" : "Sea Voyagers",
"status" : "enabled",
"directory" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q"
},
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
},
"accounts" : {
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ/accounts"
}
}
Use HTTP POST when you want to change one or more specific properties of a Group resource. Unspecified properties will not be changed. At least one property must be specified.
Example request:
POST /v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ
Content-Type: application/json
{
"description" : "Sea Voyagers"
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ",
"name" : "Aquanauts",
"description" : "Sea Voyagers",
"status" : "enabled",
"directory" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q"
},
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
},
"accounts" : {
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ/accounts"
}
}
Permanently deletes a specific a Group resource.
Example request:
DELETE /v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ
Example response:
HTTP/1.1 204 No Content
Creates a new Group resource instance in a specified Directory.
/v1/directories/:directoryId/groups
Example request:
POST /v1/directories/bckhcGMXQDujIXpbCDRb2Q/groups
Content-Type: application/json
{
"name" : "Aquanauts",
"description" : "Sea Voyagers",
"status" : "enabled"
}
Example response:
HTTP/1.1 201 Created
Location: https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ
Content-Type: application/json;charset=UTF-8
{
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ",
"name" : "Aquanauts",
"description" : "Sea Voyagers",
"status" : "enabled",
"directory" : {
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q"
},
"tenant" : {
"href" : "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW"
},
"accounts" : {
"href" : "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ/accounts"
}
}
For more information on working with Collections please read their section in our General Concepts documentation.
A Group Accounts Collection Resource represents all Accounts that are members of a specific Group.
/v1/groups/:groupId/accounts
GET returns a paginated list of links for Accounts within a specified Group.Example request:
GET /v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ/accounts
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/groups/ZgoHUG0oSoVNeU0K4GZeVQ/accounts"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/accounts/cJoiwcorTTmkDDBsf02bAb"
},
{
"href" : "https://api.stormpath.com/v1/accounts/tHEcAkeiSAlIe9sdh8KjdJda"
},
{
"href" : "https://api.stormpath.com/v1/accounts/Gu8oshf7HdsspjHs3uhd7jGd"
}
]
}
Stormpath IAM is a Multitenant software service. When you sign up for the Stormpath IAM service, a Tenant instance is created for you. As a Stormpath IAM customer, you own your Tenant instance and everything you create in it - your Applications, Directories, Accounts, Groups, etc. You may access and update your tenant information via the Tenant REST API.
Very soon, future updates to Stormpath IAM will allow you to create and manage Sub-tenants. Customers with their own Multitenant software applications will find this useful for managing Subtenant identity infrastructure for their own customers.
/v1/tenants/:tenantId
| Property | Description | Type | Validation |
|---|---|---|---|
href |
The resource fully qualified location URI | String | -- |
name |
Tenant name. Unique across all Tenants. | String | 1 < N <= 255 characters |
key |
Human readable tenant key. Unique across all Tenants. | String | -- |
applications |
A link to the tenant's registered Applications. | link | -- |
directories |
A link to the tenant's registered Directories. | link | -- |
The following operations are supported on an existing individual Tenant instance resource:
GET)POST)GET)GET)Returns a representation of a Tenant resource that includes the above resource properties.
Example request:
GET /v1/tenants/cJoiwcorTTmkDDBsf02AbA
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA",
"name": "My Tenant",
"key": "myTenant",
"applications": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications"
},
"directories": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA/directories"
}
}
Returns a 302 Redirect to the Tenant instance resource corresponding to the currently executing API caller. In other words, this endpoint will redirect the API caller to the REST resource URI for their own tenant.
Example request:
GET /v1/tenants/current
Example response:
HTTP/1.1 302 Moved Temporarily Location: https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA Expires: 0 Cache-Control: no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform Pragma: no-cache
Use HTTP POST when you want to change one or more specific properties of a Tenant resource. Unspecified properties will not be changed. At least one property must be specified.
Example request:
POST /v1/tenants/WpM9nyZ2TbaEzfbRvLk9KA
{
"name": "New Name"
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"href" : "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA",
"name" : "New Name",
"applications": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications"
},
"directories": {
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA/directories"
}
}
The following Collections are supported on an existing individual Tenant instance resource:
For more information on working with Collections please read their section in our General Concepts documentation.
A Tenant Directory Collection Resource represents all Directories owned by a specific Tenant.
/v1/tenants/:tenantId/directories
HTTP GET returns a Collection Resource containing links for all Directories owned by a specific Tenant.
GET /v1/tenants/Gh9238fksJlsieJkPkQuW/directories
Example response:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"href": "https://api.stormpath.com/v1/tenants/Gh9238fksJlsieJkPkQuW/directories"
"offset": 0,
"limit": 25,
"items" : [
{
"href" : "https://api.stormpath.com/v1/directories/bckhcGMXQDujIXpbCDRb2Q"
},
{
"href" : "https://api.stormpath.com/v1/directories/lIKeabOss8w9fJf0fJfb34"
},
{
"href" : "https://api.stormpath.com/v1/directories/Hfjks7kj9sfKfh9fhsPifa"
}
]
}
A Tenant Application Collection Resource represents all Applications owned by a specific Tenant.
/v1/tenants/:tenantId/applications
HTTP GET returns a Collection Resource containing links for all Applications owned by a specific Tenant.
GET /v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"href": "https://api.stormpath.com/v1/tenants/cJoiwcorTTmkDDBsf02AbA/applications",
"offset": 0,
"limit": 10,
"items" : [
{
"href" : "https://api.stormpath.com/v1/applications/WpM9nyZ2TbaEzfbRvLk9KA"
},
{
"href" : "https://api.stormpath.com/v1/applications/aLlyOUrBAse34js9hjiH9j"
},
{
"href" : "https://api.stormpath.com/v1/applications/Xhf0a9HLA02djsdP90dsQ2"
}
]
}