Difference between revisions of "MOR API recording update"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:


* From '''MOR X16''': '''/api/recording_update'''
* From '''MOR X16''': '''/api/recording_update'''
<br><br>
<br>
===Parameters===   
===Parameters===   


Parameters which are '''included''' into hash:
Parameters which are '''included''' into hash:


* recording_id - ID of the recording. '''Required.'''
* recording_id - ID of the recording. '''Required.'''
* comment - comment for the recording. '''Optional.'''


'''Note that parameters are shown in the same order as they have to be when generating the hash. The last parameter in a row is API_Secret_Key'''
'''Note that parameters are shown in the same order as they have to be when generating the hash. The last parameter in a row is API_Secret_Key'''
Line 18: Line 16:
Parameters which are '''not included''' into hash:
Parameters which are '''not included''' into hash:
* u - username to login. '''Required.'''
* u - username to login. '''Required.'''
* comment - comment for the recording. '''Optional.'''
* [[MOR API hash construction | hash]] - SHA1 hash constructed using parameters above and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required''' (if setting '''Disable hash checking''' is not checked).  
* [[MOR API hash construction | hash]] - SHA1 hash constructed using parameters above and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required''' (if setting '''Disable hash checking''' is not checked).  


Line 44: Line 43:
'''Errors''':  
'''Errors''':  
* <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>Access Denied</error> - Such username does not exist in the database or it was not specified.  
* <error>Access Denied</error> - Such username does not exist in the database or cannot access specified recording.
* <error>Recording was not found</error> - Such Recording ID does not exist for a specified user.
* <error>Recording was not found</error> - Such Recording ID does not exist.





Latest revision as of 16:20, 18 August 2021

Description

Updates comment for a specific recording id.

Usage

  • From MOR X16: /api/recording_update


Parameters

Parameters which are included into hash:

  • recording_id - ID of the recording. Required.

Note that parameters are shown in the same order as they have to be when generating the hash. The last parameter in a row is API_Secret_Key

Parameters which are not included into hash:

  • u - username to login. Required.
  • comment - comment for the recording. Optional.
  • hash - SHA1 hash constructed using parameters above and API_Secret_Key ( More described in Constructing hash). Required (if setting Disable hash checking is not checked).


Request

We have API Secret Key = secret We want to update recording id 82878881 with comment 12346

We send:

HTML POST:  http://<SERVER_IP>/billing/api/recording_update?u=admin&recording_id=82878881&comment=12346&hash=85ef4ad4eb5a582e07f07d9148a8faf8b9ce1cdd



Returns

Success: Everything is ok. The recording has been updated.


<?xml version="1.0" encoding="UTF-8"?>
<page>
  <status>
    <success>Recording was successfully updated</success>
  </status>
</page>

Errors:

  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>Access Denied</error> - Such username does not exist in the database or cannot access specified recording.
  • <error>Recording was not found</error> - Such Recording ID does not exist.


See also