Search Engine: Elastic

Article ID: 129774, created on Nov 1, 2016, last review on Nov 1, 2016

  • Applies to:
  • Business Automation

Question

It is required to send API request to BA, how can it be done?

Answer

  1. Create .xml file containing API request, its structure is described in the documentation API Methods list
  2. Send an API request:

    curl -d@'<xml request>' -H 'Content-type:text/xml' https://<Business Automation Core server>:<Port>/RPC2
    

    for example,

    curl -d@'DomainSubscrAdd_API.xml' -H 'Content-type:text/xml' https://10.10.10.100:5224/RPC2
    

    as described in Sending Request Through cURL;

Possible errors

  1. Parser error - verify the API structure, check an example in the documentation, make sure all the values are of correct type.
  2. Data packet out of range - verify the API call structure according to the docs, generic_worker.log can additionally be checked to find out where API call failed.
  3. Some base64 encoded error message, can be decoded with

    echo message |base64 -d
    

    for example

    [root@server ~]# echo QWNjb3VudCAjMTAwMDAyMSBpcyBub3QgcmVnaXN0ZXJlZCB1bmRlciB0aGUgVmVuZG9yIEFjY291bnQgIzEwMDAwMDcuIApFcnJvciBDb2RlOiAweDJmM2Y3MWFjLgpSZXBvcnQgSUQ6IDM0NzMK |base64 -d
    Account #1000021 is not registered under the Vendor Account #1000007.
    Error Code: 0x2f3f71ac.
    Report ID: 3473
    

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF