From c55e6b936da75b13e8b78c81b07dff2a7c57c46e Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Wed, 29 Sep 2021 13:20:39 -0500 Subject: [PATCH] Document transform batch reference field (#12664) --- website/content/api-docs/secret/transform.mdx | 70 ++++++++++++++----- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/website/content/api-docs/secret/transform.mdx b/website/content/api-docs/secret/transform.mdx index 2655542806..c5b9aa53f5 100644 --- a/website/content/api-docs/secret/transform.mdx +++ b/website/content/api-docs/secret/transform.mdx @@ -934,11 +934,16 @@ This endpoint encodes the provided value using a named role. transformations with `supplied` as the tweak source. The tweak must be a 7-byte value that is then base64 encoded. +- `reference` `(string: "")` - + Only valid on batch requests using 'batch_input' below. A user supplied + string that will be present on the corresponding item in the batch + response, to assist in correlating inputs with outputs. + - `batch_input` `(array: nil)` - Specifies a list of items to be encoded in a single batch. When this - parameter is set, the 'value', 'transformation', 'ttl' and 'tweak' parameters are - ignored. Instead, the aforementioned parameters should be provided within - each object in the list. + parameter is set, the 'value', 'transformation', 'ttl', 'tweak' and + 'reference' parameters are ignored. Instead, the aforementioned parameters + should be provided within each object in the list. ```json [ @@ -948,7 +953,8 @@ This endpoint encodes the provided value using a named role. }, { "value": "2222-2222-2222-2222", - "transformation": "ccn-masking" + "transformation": "ccn-masking", + "reference": "order#1234" }, { "value": "3333-3333-3333-3333", @@ -1003,7 +1009,8 @@ $ curl \ }, { "transformation": "ccn-tokenization", - "value": "1111-2222-3333-4444" + "value": "1111-2222-3333-4444", + "reference": "order#1234" } ] } @@ -1029,7 +1036,8 @@ $ curl \ "encoded_value": "5682-4613-6822-8064" }, { - "encoded_value": "Q4tYgFXHxURXf9MLekG82L51vSAQrDnpAiaB37J4VPRxoQEB3fRpwR" + "encoded_value": "Q4tYgFXHxURXf9MLekG82L51vSAQrDnpAiaB37J4VPRxoQEB3fRpwR", + "reference": "order#1234" } ] } @@ -1063,11 +1071,16 @@ This endpoint decodes the provided value using a named role. applicable for FPE transformations with `supplied` or `generated` as the tweak source. The tweak must be a 7-byte value that is then base64 encoded. +- `reference` `(string: "")` - + Only valid on batch requests using 'batch_input' below. A user supplied + string that will be present on the corresponding item in the batch + response, to assist in correlating inputs with outputs. + - `batch_input` `(array: nil)` - - Specifies a list of items to be decoded in a single batch. When this - parameter is set, the 'value', 'transformation' and 'tweak' parameters are - ignored. Instead, the aforementioned parameters should be provided within - each object in the list. + Specifies a list of items to be encoded in a single batch. When this + parameter is set, the 'value', 'transformation', 'tweak' and + 'reference' parameters are ignored. Instead, the aforementioned parameters + should be provided within each object in the list. ```json [ @@ -1114,7 +1127,8 @@ $ curl \ "batch_input": [ { "transformation": "ccn-fpe", - "value": "5682-4613-6822-8064" + "value": "5682-4613-6822-8064", + "reference": "order#1234" }, { "transformation": "ccn-tokenization", @@ -1141,7 +1155,8 @@ $ curl \ "data": { "batch_results": [ { - "encoded_value": "1111-2222-3333-4444" + "encoded_value": "1111-2222-3333-4444", + "reference": "order#1234" }, { "encoded_value": "1111-2222-3333-4444" @@ -1175,11 +1190,16 @@ Only valid for tokenization transformations. may be skipped and will be inferred. If multiple transformations exist, one must be specified. +- `reference` `(string: "")` - + Only valid on batch requests using 'batch_input' below. A user supplied + string that will be present on the corresponding item in the batch + response, to assist in correlating inputs with outputs. + - `batch_input` `(array: nil)` - - Specifies a list of items to be decoded in a single batch. When this - parameter is set, the 'value' parameter is - ignored. Instead, the aforementioned parameters should be provided within - each object in the list. + Specifies a list of items to be validated in a single batch. When this + parameter is set, the 'value', 'transformation' and + 'reference' parameters are ignored. Instead, the aforementioned parameters + should be provided within each object in the list. ```json [ @@ -1245,11 +1265,17 @@ transformations. may be skipped and will be inferred. If multiple transformations exist, one must be specified. +- `reference` `(string: "")` - + Only valid on batch requests using 'batch_input' below. A user supplied + string that will be present on the corresponding item in the batch + response, to assist in correlating inputs with outputs. + - `batch_input` `(array: nil)` - Specifies a list of items to be decoded in a single batch. When this - parameter is set, the 'value' parameter is + parameter is set, the 'value', 'transformation', and 'reference' parameters are ignored. Instead, the aforementioned parameters should be provided within - each object in the list. + each object in the list. In addition, batched requests can add the 'reference' + field described above. ```json [ @@ -1313,11 +1339,17 @@ Only valid for tokenization transformations. may be skipped and will be inferred. If multiple transformations exist, one must be specified. +- `reference` `(string: "")` - + Only valid on batch requests using 'batch_input' below. A user supplied + string that will be present on the corresponding item in the batch + response, to assist in correlating inputs with outputs. + - `batch_input` `(array: nil)` - Specifies a list of items to be decoded in a single batch. When this parameter is set, the 'value' parameter is ignored. Instead, the aforementioned parameters should be provided within - each object in the list. + each object in the list. In addition, batched requests can add the 'reference' + field described above. ```json [