Description
The addDAPXml operation handles configuration related to DAPXml model.
This API call is not allowed on the standby unit in an HA pair.
Creates a new DAPXml configuration. There only be one DAPXml configured at any given time.
HTTP request
POST /api/fdm/v6/object/dapxml
Data Parameters
| Parameter | Required | Type | Description | |||
|---|---|---|---|---|---|---|
| name | True | string | The DAP policy name | |||
| description | False | string | The description of the DAP policy Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
| dapXmlConfig | False | string | A base64 encoded Xml string containing the DAP records Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
| authorizationAttributes | True | [object] | The actions to be performed on the DAP records Field level constraints: cannot be null. (Note: Additional constraints might exist) |
|||
| hostScanXmlConfig | False | string | A base64 encoded Xml string containing the Hostscan configuration Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
| type | True | string | A UTF8 string, all letters lower-case, that represents the class-type. This corresponds to the class name. | |||
Example
curl -X POST \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"authorizationAttributes": [
{
"action": "CONTINUE",
"dapRecordName": "string",
"message": "string",
"networkAcl": {
"id": "string",
"name": "string",
"type": "string",
"version": "string"
},
"priority": 0,
"type": "dapauthorizationattributes"
}
],
"dapXmlConfig": "string",
"description": "string",
"hostScanXmlConfig": "string",
"id": "string",
"name": "string",
"type": "dapxml",
"version": "string"
}' \
"https://${HOST}:${PORT}/api/fdm/v6/object/dapxml"
from bravado.requests_client import RequestsClient
from bravado.client import SwaggerClient
def get_client(host, token):
http_client = RequestsClient()
http_client.ssl_verify = False
http_client.set_api_key(
host,
"Bearer {}".format(token),
param_name="Authorization",
param_in="header"
)
return SwaggerClient.from_url(
"https://{}/apispec/ngfw.json".format(host),
http_client=http_client,
config={
"validate_responses": False,
"validate_swagger_spec": False
}
)
def add_dap_xml(client, body):
return client.DAPXml.addDAPXml(
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
body = {'authorizationAttributes': [{'action': 'CONTINUE',
'dapRecordName': 'string',
'message': 'string',
'networkAcl': {'id': 'string',
'name': 'string',
'type': 'string',
'version': 'string'},
'priority': 0,
'type': 'dapauthorizationattributes'}],
'dapXmlConfig': 'string',
'description': 'string',
'hostScanXmlConfig': 'string',
'name': 'string',
'type': 'dapxml'}
add_dap_xml(client, body)