/entity

Retrieve a single entity (and any nested objects).

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: Retrieve user data for a specific ID and created date

Get the user data for a user with ID 999 created on November 15, 2014 at 01:58:01.862312 a.m., with a UTC time zone offset of -0000.


curl -H "Authorization: Basic aW1fYV...NfbXk=" \
    --data-urlencode type_name=user \
    --data-urlencode id=999\
    --data-urlencode created='2014-11-15 01:58:01.862312 +0000'\
   https://my-app.janraincapture.com/entity   https://my-app.janraincapture.com/entity.delete "stat": "error"
   

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": {
    "birthday": null,
    "familyName": "Doe",
    "profiles": [],
    "id": 999,
    "middleName": null,
    "emailVerified": "2015-11-15 01:58:01 +0000",
    "primaryAddress": {
      "company": null,
      "address2": "",
      "stateAbbreviation": "NM",
      "zipPlus4": null,
      "city": "",
      "address1": "",
      "phone": "5551234567",
      "zip": "",
      "mobile": null,
      "country": "United States"
    },
    "gender": "male",
    "lastUpdated": "2016-03-13 19:39:17.856608 +0000",
    "password": null,
    "photos": [],
    "email": "johndoe@example.com",
    "givenName": "John",
    "currentLocation": null,
    "deactivateAccount": null,
    "lastLogin": "2016-03-13 19:39:17 +0000",
    "created": "2015-11-15 01:58:01.862312 +0000",
    "displayName": "John Doe",
    "uuid": "12345abc-1234-abcd-1234-12345abcde12",
    "aboutMe": null,
    "display": null,
    "statuses": []
  },
  "stat": "ok"
}
   

Example: Retrieve certain attributes for a specific user ID

Retrieve email, givenName, familyName and created date for user record 999.


curl -H "Authorization: Basic aW1fYV...NfbXk="\
    --data-urlencode type_name=user \
    --data-urlencode id=999 \
    --data-urlencode attributes='["email", "familyName", "givenName", "created"]' \
    https://my-app.janraincapture.com/entity
   

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": {
    "familyName": "Parker",
    "email":"parkerm@example.com",
    "givenName":"Matthew",
    "created":"2015-12-31 18:54:59.900339 +0000"
  },
    "stat":"ok"
  }
   

Example: Retrieve data for a user with specific email address

Retrieve the created date for a user record with a specific email address.


curl -H "Authorization: Basic aW1fYV...NfbXk=" \
    --data-urlencode type_name=user \
    --data-urlencode key_attribute=email \
    --data-urlencode key_value='"parkerm@example.com"'
    --data-urlencode attributes='["created"]'\
    https://my-app.janraincapture.com/entity
   

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":{
    "created":"2015-10-05 21:37:13.031989 +0000"
  },
  "stat":"ok"
}
   

Example: Validate a User's Password

The entity call may use two optional parameters to validate a password attribute in a user record. When used in this way, the API call makes a hash internally according to the password type specified in the schema and then compares the hashes. password_attribute is the name of the schema attribute to use and password_value is a plain-text value used to validate against the password stored in the record. If unsuccessful, the call returns a 350 (invalid_password_value) error response.


curl -X POST -H "Authorization: Basic aW1fYV...NfbXk=" \
    --data-urlencode type_name=user \
    --data-urlencode id=999\
    --data-urlencode password_attribute=password \
    --data-urlencode password_value=Test123 \
    --data-urlencode attributes='["created"]'\
    https://my-app.janraincapture.com/entity
   

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":{
    "created":"2015-10-05 21:37:13.031989 +0000"
  },
  "stat":"ok"
}
   

Authorized Clients

  • owner 
  • direct_access 
  • direct_read_access

Security

  •  janrain-signed
  •  basic-auth
  •  janrain-oauth

Query Parameters

Parameter Type Required Description
attribute_name string Attribute to be returned. When used, values are only returned for the specified attribute. (By default, all attribute values are returned.)
 
attributes string  JSON array of attributes to be returned. When used, values are only returned for the specified attributes. (By default, all attribute values are returned.)
 
created string Timestamp generated when the entity was created. If this value is present but is incorrect, the call fails.
 
last_udpated string Timestamp generated when the entity was last updated. If this value is present but is incorrect, the call fails.
 
type_name string Yes Name of the entityType.
 
id string ID of the user record. Required unless you are using the uuid or key_attribute parameter.
 
uuid string UUID of the user record. Required unless you are using the id or key_attribute parameter.
 
key_attribute string Name of a unique attribute in the schema. This parameter is required unless you are using the uuid or id parameter, and must be used in conjunction with the key_value parameter.
 
key_value string Value assigned to the key_attribute parameter. String values must be enclosed in quotes.
 
password_attribute string Yes Path to a schema attribute that includes a password constraint. You can use the password_attribute and password_value parameters together: use password_attribute to specify the attribute to authenticate against, and password_value to specify the authenticating password.
 
password_value string Plaintext value that is matched against the password attribute specified in the password_attribute parameter. If successful, the entity is returned. If unsuccessful, the API call fails.