General API Calls |
Description:
This is a method for external applications to submit data to Orchestrator that is persisted in a database table (shared_states). Example scenario: Rhozet WFS can send a Web notification upon transcode complete or failure. This API method requires authentication.
To simplify searching for the data entered in the table, users can pass two parameters to make each entry uniquely identifiable. The fields are identifier which is a string, and uniq_id, which is an integer.
All key-value pairs (except for login, password, identifier,uniq_id) will be stored in a serialized hash in the shared_states table.
The database entries can be searched using a MySQL query or a Ruby query.
select id, entry from shared_states where aggregate_type = “identifier” and aggregate_id = uniq_id
SharedState.find(:all, :conditions => [“aggregate_type = ? and aggregate_id = ?”, identifier, uniq_id])
Usage:
http://localhost/aspera/orchestrator/api/custom_api_call?login=admin&password=aspera&identifier=<>&job_id=123&<key_1>=<value_1>...&<key_n>=<value_n>
http://localhost/aspera/orchestrator/api/custom_api_call?login=admin&password=aspera&identifier=testing&uniq_id=321&job_id=123&job_result=success
<?xml version="1.0"?> <api_call action="custom_api_call"> <shared_state> <id>34</id> <creation_time>"2014-03-22 21:11:35 UTC"</creation_time> </shared_state> </api_call>