Question
It is required to send API request to BA, how can it be done?
Answer
- Create .xml file containing API request, its structure is described in the documentation API Methods list
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
Parser error
- verify the API structure, check an example in the documentation, make sure all the values are of correct type.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.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