Problem to create organization

50 views
Skip to first unread message

Moise MLQ

unread,
May 31, 2025, 7:05:14 AMMay 31
to flexiWAN users
Hi all,

when I try to create my organization with this command:

curl -X POST -k \
  "https://local.flexiwan.com:3443/api/organizations" \
  -H "accept: application/json" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2ODI4ODVjN2M5YjU1MjI1MmY5MTMwMGIiLCJ1c2VybmFtZSI6InVzZXIxQGV4YW1wbGUuY29tIiwib3JnIjpudWxsLCJvcmdOYW1lIjpudWxsLCJhY2NvdW50IjoiNjgyODg1YzdjOWI1NTIyNTJmOTEzMDA5IiwiYWNjb3VudE5hbWUiOiJhY2NvdW50IiwicGVybXMiOnsiam9icyI6MTUsImJpbGxpbmciOjMsImFjY291bnRzIjo3LCJvcmdhbml6YXRpb25zIjoxNSwiZGV2aWNlcyI6MTUsInRva2VucyI6MTUsImFwcGlkZW50aWZpY2F0aW9ucyI6MTUsIm1lbWJlcnMiOjE1LCJ0dW5uZWxzIjoxNSwicGVlcnMiOjE1LCJhY2Nlc3N0b2tlbnMiOjE1LCJub3RpZmljYXRpb25zIjoxNSwibm90aWZpY2F0aW9uc0NvbmYiOjAsInBhdGhsYWJlbHMiOjE1LCJtbHBvbGljaWVzIjoxNSwiYXBwbGljYXRpb25zIjoxNSwicW9zcG9saWNpZXMiOjE1LCJmaXJld2FsbHBvbGljaWVzIjoxNSwidnJycCI6MTV9LCJtZmFWZXJpZmllZCI6ZmFsc2UsImlhdCI6MTc0ODY0MzU2MywiZXhwIjoxNzQ5MjQ4MzYzfQ.EGbPLr4PjMJ7O2gqP9B6mhVMxM3nARqe7yX2P7oYdZM" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "uc",
  "description": "uc univ",
  "group": "Default",
  "encryptionMethod": "psk"
}'

I have this error: {"error":"Cannot read properties of undefined (reading 'rules')","code":500,"data":{}}

Can someone helps me with this?

Thank you a lot.

Best regards,
Moise M

David

unread,
Jun 1, 2025, 2:02:06 AMJun 1
to flexiWAN users, Moise MLQ
Hi,

1. This error occurs due to  bug in "backend/services/OrganizationsService.j" or notification.js files. It would be good if you add console in the files and understand the flow. Another suggestion is to enable default notifications and then check it.
2. try the following with more parameters
curl -v -k -X 'POST' \
  'https://local.flexiwan.com:3443/api/organizations' \
  -H 'accept: application/json' \
  -H 'APIKEY: PASTE_YOUR_KEY' \
  -H 'Authorization: Bearer PASTE_YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "name",
  "description": "description",
  "group": "group",
  "encryptionMethod": "psk",
  "vxlanPort": 4789,
  "tunnelRange": "10.100.0.0"
}'
3. also make sure that  accesskey should be generated and used with the above api . 
Reply all
Reply to author
Forward
0 new messages