Our webservices api uses json-rpc version 2.0.

You can look at all Public functions in lib/pf/

To answer your question you would need to do this with two api calls.

First create the user

curl -H "Content-Type: application/json-rpc" -d '{"jsonrpc":"2.0", "id":0, "method":"add_person" , "params" : ["pid","bob","email",""]}' localhost:9090

Then register the node for the user

curl -H "Content-Type: application/json-rpc" -d '{" jsonrpc":"2.0", "id":0, "method":"register_node" , "params" : ["pid","bob","mac","01:02:03:04:05:06"]}' localhost:9090

James Rouzier :: +1.514.447.4918 (x115)  ::
Inverse inc. :: Leaders behind SOGo ( and PacketFence 

On 2015-07-24 6:50 AM, Andy A wrote:

I am trying to register a node using curl but I keep getting the same exception. I would like to find a way to register / unregister node without using the captive portal. If anyone has some different suggestions on how to do that, that would be very helpful. I am using the following curl request

curl -H "Content-Type: application/x-www-form-urlencoded" —data-urlencode '{ "destination_url":" <>","by_email":"Sign Up", "firstname":"testcurl","lastname":"curluser","email":"","aup_signed":"on"}'

I get the following error in the response.

Caught exception in captiveportal::Controller::Signup->validateMandatoryFields "Can't use an undefined value as an ARRAY reference at /usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Controller/ line 589."



PacketFence-devel mailing list

PacketFence-devel mailing list

Reply via email to