Skip to content

Latest commit

 

History

History
383 lines (273 loc) · 15.4 KB

File metadata and controls

383 lines (273 loc) · 15.4 KB

cloudflare_dart.api.ContentScanningApi

Load the API package

import 'package:cloudflare_dart/api.dart';

All URIs are relative to https://api.cloudflare.com/client/v4

Method HTTP request Description
wafContentScanningAddCustomScanExpressions POST /zones/{zone_id}/content-upload-scan/payloads Add Custom Scan Expressions
wafContentScanningDeleteCustomScanExpressions DELETE /zones/{zone_id}/content-upload-scan/payloads/{expression_id} Delete a Custom Scan Expression
wafContentScanningDisable POST /zones/{zone_id}/content-upload-scan/disable Disable Content Scanning
wafContentScanningEnable POST /zones/{zone_id}/content-upload-scan/enable Enable Content Scanning
wafContentScanningGetStatus GET /zones/{zone_id}/content-upload-scan/settings Get Content Scanning Status
wafContentScanningListCustomScanExpressions GET /zones/{zone_id}/content-upload-scan/payloads List Existing Custom Scan Expressions
wafContentScanningUpdateSettings PUT /zones/{zone_id}/content-upload-scan/settings Update Content Scanning Status

wafContentScanningAddCustomScanExpressions

WafProductApiBundleResponseCustomScanCollection wafContentScanningAddCustomScanExpressions(zoneId, wafContentScanningAddCustomScanExpressionsRequestInner)

Add Custom Scan Expressions

Add custom scan expressions for Content Scanning.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 
final BuiltList<WafContentScanningAddCustomScanExpressionsRequestInner> wafContentScanningAddCustomScanExpressionsRequestInner = ; // BuiltList<WafContentScanningAddCustomScanExpressionsRequestInner> | Array of custom scan expressions to add.

try {
    final response = api.wafContentScanningAddCustomScanExpressions(zoneId, wafContentScanningAddCustomScanExpressionsRequestInner);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningAddCustomScanExpressions: $e\n');
}

Parameters

Name Type Description Notes
zoneId String
wafContentScanningAddCustomScanExpressionsRequestInner BuiltList<WafContentScanningAddCustomScanExpressionsRequestInner> Array of custom scan expressions to add.

Return type

WafProductApiBundleResponseCustomScanCollection

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

wafContentScanningDeleteCustomScanExpressions

WafProductApiBundleResponseCustomScanCollection wafContentScanningDeleteCustomScanExpressions(zoneId, expressionId)

Delete a Custom Scan Expression

Delete a Content Scan Custom Expression.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 
final WafProductApiBundleCustomScanId expressionId = ; // WafProductApiBundleCustomScanId | 

try {
    final response = api.wafContentScanningDeleteCustomScanExpressions(zoneId, expressionId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningDeleteCustomScanExpressions: $e\n');
}

Parameters

Name Type Description Notes
zoneId String
expressionId WafProductApiBundleCustomScanId

Return type

WafProductApiBundleResponseCustomScanCollection

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

wafContentScanningDisable

WafProductApiBundleSchemasApiResponseCommon wafContentScanningDisable(zoneId)

Disable Content Scanning

Disable Content Scanning.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 

try {
    final response = api.wafContentScanningDisable(zoneId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningDisable: $e\n');
}

Parameters

Name Type Description Notes
zoneId String

Return type

WafProductApiBundleSchemasApiResponseCommon

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

wafContentScanningEnable

WafProductApiBundleSchemasApiResponseCommon wafContentScanningEnable(zoneId)

Enable Content Scanning

Enable Content Scanning.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 

try {
    final response = api.wafContentScanningEnable(zoneId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningEnable: $e\n');
}

Parameters

Name Type Description Notes
zoneId String

Return type

WafProductApiBundleSchemasApiResponseCommon

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

wafContentScanningGetStatus

WafProductApiBundleSchemasResponseStatus wafContentScanningGetStatus(zoneId)

Get Content Scanning Status

Retrieve the current status of Content Scanning.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 

try {
    final response = api.wafContentScanningGetStatus(zoneId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningGetStatus: $e\n');
}

Parameters

Name Type Description Notes
zoneId String

Return type

WafProductApiBundleSchemasResponseStatus

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

wafContentScanningListCustomScanExpressions

WafProductApiBundleResponseCustomScanCollection wafContentScanningListCustomScanExpressions(zoneId)

List Existing Custom Scan Expressions

Get a list of existing custom scan expressions for Content Scanning.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 

try {
    final response = api.wafContentScanningListCustomScanExpressions(zoneId);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningListCustomScanExpressions: $e\n');
}

Parameters

Name Type Description Notes
zoneId String

Return type

WafProductApiBundleResponseCustomScanCollection

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

wafContentScanningUpdateSettings

WafProductApiBundleSchemasResponseStatus wafContentScanningUpdateSettings(zoneId, wafContentScanningUpdateSettingsRequest)

Update Content Scanning Status

Update the Content Scanning status.

Example

import 'package:cloudflare_dart/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_email
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_email').apiKeyPrefix = 'Bearer';

final api = CloudflareDart().getContentScanningApi();
final String zoneId = zoneId_example; // String | 
final WafContentScanningUpdateSettingsRequest wafContentScanningUpdateSettingsRequest = ; // WafContentScanningUpdateSettingsRequest | Content Scanning settings to update.

try {
    final response = api.wafContentScanningUpdateSettings(zoneId, wafContentScanningUpdateSettingsRequest);
    print(response);
} catch on DioException (e) {
    print('Exception when calling ContentScanningApi->wafContentScanningUpdateSettings: $e\n');
}

Parameters

Name Type Description Notes
zoneId String
wafContentScanningUpdateSettingsRequest WafContentScanningUpdateSettingsRequest Content Scanning settings to update.

Return type

WafProductApiBundleSchemasResponseStatus

Authorization

api_key, api_token, api_email

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]