@Danp
I used the ?debug and from console i got the json call , thats okay.
Using @mbaron script , i get the methods and try to create network and looks like i could. Thank you very much
import json
import aiohttp
import asyncio
from jsonrpc_websocket import Server
async def routine():
async with aiohttp.ClientSession() as client:
server = Server('ws://XO ip address/api/', client)
await server.ws_connect()
# No signIn required
methodsInfoResult = await server.system.getMethodsInfo()
print('\n'.join([str(e) for e in methodsInfoResult.keys()]))
# signIn required
result = await server.session.signIn(username='username', password='password') # email attribute is working in place of username
result = await server.network.create (pif='8369d867-a6f8-61f2-8132-3b485c3b3a63',pool='dd74abdd-7dd9-e95b-a241-dbd5b12b3ae1',name='deneme3',vlan=2346)
print('[')
print(', \n'.join([str(json.dumps(e, indent=4)) for e in result.values()]))
print(']')
asyncio.get_event_loop().run_until_complete(routine())
result = await server.network.create (pif='8369d867-a6f8-61f2-8132-3b485c3b3a63',pool='dd74abdd-7dd9-e95b-a241-dbd5b12b3ae1',name='deneme3',vlan=2346)
I guess its will be perfect to move everything rest api and have well documentation.
One thing, i can not delete created test network because of HA, is it normal ?
Regards
VM