Follow

Delete Data

The Relational Delete Data command allows you to remove one or more rows of data in a User Defined Relational Table.

Arguments

The Relational Delete Data command requires the following arguments: Command, Realm, Password, Table, Storage Type, and Data.

api_web?r=myrealm&p=mypass&c=rdbdeletedata&table=mytable&storageType=relational&data=uniqueID^myUniqueID

The command is 'rdbdeletedata', the realm is 'myrealm', the password is 'mypass', the table to search is 'mytable' and the data to delete is searched using the defined data.  This command will delete the value exactly matching the defined row key. which must be the Unique Identifier for the table data.

The Relational Delete Data command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=rdbdeletedata

c=rdbdeletedata

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]

r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]

p=[password]

Relational Table Name

Yes

Identifier of the relational data table in which to insert or update.

table=[table_name]

t=[table_name]

Data Storage Type

Yes

Type of table in which to store data, currently only supports 'relational'.

This argument is CASE sensitive.  

storageType=relational

Data

Yes

Column related data.  The unique field is required.  Any other columns will cause an error.

The format is the name of the unique key followed by one or more unique key values separated by a carat (^).

data=[column_name^values]

d=[column_name^values]

d=[column_name^values^values]

 

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

api_web?r=myrealm&p=mypass&c=rdbdeletedata&table=pets&storageType=relational&data=pet_id^1232_01^1232_02

Successful results return:

SUCCESS: Records delete = 2

Results

The Relational Delete command outputs either a SUCCESS or FAILURE message. 

SUCCESS

The Relational Delete command success message returns the SUCCESS message.   The result format is:

SUCCESS: Records deleted = [number]  

FAILURE

The Relational Delete command will fail for several reasons, such as if the table does not exist.  The result format is:

FAILURE: [Reason]  

 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk