insertTokenBatchWithMultipleVault()
insertTokenBatchWithMultipleVault() API creates tokens for a batch of plaintext values, insert tokens into multiple token vaults, and return the tokens.
If the passed plaintext value is already tokenized, this method simply returns the existing token. If the value is not already tokenized, but a collision occurs (the given token already exists) or the generated token matches the plaintext value, then CT-V repeats the tokenization process up to 100 attempts, to tokenize the plaintext value.
Request URL
http://localhost:8080/tmrest/SafeNetTokenManager/batch/insertTokenWithMultipleVault
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. |
tableNameArray | This is the Token Vault name and it must be in CAPITAL LETTERS. |
values | The data to be tokenized. Notes: • The plaintext values in a particular string are to be comma separated. • For example, “1234,8965,abcd”,”1234,5689,25689” represents two arrays of plaintext values to be tokenized and inserted into token vaults V1 and V2, respectively. • Tokenized values of 1234,8965 and abcd will be inserted into the token vault V1 and tokenized values of 1234,5689 and 25689 will be inserted into the token vault V2. |
formatArray | The predefined token formats or formats created using the createNewFormat(). |
luhnCheck | 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. |
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. |
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 array of token(s) created for the input value(s).
Example
{
"naeUser":"ADuser",
"naePassword":"xxxxxxxx",
"dbUser":"sa",
"dbPassword":"xxxxxxxx",
"tableNameArray":["TEST105","TEST123"],
"values":["836434746373,3843637464","8745845484,9548549548549,9859589566586595"],
"formatArray":[1,3],
"tokenPropertyArray":["1111222233334444","9999999999999999"],
"customTokenPropertyArray":["ccard","pan"],
"luhnCheck":false
}
Result
{
tokens: [ "258631438533,3355448899"
"4302578582,22233358746258,8856971236589745"
]
}