# SensitiveDataProtectionApi

All URIs are relative to *https://app.quba.ae/api/sdp*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**anonymizeText**](SensitiveDataProtectionApi.md#anonymizetext) | **POST** /anonymize | Anonymize Text |
| [**healthCheck**](SensitiveDataProtectionApi.md#healthcheck) | **GET** /health | Health |
| [**scanText**](SensitiveDataProtectionApi.md#scantext) | **POST** /scan | Scan Text |



## anonymizeText

> AnonymizeResponseBody anonymizeText(AnonymizeRequestBody)

Anonymize Text

Anonymize the provided text.

### Example

```ts
import {
  Configuration,
  SensitiveDataProtectionApi,
} from '@quba/sensitive-data-protection';
import type { AnonymizeTextRequest } from '@quba/sensitive-data-protection';

async function example() {
  console.log("🚀 Testing @quba/sensitive-data-protection SDK...");
  const api = new SensitiveDataProtectionApi();

  const body = {
    // AnonymizeRequestBody
    AnonymizeRequestBody: ...,
  } satisfies AnonymizeTextRequest;

  try {
    const data = await api.anonymizeText(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **AnonymizeRequestBody** | [AnonymizeRequestBody](AnonymizeRequestBody.md) |  | |

### Return type

[**AnonymizeResponseBody**](AnonymizeResponseBody.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful Response |  -  |
| **422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## healthCheck

> string healthCheck()

Health

Return basic health probe result.

### Example

```ts
import {
  Configuration,
  SensitiveDataProtectionApi,
} from '@quba/sensitive-data-protection';
import type { HealthCheckRequest } from '@quba/sensitive-data-protection';

async function example() {
  console.log("🚀 Testing @quba/sensitive-data-protection SDK...");
  const api = new SensitiveDataProtectionApi();

  try {
    const data = await api.healthCheck();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters

This endpoint does not need any parameter.

### Return type

**string**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful Response |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)


## scanText

> ScanResponseBody scanText(ScanRequestBody)

Scan Text

Scan the provided text for sensitive data.

### Example

```ts
import {
  Configuration,
  SensitiveDataProtectionApi,
} from '@quba/sensitive-data-protection';
import type { ScanTextRequest } from '@quba/sensitive-data-protection';

async function example() {
  console.log("🚀 Testing @quba/sensitive-data-protection SDK...");
  const api = new SensitiveDataProtectionApi();

  const body = {
    // ScanRequestBody
    ScanRequestBody: ...,
  } satisfies ScanTextRequest;

  try {
    const data = await api.scanText(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```

### Parameters


| Name | Type | Description  | Notes |
|------------- | ------------- | ------------- | -------------|
| **ScanRequestBody** | [ScanRequestBody](ScanRequestBody.md) |  | |

### Return type

[**ScanResponseBody**](ScanResponseBody.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful Response |  -  |
| **422** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

