Difference between revisions of "MOR API device delete"

From Kolmisoft Wiki
Jump to navigationJump to search
(Replaced content with '=Description= MOR API Delete device <br><br> =Usage=')
Line 3: Line 3:
<br><br>
<br><br>
=Usage=
=Usage=
* Call: /api/device_delete
* For Backwards-compatibility old name 'device_destroy' is also usable. Call: /api/device_destroy
* Methods: POST, GET(if allowed, not recomended)
<br><br>
===Parametres===
* device - Device ID in MOR database, whose datas we want to delete. '''Required'''.
* u - username for authentication. '''Required'''.
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''device''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
<br><br>
===Request===
We have device = 123, API Secret Key = 456789
We send:
HTML POST: http://<SERVER_IP>/billing/api/device_delete?u=admin&p=admin&device=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
'''NOTE that username and password are not included in hash'''
<br><br>
===Returns===
'''Success'''
<?xml version="1.0" encoding="UTF-8"?>
<page>
  <status>Device was deleted</status>
</page>
<br><br>
----
'''Errors'''
* <error>Device was not found</error> - Device was not found using device. Use correct device id.
* <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
* <error>Registration over API is disabled</error> - Setting: Settings->API->API allow Registration, is off. Turn on API allow Registration.
* <error>Access Denied</error> - User with UNIQUEHASH not found or params id not send. Enter correct id.
<br><br>
=See also=
* [[MOR API]]

Revision as of 12:22, 5 August 2013

Description

MOR API Delete device

Usage