Description

The postupdategeolocationfromfile operation handles configuration related to GeoLocationFileUpload model. 
This API call is not allowed on the standby unit in an HA pair.

HTTP request

POST /api/fdm/v6/action/updategeolocationfromfile

Data Parameters

Parameter Required Type Description
version False string unused
name False string Name of the file to be installed
fileName False string Name of the file to be installed
Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist)
checkSum False string SHA-512 sum of the package
Field level constraints: must match pattern ^[a-fA-F0-9]{128}$. (Note: Additional constraints might exist)
id False string unused
Field level constraints: must match pattern ^((?!;).)*$. (Note: Additional constraints might exist)
type True string geolocationfileupload

Example

curl -X POST \
    --header "Accept: application/json" \
    --header "Authorization: Bearer ${ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    -d '{
        "checkSum": "string",
        "fileName": "string",
        "id": "string",
        "name": "string",
        "type": "geolocationfileupload",
        "version": "string"
    }' \
    "https://${HOST}:${PORT}/api/fdm/v6/action/updategeolocationfromfile"
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 postupdategeolocationfromfile(client, body):
    return client.GeoLocationFileUpload.postupdategeolocationfromfile(
        body=body
    ).response().result


if __name__ == "__main__":
    host = "ftd.example.com"
    token = "access_token"
    client = get_client(host, token)

    body = {'checkSum': 'string',
 'fileName': 'string',
 'id': 'string',
 'name': 'string',
 'type': 'geolocationfileupload',
 'version': 'string'}

    postupdategeolocationfromfile(client, body)