API
/
Scan Request
API
/
Scan Request
API
/
Scan Request

API

Scan Request

Written by

Toni Barthel

Published

Oct 12, 2024

API

Scan Request

Written by

Toni Barthel

Published

Oct 12, 2024

API

Scan Request

Written by

Toni Barthel

Published

Oct 12, 2024

Request

Provide string data and scan it using the specified policy UUID to uncover sensitive information. If a violation is detected, it will return a list of findings. If no findings are detected, it will return "message": "no violation found".

Required attributes

  • policy.uuid The policy UUID you want to use for the scan. Currently, only one policy is allowed.

  • payload The message you want to scan.


POST /api/v1/scan HTTP/1.1
Host: api.1protection.ai
Content-Type: application/json
Authorization: Bearer {token}

{
  "policy": {
    "uuid": "{policy}"
  },
  "payload": "{message}"
}


Example

In this example, a policy with UUID ba8c9752-7c35-4e99-a628-3c942d268fc2 and a configured IBAN detection rule will detect IBANs in a payload. The payload message we use for this example is Please transfer the amount of 100 € from CH9305881020624751001 to GB82WEST12345698765432. Thank you..

Provide string data and scan it using the specified policy UUID to uncover sensitive information. If a violation is detected, it will return a list of findings. If no findings are detected, it will return "message": "no violation found".


POST /api/v1/scan HTTP/1.1
Host: api.1protection.ai
Content-Type: application/json
Authorization: Bearer {token}

{
  "policy": {
    "uuid": "ba8c9752-7c35-4e99-a628-3c942d268fc2"
  },
  "payload": "Please transfer the amount of 100 € from CH9305881020624751001 to GB82WEST12345698765432. Thank you."
}


In this message, the example policy detected two IBANs as findings and created one violation for this.


RESPONSE

{
  "uuid": "5eea645f-71c7-4ea2-b655-baf3b0100c36",
  "findings": [
    {
      "id": "b13004e7-1c89-4cd9-8b8e-7fa9dd17b119",
      "beforeContext": "Please transfer the amount of 100 € from",
      "finding": "CH9305881020624751001",
      "afterContext": "to",
      "redactedFinding": "<iban>",
      "detectorId": "12e654a5-cafd-459d-8941-bfa00fa76d8e",
      "detectorName": "IBAN code",
      "confidence": 3,
    },
    {
      "id": "d9ac8e94-82ef-4566-94f2-e643e2ba7bc1",
      "finding": "GB82WEST12345698765432",
      "afterContext": ". Thank you.",
      "redactedFinding": "<iban>",
      "detectorId": "12e654a5-cafd-459d-8941-bfa00fa76d8e",
      "detectorName": "IBAN code",
      "confidence": 3,
    }
  ]
}