Difference between revisions of "MOR API phonebook edit"
From Kolmisoft Wiki
Jump to navigationJump to search
(Undo revision 12112 by Mindaugasm (Talk)) |
|||
Line 1: | Line 1: | ||
''This functionality is available from [[MOR | ''This functionality is available from [[MOR 11| MOR 11]]'' | ||
[[MOR API]] | [[MOR API]] | ||
Phonebook edit | |||
<br><br> | <br><br> | ||
Line 10: | Line 10: | ||
<br><br> | <br><br> | ||
* Call: /api/ | * Call: /api/phonebook_edit | ||
* Methods: POST, GET(if allowed, not recomended) | * Methods: POST, GET(if allowed, not recomended) | ||
* Params: | * Params: | ||
** | ** phonebook_id - Phonebook ID in MOR database. '''Required'''. | ||
** u - username to login. '''Required'''. | ** u - username to login. '''Required'''. | ||
** p - password to login. '''Required'''. | ** p - password to login. '''Required'''. | ||
** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ||
** number | |||
** name | |||
** speeddial | |||
* Returns: | * Returns: | ||
**Success | **Success | ||
*** <status> | *** <status>Phonebook saved</status> | ||
** Errors: | ** Errors: | ||
*** <error> | *** <error>Phonebook was not saved</error> | ||
*** < | **** <message>problem message</message> | ||
*** <error> | *** <error>Phonebook was not found</error> - Phonebook was not found using phonebook_id. Use correct phonebook id. | ||
*** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | *** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
*** <error>Dont be so smart</error> - User with UNIQUEHASH not found or params id not send. Enter correct id. | |||
<br><br> | <br><br> | ||
---- | ---- | ||
*Example: | *Example: | ||
**We have | **We have phonebook_id = 123, API Secret Key = 456789 | ||
**Hash string to be converted: "123456789" | **Hash string to be converted: "123456789" | ||
**We send: | **We send: | ||
***/api/ | ***/api/phonebook_edit?u=admin&p=admin&phonebook_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441 | ||
'''* Note that username and password are not included in hash''' | '''* Note that username and password are not included in hash''' |
Revision as of 14:26, 12 January 2012
This functionality is available from MOR 11
Phonebook edit
- Call: /api/phonebook_edit
- Methods: POST, GET(if allowed, not recomended)
- Params:
- phonebook_id - Phonebook ID in MOR database. Required.
- u - username to login. Required.
- p - password to login. Required.
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
- number
- name
- speeddial
- Returns:
- Success
- <status>Phonebook saved</status>
- Errors:
- <error>Phonebook was not saved</error>
- <message>problem message</message>
- <error>Phonebook was not found</error> - Phonebook was not found using phonebook_id. Use correct phonebook id.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>Dont be so smart</error> - User with UNIQUEHASH not found or params id not send. Enter correct id.
- <error>Phonebook was not saved</error>
- Success
- Example:
- We have phonebook_id = 123, API Secret Key = 456789
- Hash string to be converted: "123456789"
- We send:
- /api/phonebook_edit?u=admin&p=admin&phonebook_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* Note that username and password are not included in hash