I have device that cannot be reached from the outside, but I can control it through IC2. Can I send API commands through IC2 device url?
Hey,
Yes, you can actually send both IC2 API commands and router API commands.
With IC2 API commands it’s rather simple, here is it’s documentation. But with router API commands it gets a little more complicated - there are two IC2 API commands that encapsulate a router API command. Basically this allows you to send router API commands without actually having direct access to the router.
The two commands:
GET /rest/o/{ORGANIZATION_ID}/d/{DEVICE_ID}/devapi/{DEVICE_API_COMMAND}
POST /rest/o/{ORGANIZATION_ID}/d/{DEVICE_ID}/devapi/{DEVICE_API_COMMAND}
Here’s a an example to get firmware information from a device:
“https://api.ic.peplink.com/rest/o/XXXXX/n/1/d/119/devapi/info.firmware”
You can find the latest router API documentation here.
Best Regards,
Aivaras