Jump to content

Clover13

Clients
  • Posts

    1,380
  • Joined

  • Last visited

  • Days Won

    1

Clover13 last won the day on March 22 2014

Clover13 had the most liked content!

Recent Profile Visitors

10,949 profile views
  1. I'm on like my 6th review now trying to figure out what they need or want to verify the app and business. I upload exactly what they require, I send messages asking for feedback, I try to send messages to their Support Chat and receive no answers. It's been denied twice and the supporting reasoning was either corrected or incorrect (as that exact information was indeed provided). The other times, the review was just cancelled with no reason (after weeks+ of waiting).
  2. I see how you tracked it down in the PHP code, I'll try to do that next time as well. I'm not too PHP savvy, but I see the stacktrace there and how you tracked it down, thank you for doing that! 👍 Also confirming with revisions OFF for the Pages DB, it does work and returns a 201 (CREATED) 2024-03-21 11:12:21 - INFO - post_cms_record_url: http://localhost/api/index.php?/cms/records/1 2024-03-21 11:12:21 - INFO - post_data: {'category': 1, 'author': 1, 'fields[1]': 'Title 123', 'fields[2]': 'Content ABC'} 2024-03-21 11:12:21 - DEBUG - Starting new HTTP connection (1): localhost:80 2024-03-21 11:12:21 - DEBUG - http://localhost:80 "POST /api/index.php?/cms/records/1&key=ef2f4f1687b901d3c962f074dcd4528e HTTP/1.1" 201 1109
  3. Thanks @teraßyte. I noticed the edit aspect and had mentioned that earlier. I would think any POST to create a new record would fail in this case (which is what I'm experiencing across 3 different Pages DBs), but @Marc Stridgen wasn't able to reproduce it. @Marc Stridgen can you confirm you tested on 4.7.16?
  4. I'll do some more testing today. FWIW, the GET to the hello endpoint works fine. I'll also get appropriate errors when the POST executes and determines something like an invalid category or author. 2024-03-21 10:21:24 - INFO - post_cms_record_url: http://localhost/api/index.php?/cms/records/1 2024-03-21 10:21:24 - INFO - post_data: {'category': 99, 'author': 1, 'fields[1]': 'Title 123', 'fields[2]': 'Content ABC'} 2024-03-21 10:21:24 - DEBUG - Starting new HTTP connection (1): localhost:80 2024-03-21 10:21:24 - DEBUG - http://localhost:80 "POST /api/index.php?/cms/records/1&key=ef2f4f1687b901d3c962f074dcd4528e HTTP/1.1" 400 72 Ran 1 test in 0.094s OK Error: 400 Response: {'errorCode': '1T306/5', 'errorMessage': 'NO_CATEGORY'} Regarding the hooks being disabled, that did not resolve the issue. 2024-03-21 10:25:57 - INFO - post_cms_record_url: http://localhost/api/index.php?/cms/records/1 2024-03-21 10:25:57 - INFO - post_data: {'category': 1, 'author': 1, 'fields[1]': 'Title 123', 'fields[2]': 'Content ABC'} 2024-03-21 10:25:57 - DEBUG - Starting new HTTP connection (1): localhost:80 Error: 500 Response: {'errorCode': 'EX1048', 'errorMessage': 'UNKNOWN_ERROR'} 2024-03-21 10:25:58 - DEBUG - http://localhost:80 "POST /api/index.php?/cms/records/1&key=ef2f4f1687b901d3c962f074dcd4528e HTTP/1.1" 500 72
  5. FWIW... # With API Key in request params returns 500 and EX1048 response = requests.post(post_cms_record_url, data=post_data, params=request_params) # With API Key base64 encoded in headers # Error: 401 # Response: {'errorCode': '3S290/7', 'errorMessage': 'INVALID_API_KEY'} response = requests.post(post_cms_record_url, data=post_data, headers=headers) # With API Key in auth returns 500 and EX1048 response = requests.post(post_cms_record_url, data=post_data, auth=auth)
  6. Right and I believe that's due to the first screenshot I posted where it's expecting a record_id when one doesn't exist yet since this is creating a record, not editing one. Unless that DB update is made after the record is created (but not committed yet), I don't know the sequencing or transactionalization of their DB commands for the API. Maybe it's due to the api key being a request param instead of a header, but the header approach wouldn't work for me before this current version of the software.
  7. I dropped the data parsing for the non-200 case, here is that output: 2024-03-20 16:38:05 - INFO - post_cms_record_url: http://localhost/api/index.php?/cms/records/1 2024-03-20 16:38:05 - INFO - post_data: {'category': 1, 'author': 1, 'fields[1]': 'Title 123', 'fields[2]': 'Content ABC'} 2024-03-20 16:38:05 - DEBUG - Starting new HTTP connection (1): localhost:80 2024-03-20 16:38:05 - DEBUG - http://localhost:80 "POST /api/index.php?/cms/records/1&key=ef2f4f1687b901d3c962f074dcd4528e HTTP/1.1" 500 72 Ran 1 test in 0.179s OK Error: 500 Response: {'errorCode': 'EX1048', 'errorMessage': 'UNKNOWN_ERROR'}
  8. It's just a python script, I put this together to post to the default Articles Pages DB and get a 500 as well. def test_api_cms_post(self): post_cms_record_url = f"{self.API_URL}{self.CMS_RECORDS_ENDPOINT}1" logging.info(f"post_cms_record_url: {post_cms_record_url}") # Request parameters with API key included in the URL request_params = { 'key': self.API_KEY } post_data = {'category': 1, 'author': 1, 'fields[1]': 'Title 123', 'fields[2]': 'Content ABC'} logging.info(f"post_data: {post_data}") # Make a POST request to the API endpoint response = requests.post(post_cms_record_url, data=post_data, params=request_params) # Check if the request was successful (status code 200) if response.status_code == 200: # Parse the JSON response data = response.json() # Process the data as needed print("Response:", data) else: # Print an error message if the request was not successful print(f"Error: {response.status_code}") Output: 2024-03-20 16:13:43 - INFO - post_cms_record_url: http://localhost/api/index.php?/cms/records/1 2024-03-20 16:13:43 - INFO - post_data: {'category': 1, 'author': 1, 'fields[1]': 'Title 123', 'fields[2]': 'Content ABC'} 2024-03-20 16:13:43 - DEBUG - Starting new HTTP connection (1): localhost:80 Error: 500 2024-03-20 16:13:43 - DEBUG - http://localhost:80 "POST /api/index.php?/cms/records/1&key=ef2f4f1687b901d3c962f074dcd4528e HTTP/1.1" 500 72 Ran 1 test in 0.140s OK
  9. I tried another Pages DB and POST call that worked before the update and it too is getting the same error.
  10. Was working on something new and started issuing POSTs to a Pages DB but it's erroring with a 500. System log entry below. Being this is a create of a record via a POST, I'm not sure why it is triggering an edit (requiring a record_id) which is also via a POST.
  11. Awesome! Thanks John for the very detailed reply and providing your experiences! That's very helpful!
  12. So I was thinking about @Nathan Explosion's proposed solution, however one stickler came to mind in that for larger API responses where filtering might be useful, there may not be a straightforward way to do this. Possibly would require parsing the API response and storing key/value pairs based on some discriminator and then having a dropdown multi-select to only show the values for those keys selected. A Pages DB would have this filtering capability built in it already by defining what fields are filterable and then putting the Pages DB Filter block within the Page.
  13. Regarding @Nathan Explosion's reply, for anyone interested in reviewing that approach, this link is helpful: https://invisioncommunity.com/developers/docs/general/caching-r8/
  14. Thank you for the detailed response John, I appreciate it! Ideally, I'm trying to avoid a custom app tied to IPS if possible and just use the native Pages impl and customize it within Pages. But perhaps doing it with a custom app is a reasonable approach to, as it would require some level of custom coding anyway. The data can be out of date, it's really just daily data list from an API, of which gets updated at unknown times. I definitely want to pull it on a schedule vs on demand (by a user viewing the page where the data will be presented). There's no API notification of updates that I'm aware of. As far as caching, I guess this comes down to what the Pages DB can do. With that in mind, there are many sites using Pages with a Pages DB and data under heavy user volume, so I'd have to imagine there is some level of data and page caching when a Pages DB is inserted as a block on a page. I'll likely start with that approach before I go custom and see how it works out. Thanks again for the insights!
  15. This one? https://developer.chrome.com/docs/web-platform/deprecating-unload If so, Ending with 100% of users by the end of Q3 2024 Assuming that means anyone on v4 won't be able to use Chrome after the deprecation?
×
×
  • Create New...