insertTokenWithTokenPropertyBatch()
insertTokenWithTokenPropertyBatch() API encrypts plaintext values, creates tokens, inserts tokens along with the corresponding tokenProperty into the token vault, and returns the tokens. The API supports Unicode (multibyte format) tokens.
Request URL
http://localhost:8080/tmrest/SafeNetTokenManager/batch/insertTokenWithTokenPropertyBatch
Method
POST
Request Parameters
Parameters | Descriptions |
---|---|
naeUser | A Key Manager user with access to the AES and HMAC keys. |
naePassword | The Key Manager user’s password. |
dbUser (optional) | A database user with access to the token table. |
dbPassword (optional) | The database user’s password. |
values | The data to be tokenized. |
tableName | This is the Token Vault name and it must be in CAPITAL LETTERS. |
format | One of the predefined token formats or a format created using createNewFormat(). |
luhnCheck (optional) | boolean indicates if the value must pass a Luhn check (true) or if there is no requirement (false). Token formats created using the createNewFormat() method may have one of three luhnCheck rules, the rules are must fail test, no requirement, and must pass test. |
saveException (optional) | boolean indicates if the Smart Check feature is applied (See Smart Check). When set to true, the feature is applied. The default value is FALSE. |
tokenPropertyArray | An array of 16 bits alphanumeric strings, attached to the tokens. |
customTokenPropertyArray | An array of strings, each up to 255 characters including special characters. |
Note
Either tokenProperty, customTokenProperty or both must be used.
The priority of the luhnCheck boolean in insert() and the luhnCheck integer in createNewFormat() vary, depending on their values, as can be seen in this image:
Returned Values
String or string array of token(s) created for the input value(s).
TmResult (an object) which provides array of tokens, error indexes and messages.
Example
{
"naeUser":"admin",
"naePassword":"xxxx",
"dbUser":"user",
"dbPassword":"xxxx",
"tableName":"TABLE1",
"values":["236733537635236","2637673263323","38278226373263"],
"format":"RANDOM_TOKEN",
"tokenPropertyArray":["1288693872272","6097704700638","3803445429853"],
"customTokenPropertyArray":["ctp1","ctp2","ctp3"]
}
Result
{
tokens: [ "7592351063375"
"2349652777372"
"0193657852891"
]
}