/entity.delete

Delete a single entity (and any nested objects) from an application, or delete an element of a plural.

Warning. Data removed with this API call are permanently deleted.

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

This endpoint uses the following methods:

  • POST


POST

Description

This call must be a POST request, and due to validation cannot be passed as URL parameters. The POST needs to be formatted using body parameters instead.

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: Delete a user record

Delete a user record with a uuid value of abcde12345abcde12345abcde12345abcde1.


curl-X POST \

    -H "Authorization: Basic aW1fYV...NfbXk="\
    --data-urlencode type_name=user \
    --data-urlencode uuid=abcde12345abcde12345abcde12345abcde1 \
    https://my-app.janraincapture.com/entity.delete
          

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


{
  "stat": "ok"
}        
                                                    

Example Error Response


{
  "argument_name": "uuid",
  "request_id": "9mq5bv72q47ehg7g",
  "code": 200,
  "error_description": "uuid was not valid for the following reason: invalid uuid",
  "error": "invalid_argument",
  "stat": "error"
}
          

Example: Delete a plural within a user record

Delete a plural within a user record with a uuid value of abcde12345abcde12345abcde12345abcde1. The item being deleted is instance 30721 of the plural janrain.properties.managedBy.

Warning. Mistyping the attribute_name will ignore the plural and delete the entire user record.

curl -X POST \
  -H "Authorization: Basic aW1fYV...NfbXk="\
  --data-urlencode type_name=user \
  --data-urlencode uuid=abcde12345abcde12345abcde12345abcde1 \
  --data-urlencode attribute_name="janrain.properties.managedBy#30721"\
  https://my-app.janraincapture.com/entity.delete
          

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


{
  "stat": "ok"
}        
                                                    

Authorized Clients

owner direct_access

Security

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

Query Parameters

Parameter Type Required Description
attribute_name string Attribute path to the plural element to be deleted. Specific instances within a plural are referenced by a combination of the attribute path, a hashtag (#), and the instance ID. For example, janrain.properties.managedBy#30721 points to plural instance 30721 in the plural attribute janrain.properties.managedBy.
 
created string Timestamp generated when the entity was created. This value may be used to help identify the entity in this parameter. If a value is present in this paramete but is incorrect, the call will fail.
 
id string ID of the entity to be deleted. This parameter is required when not using the uuid or key_attribute and key_value parameters. The primary key of the parent object.
 
key_attribute Any unique attribute found in the schema. This parameter is required if you do not use the uuid or id parameters, and must be used in conjunction with the key_value parameter.
 
key_value string Unique value of the attribute specified by the key_attribute parameter. Note that all string values mist be enclosed in quotes.
 
lastUpdated string Timestamp indicating when the user profile was last updated. This value may be used to help identify the entity in this parameter. If a value is present in this parameter but is incorrect, the call will fail.
 
type_name string Yes entityType where the user record is stored.
 
uuid string Unique identifier for the entity. Must be used unless you are using the id or key_attribute parameters to identify the user record to be deleted.