Bulk reveal
Use the /v1/revealbulk
API to reveal bulk data. This API uses the POST
method.
Prerequisites
This section assumes you have fulfilled the prerequisites.
Syntax
curl -X POST -H "Content-Type: application/json" -d '{"protection_policy_name": "<protection_policy>", "protected_data_array": ["<sample data1>", "<sample data 2>"], "username":"<username>"}' <ip>:<port>/v1/revealbulk
curl -X POST -H "Content-Type: application/json" --header 'Authorization: Bearer <JWT Value>' -d '{"protection_policy_name": "<protection_policy>", "protected_data_array": ["<sample data1>", "<sample data 2>"], "username":"<username>"}' <ip>:<port>/v1/revealbulk
Here, ip
is the IP of the host machine where CRDP container is deployed and <port>
is the port of CRDP container.
Request Parameters
Request Parameter | Description |
---|---|
protection_policy_name | Protection policy to be used during the reveal operation. |
username | Name of the user for whom data will be revealed. The reveal format will depend on the access policy selected while creating protection policy. If username is null or blank, the default reveal format will be used. Username is ignored if the |
protected_data_array | An array of protected data to be revealed. |
Response Parameters
Response Parameter | Description |
---|---|
status | Overall status of the bulk reveal operations. |
total_count | Total count of data to be revealed. |
success_count | Total count of successful operations. |
error_count | Total count of failed operations. |
data_array | The array of data. The output can be ciphertext, plaintext, masked value, or error replacement value based on the reveal format configured for the user in protection policy. In case of failed operation at a particular index, error message is returned at the same index. |
Examples for ProtectBulk
Request
{
"protection_policy_name": "testpp-internal-versioned",
"username": "bob",
"protected_data_array": [
{
"protected_data":"10010001234562wpqfcchi39480234"
},
{
"protected_data":"10010001vtckobifvngs588566cjdyu"
},
{
"protected_data":"10010001123123l123pkmnsrae12b3ie"
}
]
}
Response
{
"status": "Success",
"total_count": 3,
"success_count": 3,
"error_count": 0,
"data_array": [
{
"data": "1234562jhljhjl39480234",
},
{
"data": "ksjhfkjadsfi588566jadsf",
},
{
"data": "123123k123jkhjkhjk12k3jk"
}
]
}
This example uses internal versioned policy (testpp-internal-versioned
) to reveal data as plaintext for the user (bob
).
Request
{
"protection_policy_name": "testpp-external-versioned",
"username": "bob",
"protected_data_array": [
{
"protected_data": "234562wpqfcchi39480234",
"external_version": "10010001"
},
{
"protected_data": "vtckobifvngs588566cjdyu",
"external_version": "10010001"
},
{
"protected_data": "123123l123pkmnsrae12b3ie",
"external_version": "10010001"
}
]
}
Response
{
"status": "Success",
"total_count": 3,
"success_count": 3,
"error_count": 0,
"data_array": [
{
"data": "234562wpqfcchi39480234",
},
{
"data": "vtckobifvngs588566cjdyu",
},
{
"data": "123123l123pkmnsrae12b3ie"
}
]
}
This example uses external versioned policy (testpp-external-versioned
) to reveal data as ciphertext for the user (bob
).
Request
{
"protection_policy_name": "testpp-disabled-versioned",
"username": "bob",
"protected_data_array": [
{
"protected_data": "234562wpqfcchi39480234"
},
{
"protected_data": "vtckobifvngs588566cjdyu"
},
{
"protected_data": "123123l123pkmnsrae12b3ie"
}
]
}
Response
{
"status": "Success",
"total_count": 3,
"success_count": 3,
"error_count": 0,
"data_array": [
{
"data": "234562wpqfcchi39480234",
},
{
"data": "vtckobifvngs588566cjdyu",
},
{
"data": "123123l123pkmnsrae12b3ie"
}
]
}
This example uses disabled versioned policy (testpp-disabled-versioned
) to reveal data as ciphertext for the user (bob
).