Wrong query displayed in GUI "show API code" feature
When searching using the "only_atoms" keyword, the query displayed in the "Show API code" feature is wrong:
import requests
response = requests.post('http://nomad-lab.eu/prod/rae/api/archive/query', json={
'query': {
'domain': 'dft',
'dft.basis_set': '(L)APW+lo',
'dft.system': 'bulk',
'dft.code_name': 'exciting',
'only_atoms': 'O'
}
})
data = response.json()
inspection of data
yields:
>> data
{'code': 400,
'description': 'The browser (or proxy) sent a request that this server could not understand.',
'errors': {'query.only_atoms': "'O' is not of type 'array'"},
'message': 'Input payload validation failed',
'name': 'Bad Request'}
The problem can be avoided by manually changing the query part into an array:
'only_atoms': ['O']