Commit graph

68 commits

Author SHA1 Message Date
Faris Ansari
9d323178f8 fix: return updated doc in response.docs 2026-01-08 01:29:44 +05:30
Faris Ansari
e7ffb2b3c8 feat: add bulk_update and bulk_delete endpoints to /api/v2 2026-01-05 17:05:43 +05:30
Akhil Narang
c290cffc27
fix(run_doc_method): check for permissions when calling get_doc
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-12-09 19:31:26 +05:30
Saqib Ansari
20c7df9c16
Merge pull request #34862 from nextchamp-saqib/capture-app-in-monitor
feat: capture app name in monitor logs
2025-11-25 11:53:30 +05:30
Saqib Ansari
b8a83ca6d7 feat: capture app name in monitor logs 2025-11-24 18:35:36 +05:30
Sagar Vora
35077703a0 fix: only allow POST in some api/v2/ methods 2025-11-21 17:47:36 +05:30
Akhil Narang
0fd745ae57
fix(api/v1): don't use as_dict() unless expand_links is passed (#34672)
That sets all keys to null if they don't exist, a breaking change.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-11-11 17:44:39 +00:00
Akhil Narang
6dfcc2bf4c
Merge pull request #34027 from sumitbhanushali/expand-link
feat: add support of expand in rest api v1/document_list
2025-10-28 17:02:14 +05:30
Sumit Bhanushali
f5fed5b4be perf: optimize expand link for table fields 2025-10-27 13:00:43 +05:30
Akhil Narang
8e4cf29e2c
fix: use sbool to cast parameter to bool
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-10-17 16:45:54 +05:30
Sumit Bhanushali
f8c73cb254 fix: replace key with object when expand is given in query param 2025-10-15 12:56:23 +05:30
Sumit Bhanushali
36012487f9 fix: updated keys and link response to return full object instead of just title 2025-10-03 15:31:53 +05:30
Sumit Bhanushali
3ad961e8dd feat: support expand links in read_doc, document_list and client.get_list 2025-09-19 10:54:57 +05:30
Saqib Ansari
6ebe7fc26e refactor: pulse client 2025-08-30 20:11:57 +05:30
Saqib Ansari
7f0765fc9e refactor: rename app_activity to app_heartbeat 2025-08-30 13:31:01 +05:30
Saqib Ansari
9699bca095 feat: active app telemetry 2025-08-22 18:38:55 +05:30
Akhil Narang
ef5dc763e9
feat(api/v2): set name if passed when creating document
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-03 17:52:25 +05:30
Akhil Narang
ad948c9b98
Revert "Merge pull request #32327 from akhilnarang/allow-passing-name-in-api"
This reverts commit 1e30db26dc, reversing
changes made to 8da72e91e3.
2025-07-03 17:23:48 +05:30
Faris Ansari
4a7f337f0a fix: typing and error handling
- add typing and comprehensive docstring
- error handling for custom get_list methods in doctype controllers
2025-06-23 13:30:05 +05:30
Faris Ansari
a6e9028090 fix: cast link fields that are int to string
- id fields should always be string
- easier to manage in typed code in frontend
2025-06-18 16:14:32 +05:30
Faris Ansari
b3a05896ea fix: remove doc.reload 2025-06-18 15:56:11 +05:30
Faris Ansari
f3af0c582c test: fix test_api_v2 2025-06-18 15:56:11 +05:30
Faris Ansari
471e001ebb feat: apply permissions in get_query 2025-06-18 15:56:11 +05:30
Ankush Menat
7d26eca678 fix: basic perm checks 2025-06-18 15:51:13 +05:30
Faris Ansari
11602c1e6b fix: revert document_list return format 2025-06-18 15:51:13 +05:30
Faris Ansari
79893f0248 fix: return updated doc from execute_doc_method 2025-06-18 15:51:13 +05:30
Faris Ansari
e089b2d723 fix: explicitly return doc as dict
because json serializer of Document doesn't return fields with null values
2025-06-18 15:51:12 +05:30
Faris Ansari
bbf46eb4ef fix: use frappe.qb.get_query
- static controller method get_list to modify query object
2025-06-18 15:50:25 +05:30
Akhil Narang
1a3602f715
feat: add in a doctype to optionally track API Requests (#32622) 2025-06-06 13:22:25 +05:30
Akhil Narang
33dbf97db2
fix(document): don't try to overwrite name if a string is already set
This allows us to pass `name` in via API when creating documents.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-05-05 12:24:58 +05:30
petnd
38f112f4ac
fix: Apply permlevel for update_doc endpoint in v2 API (#32135)
* fix: Only Return Allowed Fields in API Response

Apply Read Permission to the returned fields of API v2
2025-04-16 13:02:14 +02:00
Raffael Meyer
9430e3af86
fix: respect override_whitelisted_method in map_docs (#31718)
* refactor: override_whitelisted_method

* fix: respect `override_whitelisted_method` in `map_docs`

* refactor: override_whitelisted_method
2025-03-17 14:27:12 +01:00
Raffael Meyer
aade0df7bf
feat: new REST API for copy_doc (#31160)
* feat: new REST API for copy_doc

* test: copy endpoint
2025-02-07 17:46:53 +05:30
Ankush Menat
dfc6dcb6b8 Revert "perf: Avoid checking server script map (#29057)"
This reverts commit 55a55e7f7b.
2025-01-06 19:43:53 +05:30
Ankush Menat
55a55e7f7b
perf: Avoid checking server script map (#29057)
If I have to hazard a guess, 99% API calls are not server scripts, then
why check it first and pay the costs?

This PR first checks if method is a real method in python code and if
it's not found then only attempts to fetch it from server script map.

I'll revert this if I can bring the costs in acceptable limits with
client-side caching.
2025-01-06 07:40:20 +00:00
Akhil Narang
84ef6ec677
refactor: fixup with ruff 0.8.1
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-12-04 13:18:04 +05:30
Raffael Meyer
9208b58b6f
refactor: use doc.check_permission (#28317)
* refactor: use `doc.check_permission`

* refactor(delete_doc): check_permission_and_not_submitted
2024-11-22 10:41:24 +01:00
Ankush Menat
750b70b075
refactor: Wrap meta in v2 (#26548) 2024-05-24 06:05:09 +00:00
Ankush Menat
4dfb44d0a2 fix: assume v1 if path is not set
Old `cmd` calls will not work otherwise.
2023-10-16 18:13:50 +05:30
Ankush Menat
6fd97bcbcf fix: Add old file upload for v2 2023-10-16 18:13:50 +05:30
Ankush Menat
411819ef81 feat: v2 for message response strucutre 2023-10-16 18:13:50 +05:30
Ankush Menat
dfcb69ab21 refactor: use reportview get_count implementation
Count reported should be according to permissions
2023-10-16 18:13:50 +05:30
Ankush Menat
47538f7601 feat: doctype collection level APIs - meta, count 2023-10-16 18:13:50 +05:30
Ankush Menat
cfd3fb9341 refactor: PUT == PATCH
Correct conventions for partial updates
2023-10-16 18:13:50 +05:30
Ankush Menat
c8cd658d26 fix: add login and logout methods 2023-10-16 18:13:50 +05:30
Ankush Menat
67a5957056 fix: check for write permission if POST method 2023-10-16 18:13:50 +05:30
Ankush Menat
824229ce0a refactor: no need to cast bools manually 2023-10-16 18:13:50 +05:30
Ankush Menat
43028f51d9 refactor: simplify v2 implementations 2023-10-16 18:13:50 +05:30
Ankush Menat
7996f76ebb fix: Better delete doc for child tables 2023-10-16 18:13:50 +05:30
Ankush Menat
232f080044 feat: run_doc_method v2 2023-10-16 18:13:50 +05:30