Encoding API calls in URL format

noc@gibfibrespeed.net mberniz at gibfibrespeed.net
Fri Dec 9 03:28:51 EST 2016


Dear Oliver, 

Thank you very much for your answer. I will have a look at your wrapper. 

The problem is I have a CRM i need to create presets from. It comes with an HTTP GET/POST based integration method, but I would need to use PUT/DELETE request types to manipulate presets through the API. I am trying to figure the easiest way to achiveve that. 

I do not have coding skills so my options are limited. 

Kind regards, 

Miguel 



----- Original Message -----

From: "Oliver Kraitschy" <oliver at okraits.de> 
To: noc at gibfibrespeed.net, "Community support for GenieACS users" <users at lists.genieacs.com> 
Cc: "noc at gibfibrespeed.net" <mberniz at gibfibrespeed.net> 
Sent: Friday, 9 December, 2016 8:27:38 AM 
Subject: Re: Encoding API calls in URL format 

Hello, 

no, it isn't possible in a simple way. The API only accepts requests in 
the syntax described in the wiki. 

What are you trying to achieve? 

If you want to use the API in a more simple way, you have to write a 
wrapper for it. 

I did that, you can check it out on github: 

https://github.com/TDT-GmbH/python-genieacs 

Greetings, 
Oliver 

Am 08.12.2016 20:10, schrieb noc at gibfibrespeed.net: 
> Hello everyone, 
> 
> Is it possible to encode API calls into a simple URL format? 
> 
> For example, I need to turn curl -i 
> 'http://localhost:7557/presets/783d5b024367-DATA' -X DELETE into 
> http://something 
> 
> or 
> 
> curl -i 'http://172.16.5.19:7557/presets/783d5b024367-DATA' \ 
> -X PUT \ 
> --data '{ "weight": 1, "precondition": 
> "{\"summary.serialNumber\":\"783d5b024367\", \"_tags\":\"fase1\"}", 
> "configurations": [ { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username", 
> "value": "ps4" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password", 
> "value": "ps4" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.NATEnabled", 
> "value": "true" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_BROADCOM_COM_FirewallEnabled", 
> "value": "true" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.PPPAuthenticationProtocol", 
> "value": "AUTO_AUTH" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_BROADCOM_COM_IfName", 
> "value": "ppp0.0" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_BROADCOM_COM_VlanMuxID", 
> "value": "200" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.X_BROADCOM_COM_VlanMux8021p", 
> "value": "7" }, { "type": "value", "name": 
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Enable", 
> "value": "true" }, { "type": "value", "name": 
> "InternetGatewayDevice.Layer3Forwarding.X_BROADCOM_COM_DefaultConnectionServices", 
> "value": "ppp0.0" }, { "type": "value", "name": 
> "InternetGatewayDevice.X_BROADCOM_COM_NetworkConfig.DNSServers", 
> "value": "8.8.8.8,8.8.4.4" } ] }' 
> 
> into http://something 
> 
> Is it possible to do it in a simple way? 
> 
> Thanks in advance, 
> 
> Miguel 
> _______________________________________________ 
> Users mailing list 
> Users at lists.genieacs.com 
> http://lists.genieacs.com/mailman/listinfo/users 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20161209/635b544a/attachment.html>


More information about the Users mailing list