Replacing
requests.post(API_ENDPOINT, data=params, headers=cf_credentials)
with
requests.post(API_ENDPOINT, json=params, headers=cf_credentials)
fixed it. Thanks for the JSON update!
Search found 23 matches
- 07 Mar 2024, 19:11
- Forum: Bug Report version 3.5.3
- Topic: API filtering does not work
- Replies: 6
- Views: 155
- 07 Mar 2024, 19:00
- Forum: Bug Report version 3.5.3
- Topic: Cannot pre-fill values with automated action
- Replies: 0
- Views: 192
Cannot pre-fill values with automated action
As seen in the attachment, the value I pre-set in the automated action is not resolved to resemble the actual field value when running the automated action.
- 07 Mar 2024, 18:11
- Forum: Bug Report version 3.5.3
- Topic: Error in nested entity form
- Replies: 1
- Views: 74
Error in nested entity form
I set up a nested entity form with the option Fields display: "In a new window" Now, when I try to use the nested entity form when creating a new parent record, I am directed to the form for the sub entity and click on "save", but then an error occurs because Rukovoditel tries to...
- 07 Mar 2024, 15:41
- Forum: Bug Report version 3.5.3
- Topic: API filtering does not work
- Replies: 6
- Views: 155
API filtering does not work
I am attempting to use the API with Python. Unfortunately, the filter function does not work. I thought this was an issue with lacking JSON support, but it still persists in version 3.5 def get_user_info(user_id:int): field_keys = { "8": "user", "271": "f1", &...
- 27 Aug 2023, 23:33
- Forum: Discussion
- Topic: API error: items is not array
- Replies: 10
- Views: 5023
Re: API error: items is not array
Fixed by replacing
with
in /plugins/ext/classes/api/api.php l.520
Just in case anybody has the same problem![Smile :)](./images/smilies/icon_e_smile.gif)
Code: Select all
$items = self::_post('items');
Code: Select all
$items = json_decode(self::_post('items'), true);
Just in case anybody has the same problem
![Smile :)](./images/smilies/icon_e_smile.gif)
- 27 Aug 2023, 17:59
- Forum: Discussion
- Topic: API error: items is not array
- Replies: 10
- Views: 5023
API error: items is not array
Hey everybody! I am trying to use the API to insert some data from Python, but I am getting an error. import requests url = "https://myurl.com/api/rest.php" items = [{ "parent_item_id": 14, "field_725": 193, "field_726": "Test" }] params = { 'key': '...
- 05 May 2023, 20:02
- Forum: Discussion
- Topic: Use reports from Report Designer in Templates to Export
- Replies: 0
- Views: 126
Use reports from Report Designer in Templates to Export
It would be great if we can get more flexibility in displaying sub-entity fields in HTML export templates. As I understand it, it is currently only possible to display sub-entities as a table. I have created a report in the report designer that shows the entity in the way I need it. Is there any way...
- 08 Apr 2023, 18:56
- Forum: Discussion
- Topic: Embed PDF attachment in Item Page
- Replies: 2
- Views: 185
Re: Embed PDF attachment in Item Page
Just resolved this myself by using
$url = url_for('items/attachment_preview_pdf','path=' . $path . '&action=get_pdf_file&file=' . urlencode(base64_encode($file_name)));
Still need the PHP-Code to show in the left column though. Any thoughts?
$url = url_for('items/attachment_preview_pdf','path=' . $path . '&action=get_pdf_file&file=' . urlencode(base64_encode($file_name)));
Still need the PHP-Code to show in the left column though. Any thoughts?
- 08 Apr 2023, 15:16
- Forum: Bug Report version 3.3
- Topic: [id] not working in Ajax field type
- Replies: 3
- Views: 1432
Re: [id] not working in Ajax field type
Sorry about that, here is the image. Screenshot 2023-03-26 125222.png I am trying to apply this condition to the field: ´´´ e.id IN ( SELECT f.items_id FROM app_entity_1_values f WHERE f.fields_id = 271 AND f.value IN ( SELECT g.value FROM app_entity_26_values g WHERE g.fields_id = 272 AND g.items_i...
- 08 Apr 2023, 14:15
- Forum: Discussion
- Topic: Embed PDF attachment in Item Page
- Replies: 2
- Views: 185
Embed PDF attachment in Item Page
Hi! I would like to embed a PDF attachment to an entity on the item page. I tried using the custom php feature but am struggling with finding the URL to the file, as only the file name is stored in the database and the files are in a different directory. I tried this so far for custom php: --- ?> <i...