/entity.find

Retrieve user information from an application. These data entities are returned in JSON format. This information may be filtered using the optional parameters provided.

The following operators are supported in the filter parameter, from highest to lowest precedence.

  • is null, is not null (postfix)
  • not, ! (prefix)
  • >, >=, <, <= (infix)
  • =, != (infix)
  • and (infix)
  • or (infix)
Note. Previous releases of this call included the contains operator. This operator has been removed because its behavior was counterintuitive. If you use this operator now, you will get a 485 error.

For the filter parameter, String values specified by operators must be surrounded by single quotes. Integer values work either with or without single quotes. If used with email, only a full email address can be used (for example, `fsmith@example.com). You cannot filter on a domain (for example,example.com`).

Refer to the Registration Error Codes section for details on error codes.

This endpoint includes the following methods:

  • GET


GET

Base URL

The base URL for this endpoint is your Janrain Capture domain; for example:

https://educationcenter.us-dev.janraincapture.com

Your Capture domains (also known as Registration domains) can be found in the Janrain Console on the Manage Application page:

Examples

Example: Sort to see the most recently-updated data first


sort_on=["-lastUpdated"]
          

Example: Find users with a birthday


filter="birthday is not null"
          

Example: Find users who identify as "male"


filter="gender='male'"
          

Example: Adding more than one condition to a filter


filter="gender='male' and birthday>'2012-06-13 18:02:56.012122 +0000'"
          

Example: Retrieve data for specific attributes

Here is an example of returning data from Capture using entity.find, selectively returning only data for the displayName and email attributes.


curl -H "Authorization: Basic aW1fYV...NfbXk="\
    --data-urlencode type_name=user\
    --data-urlencodeattributes='["displayName", "email"]' \
    https://my-app.janraincapture.com/entity.find
          

Running Code Samples Using Postman

The Janrain REST API code samples are written using Curl, but they can easily be run from within Postman. To use one of our code samples in Postman:

  1. Click the Copy to Clipboard button located directly beneath the code sample
  2. In Postman, click Import to display the Import dialog box.
  3. In the Import dialog box, click Paste Raw Text, and then paste in the copied code. The Import dialog box should look similar to this:

  4. Click Import, and the Curl command will be converted to a format that can be run from within Postman. All you need to do now is configure the command to work with your Janrain implementation.

Example Response


{
  "result_count": 6,
  "stat": "ok",
  "results": [
    {
      "displayName": "ian",
      "email": "ian@example.com"
    },
    {
      "displayName": "Rex",
      "email": "rex@example.com"
    },
    {
      "displayName": "sam",
      "email": "smann@example.com"
    },
    {
      "displayName": "alex",
      "email": "alex@example.com"
    },
    {
      "displayName": "john.j",
      "email": "jj@example.com"
    },
    {
      "displayName": "daniel",
      "email": "daniel@example.com"
    }
  ]
}
          

More Comprehensive Examples List

If you'd like to see a broader set of examples of API calls to the entity.find endpoint, please see the Example /entity.find Calls page in the Reference section.

Authorized Clients

owner direct_access direct_read_access

Security

Query Parameters

Parameter Type Required Description
type_name string Yes Name of the entityType.
 
filter string Expression used to filter the result. By default, all records are returned.
 
max_results string Integer value between 1 and 10000, inclusive, specifying the maximum number of records to be returned. The default value is 100.
 
first_result string Changes the first result displayed in the list to the number specified + 1. For example: changing this value to 3 will display the fourth user record (3 + 1). Because this parameter requires the call to scan for the ID number, it can result in timeout errors for databases with more than one million entities.
 
show_total_count string When set to true, includes a total_count in the response that shows the total number of records returned. (The default value is false.) Because of the resource-intensive nature of this parameter, it is not recommended for use in On Page Load functions.
 
sort_on string JSON array of attributes used to specify the sort order. By default, results are sorted in ascending order. To sort in descending order, place a minus sign (-) directly in front of the appropriate attribute. For example:
 
-displayName
attributes string JSON array of attributes to be returned. By default, all attributes and attribute values are returned.