Description
The postuploadconfigfile operation handles configuration related to ConfigImportExportFileInfo model.
This API call is not allowed on the standby unit in an HA pair.
The request payload must contain a single file-item with a file-name field. The file-name extension must be either '.txt' or '.zip' and the actual file content format must be consistent with the file extension
HTTP request
POST /api/fdm/v6/action/uploadconfigfile
Data Parameters
| Parameter | Required | Type | Description | |||
|---|---|---|---|---|---|---|
| diskFileName | False | string | Name of the disk file saved in a system directory Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
| dateModified | False | string | Most recent update time, in UTC Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
| sizeBytes | False | integer | Size of the file, in number of bytes | |||
| id | False | string | Unique ID of the file, which is local disk file name Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist) |
|||
| type | True | string | configimportexportfileinfo | |||
Example
curl -X POST \
--header "Accept: application/json" \
--header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
-d '{
"dateModified": "string",
"diskFileName": "string",
"id": "string",
"sizeBytes": 0,
"type": "ConfigImportExportFileInfo"
}' \
"https://${HOST}:${PORT}/api/fdm/v6/action/uploadconfigfile"
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 postuploadconfigfile(client, body):
return client.ConfigurationImportExport.postuploadconfigfile(
body=body
).response().result
if __name__ == "__main__":
host = "ftd.example.com"
token = "access_token"
client = get_client(host, token)
body = {'dateModified': 'string',
'diskFileName': 'string',
'id': 'string',
'sizeBytes': 0,
'type': 'ConfigImportExportFileInfo'}
postuploadconfigfile(client, body)