Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help API automation from hotspot

Good morning, dear friends, can you help me with a situation?

We are doing a process to automate the creation of a voucher based on the hotspot we created, a series of errors are appearing, can you tell me what it could be?

<?xml version="1.0" encoding="UTF-8"?>
<Response APIVersion="1805.2" IPS_CAT_VER="1">
    <Login>
        <status>Authentication Successful</status>
    </Login>
    <Hotspot transactionid="">
        <Status code="501">Configuration parameters validation failed.</Status>
        <InvalidParams>
            <Params>/Hotspot/CustomizationType</Params>
            <Params>/Hotspot/Interfaces/Interface</Params>
            <Params>/Hotspot/HotspotType</Params>
            <Params>/Hotspot/TermsOfUse</Params>
            <Params>/Hotspot/LoginPageTemplate</Params>
        </InvalidParams>
    </Hotspot>
</Response>




Below is the payload being used to send


<Request APIVersion="1805.2">
	<Login>
		<Username>login</Username>
		<Password>senha</Password>
	</Login>
	<Set operation="update">
		<Hotspot>
			<Name>Visitantes</Name>
			<Users>
				<User>voucher</User>
			</Users>
			<Interfaces>
				<Interface>VLAN WIFI GUEST</Interface>
			</Interfaces>
			<HotspotType>Voucher</HotspotType>
			<Vouchers>
				<Voucher>Voucher-1h</Voucher>
			</Vouchers>
			<DevicePerVoucher>2</DevicePerVoucher>
		</Hotspot>
	</Set>
</Request>


This thread was automatically locked due to age.
Parents
  • Create one manually in the interface and then use API to grab the current hotspot configuration - you should be able to take the xml output and modify as required.

    The following 

    <Params>/Hotspot/CustomizationType</Params> - missing
    <Params>/Hotspot/Interfaces/Interface</Params> - wrong (could be because something else is missing)
    <Params>/Hotspot/HotspotType</Params> - wrong
    <Params>/Hotspot/TermsOfUse</Params> - missing
    <Params>/Hotspot/LoginPageTemplate</Params> - missing

    Or you can take a look at the following, the example gives you what you need to complete the payload, but Id just create one manually and then grab that via api as this should have all that is required, you just need to drop the transationid from the "hotspot".

    https://docs.sophos.com/nsg/sophos-firewall/18.0/API/PROTECT/Wireless/HotSpot/operations/AddHotspot&UpdateHotspot.html

Reply
  • Create one manually in the interface and then use API to grab the current hotspot configuration - you should be able to take the xml output and modify as required.

    The following 

    <Params>/Hotspot/CustomizationType</Params> - missing
    <Params>/Hotspot/Interfaces/Interface</Params> - wrong (could be because something else is missing)
    <Params>/Hotspot/HotspotType</Params> - wrong
    <Params>/Hotspot/TermsOfUse</Params> - missing
    <Params>/Hotspot/LoginPageTemplate</Params> - missing

    Or you can take a look at the following, the example gives you what you need to complete the payload, but Id just create one manually and then grab that via api as this should have all that is required, you just need to drop the transationid from the "hotspot".

    https://docs.sophos.com/nsg/sophos-firewall/18.0/API/PROTECT/Wireless/HotSpot/operations/AddHotspot&UpdateHotspot.html

Children
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?