Troubleshooting
Problem
When trying to pull information from a reference table by using the API, an error is displayed:
{"http_response":{"code":404,"message":
"We could not find the resource you requeference_data\/tables\/My%20Table\/)
is not a known endpoint resource. Please refer to documentation for list of endpoint resources."}
Resolving The Problem
The rest API call (the one that contains the URL) does not end with "/". If you use an "/" the system expects more information after the slash. The table from the error message was created by using the Reference Data Management app. If a table is not created, you receive [ ] as a response from the REST API call. You can test the response by using the API test tool.
To test the cURL responses:
- Log in to the QRadar Console.
- Click the navigation menu (☰) > Interactive API for Developers.
- Click reference_data > Tables.
- Add the curl string to the cURL text box
- With a slash "/", you get the "404" error:
curl -S -X GET -u admin -H 'Range: items=0-49' -H 'Version: 13.0' -H 'Accept: application/json' 'https://10.10.10.1/api/reference_data/tables/My%20Table/'
Enter host password for user 'admin': {"http_response":{"code":404,"message":"We could not find the resource you requested."},"code":4,"description":"","details":{},"message":"Relative path (\/reference_data\/tables\/My Table\/) is not a known endpoint resource. Please refer to documentation for list of endpoint resources."}
- To pull all tables information use the call:
curl -s -X GET -u admin -H 'Range: items=0-49' -H 'Version: 13.0' -H 'Accept: application/json' 'https://x.x.x.x/api/reference_data/tables'
Enter host password for user 'admin': [{"timeout_type":"FIRST_SEEN","number_of_elements":1,"creation_time":16092628931 14,"name":"Tableone","key_name_types":{"Inner Key 1":"ALN"},"element_type":"ALN"
- To pull information for a specific table you need to add the /name to the endpoint:
curl -S -X GET -u admin -H 'Range: items=0-49' -H 'Version: 13.0' -H 'Accept: application/json' 'https://10.10.10.1/api/reference_data/tables/My%20Table'
Results
Though the article was created for the reference table, the slash at the end applies to other API calls too.
- With a slash "/", you get the "404" error:
Document Location
Worldwide
[{"Line of Business":{"code":"LOB24","label":"Security Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSBQAC","label":"IBM Security QRadar SIEM"},"ARM Category":[{"code":"a8m0z000000cwsyAAA","label":"Admin Tasks"}],"ARM Case Number":"TS004020452","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Version(s)"}]
Was this topic helpful?
Document Information
Modified date:
05 January 2021
UID
ibm16257619