Author Topic: Regarding API request  (Read 4102 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Regarding API request
« on: December 14, 2017, 04:56:47 AM »
Hi, I have one question regarding API,

In the CWP panel, Under Plugin->API Manager, I have configured API access & then
I have added remote IP address to this file  “/usr/local/cwp/.conf/api_allowed.conf”
Also I have added API key to this file “/usr/local/cwp/.conf/api_key.conf”
( as per the documentation in http://wiki.centos-webpanel.com/cwp-account-api)

If I click to any function in the API manager its showing like below.

Url:   https://myip:2304/v1/packages   Method:   POST   Actions:   add, udp, del, list   Return:   JSON / XML

My question is how can call API function using curl method in the termianl. Can you please show me one example OR documentation link for the same.

If I do like this in the termianl its not working
# curl https://myip:2304/v1/packages

Please give me one clear example to perform API request in the termianl.

Regards
kiran upadhya