Search code examples
python-3.xrestpython-requestsjson-rpc

Can't seem to find the issue with the requestID parameter for the request header


I am trying to pull data from a REST API that uses a "similar standard to JSON RPC". The params I am passing look right according to the documentation here and here. The error I am receiving is ...message:"Header missing request ID".... I am unsure what I am missing that would properly declare the requestID.

I have looked at the documentation provided via the API I am trying to pull data from but it's not very helpful considering it's all in PHP and cURL. I am trying to complete this task using python-requests.

getParams = {'method': 'getCustomers', 'params':{'where':'', 'limit': 2}, 'id': 'getCustomers'}

Result:

{"result":null,"error":{"code":102,"message":"Header missing request ID","data":[]},"id":null}

The return result should contain a list of All Customers and their attributes in JSON format.


Solution

  • Turns out there is nothing wrong with the code I am using. There is an issue with the API I am attempting to call.