We are trying to validate Publisher ID and API token in staging of IATI Registry. We are assuming that organisation has created publisher account in staging of IATI registry and hence have access to their Publisher ID and API token.
We compare the name of organisation and IATI Organisation Identifier with the result of this API call to validate the publisher ID. However we are getting the following error:
{
"help": "https://staging.iatiregistry.org/api/3/action/help_show?name=organization_show",
"success": false,
"error": {
"message": "Search error: 'SOLR returned an error running query: {\'sort\': \'title_string asc\', \'fq\': [u\'+owner_org:\"1bcb6ea4-9086-4fb3-a0e7-eb3036a72abb\" -dataset_type:harvest\', u\'+site_id:\"iatiregistry\"\', \'+state:active\'], \'facet.mincount\': 1, \'rows\': 0, \'df\': \'text\', \'facet\': u\'false\', \'facet.limit\': \'1000\', \'wt\': \'json\', \'q\': \':\', \'fl\': \'id validated_data_dict\'} Error: SolrError(u\"Failed to connect to server at \'http://solr:8983/solr/ckan/select/?sort=title_string+asc&fq=%2Bowner_org%3A%221bcb6ea4-9086-4fb3-a0e7-eb3036a72abb%22+-dataset_type%3Aharvest&fq=%2Bsite_id%3A%22iatiregistry%22&fq=%2Bstate%3Aactive&facet.mincount=1&rows=0&df=text&facet=false&q=%2A%3A%2A&facet.limit=1000&wt=json&fl=id+validated_data_dict\', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host=\'solr\', port=8983): Max retries exceeded with url: /solr/ckan/select/?sort=title_string+asc&fq=%2Bowner_org%3A%221bcb6ea4-9086-4fb3-a0e7-eb3036a72abb%22+-dataset_type%3Aharvest&fq=%2Bsite_id%3A%22iatiregistry%22&fq=%2Bstate%3Aactive&facet.mincount=1&rows=0&df=text&facet=false&q=%2A%3A%2A&facet.limit=1000&wt=json&fl=id+validated_data_dict (Caused by NewConnectionError(\'<urllib3.connection.HTTPConnection object at 0x7f39ed101290>: Failed to establish a new connection: [Errno -2] Name or service not known\',))\",)'",
"__type": "Search Error"
}
}
Similarly, we are trying to validate API token key that organisation has provided. We have access to staging of IATI registry and the organizations we have created in it. However, we can not access the details of the organisation, where we can create the API token for that particular organisation. But we used another API to create token for that organisation. And when trying to validate the newly created API token via following API but we are getting empty results:
Brief Description
We are trying to validate Publisher ID and API token in staging of IATI Registry. We are assuming that organisation has created publisher account in staging of IATI registry and hence have access to their Publisher ID and API token.
To validate the Publisher ID, we are using the following API: https://staging.iatiregistry.org/api/action/organization_show?id=test_123_user
We compare the name of organisation and IATI Organisation Identifier with the result of this API call to validate the publisher ID. However we are getting the following error:
{ "help": "https://staging.iatiregistry.org/api/3/action/help_show?name=organization_show", "success": false, "error": { "message": "Search error: 'SOLR returned an error running query: {\'sort\': \'title_string asc\', \'fq\': [u\'+owner_org:\"1bcb6ea4-9086-4fb3-a0e7-eb3036a72abb\" -dataset_type:harvest\', u\'+site_id:\"iatiregistry\"\', \'+state:active\'], \'facet.mincount\': 1, \'rows\': 0, \'df\': \'text\', \'facet\': u\'false\', \'facet.limit\': \'1000\', \'wt\': \'json\', \'q\': \':\', \'fl\': \'id validated_data_dict\'} Error: SolrError(u\"Failed to connect to server at \'http://solr:8983/solr/ckan/select/?sort=title_string+asc&fq=%2Bowner_org%3A%221bcb6ea4-9086-4fb3-a0e7-eb3036a72abb%22+-dataset_type%3Aharvest&fq=%2Bsite_id%3A%22iatiregistry%22&fq=%2Bstate%3Aactive&facet.mincount=1&rows=0&df=text&facet=false&q=%2A%3A%2A&facet.limit=1000&wt=json&fl=id+validated_data_dict\', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host=\'solr\', port=8983): Max retries exceeded with url: /solr/ckan/select/?sort=title_string+asc&fq=%2Bowner_org%3A%221bcb6ea4-9086-4fb3-a0e7-eb3036a72abb%22+-dataset_type%3Aharvest&fq=%2Bsite_id%3A%22iatiregistry%22&fq=%2Bstate%3Aactive&facet.mincount=1&rows=0&df=text&facet=false&q=%2A%3A%2A&facet.limit=1000&wt=json&fl=id+validated_data_dict (Caused by NewConnectionError(\'<urllib3.connection.HTTPConnection object at 0x7f39ed101290>: Failed to establish a new connection: [Errno -2] Name or service not known\',))\",)'", "__type": "Search Error" } }
Similarly, we are trying to validate API token key that organisation has provided. We have access to staging of IATI registry and the organizations we have created in it. However, we can not access the details of the organisation, where we can create the API token for that particular organisation. But we used another API to create token for that organisation. And when trying to validate the newly created API token via following API but we are getting empty results:
https://staging.iatiregistry.org/api/action/organization_list_for_user
Result:
{ "help": "https://staging.iatiregistry.org/api/3/action/help_show?name=organization_list_for_user", "success": true, "result": [] }
Severity High