Redact PII with Postman
The API publishes an OpenAPI 3 document, so Postman can generate the whole collection for you. Import the schema, set one variable, and every endpoint is callable.
Code
{
"info": { "name": "Redactly", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" },
"variable": [
{ "key": "baseUrl", "value": "https://api.bitbanger.in" },
{ "key": "apiKey", "value": "rdct_your_key_here" }
],
"item": [
{
"name": "Redact text",
"request": {
"method": "POST",
"header": [
{ "key": "X-API-Key", "value": "{{apiKey}}" },
{ "key": "Content-Type", "value": "application/json" }
],
"body": { "mode": "raw", "raw": "{\"text\": \"Email jane@example.com\"}" },
"url": "{{baseUrl}}/v1/redact"
}
}
]
}
Notes
- Import from https://api.bitbanger.in/openapi.json to get every endpoint with its schema.
- Store the key as a collection variable marked secret, so it is not exported with the collection.
- The demo endpoint needs no key, which makes it the quickest way to sanity-check connectivity.