If I place an API call to get the “Naming Series” DocType…
curl GET 'http://myhost/api/resource/DocType?filters=[["name", "like", "Na%"]]&fields=["name", "module"]' \
-H 'Authorization: token 71d8.....a11af2:4eb.....319f'
… I get back …
{
"data": [
{
"name": "Naming Series",
"module": "Setup"
}
]
}
However, if I try to list all Naming Series like this …
curl GET 'http://myhost/api/resource/Naming Series' \
-H 'Authorization: token 71d8.....a11af2:4eb.....319f'
… or like this …
curl GET 'http://myhost/api/method/frappe.client.get_list' \
-H 'Authorization: token 71d8.....a11af2:4eb.....319f'
-H 'Content-Type: application/json' \
--data-raw '{ "doctype": "Naming Series" }'
I get the error…
Traceback (most recent call last):
File "/home/erpdev/frappe-bench/apps/frappe/frappe/app.py", line 62, in application response = frappe.api.handle()
File "/home/erpdev/frappe-bench/apps/frappe/frappe/api.py", line 118, in handle "data": frappe.call(frappe.client.get_list,
File "/home/erpdev/frappe-bench/apps/frappe/frappe/__init__.py", line 1055, in call return fn(*args, **newargs)
File "/home/erpdev/frappe-bench/apps/frappe/frappe/client.py", line 34, in get_list return frappe.get_list(doctype, fields=fields, filters=filters, order_by=order_by,
File "/home/erpdev/frappe-bench/apps/frappe/frappe/__init__.py", line 1291, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File "/home/erpdev/frappe-bench/apps/frappe/frappe/model/db_query.py", line 96, in execute result = self.build_and_run()
File "/home/erpdev/frappe-bench/apps/frappe/frappe/model/db_query.py", line 110, in build_and_run args = self.prepare_args()
File "/home/erpdev/frappe-bench/apps/frappe/frappe/model/db_query.py", line 136, in prepare_args self.set_optional_columns()
File "/home/erpdev/frappe-bench/apps/frappe/frappe/model/db_query.py", line 298, in set_optional_columns columns = get_table_columns(self.doctype)
File "/home/erpdev/frappe-bench/apps/frappe/frappe/model/meta.py", line 49, in get_table_columns return frappe.db.get_table_columns(doctype)
File "/home/erpdev/frappe-bench/apps/frappe/frappe/database/database.py", line 865, in get_table_columns raise self.TableMissingError('DocType', doctype)
pymysql.err.ProgrammingError: ('DocType', 'Naming Series')
Question
Is managing “Naming Series” through the API prohibited?