May 5, 2022 5:37 AM
Hi,
I have a problem with obtaining archived custom objects.
I use the below snippet to list objects:
api_response = client.crm.objects.basic_api.get_page(
object_type='payroll',
limit=10,
archived=True)
Exception when calling basic_api->get_page: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 05 May 2022 09:16:39 GMT', 'Content-Type': 'application/json;charset=utf-8', 'Content-Length': '203', 'Connection': 'keep-alive', 'CF-Ray': '706860ea7def82ff-IAD', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Vary': 'Accept-Encoding', 'CF-Cache-Status': 'DYNAMIC', 'Access-Control-Allow-Credentials': 'false', 'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'X-HubSpot-Correlation-Id': 'd406c522-2138-4f20-a4a5-73d9ebcac3b8', 'X-HubSpot-RateLimit-Daily': '500000', 'X-HubSpot-RateLimit-Daily-Remaining': '494225', 'X-HubSpot-RateLimit-Interval-Milliseconds': '10000', 'X-HubSpot-RateLimit-Max': '150', 'X-HubSpot-RateLimit-Remaining': '149', 'X-HubSpot-RateLimit-Secondly': '15', 'X-HubSpot-RateLimit-Secondly-Remaining': '14', 'X-Trace': '2BD6CCE6815EA6CF0C82EB8C041F316C647B62253C000000000000000000', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=UeLEe3SypejhnIdbZlIVriRLHAGFkUWy134jGRH5ZuOn0wWRb55%2B1GVixyy%2BjMUlnCN3n%2FI2b7BtHRz8oRFDsh7KYTLyZoKx5VY0LqghQD9OSO7oWpxQ6bo95SRuiw1j"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}', 'Server': 'cloudflare', 'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400'}) HTTP response body: {"status":"error","message":"Paging through deleted objects is not yet supported for object type 2-2960466 (payroll)","correlationId":"d406c522-2138-4f20-a4a5-73d9ebcac3b8","category":"VALIDATION_ERROR"}
Is this situation related to:
Solved! Go to Solution.
May 5, 2022 12:02 PM
Hey, @SKiru_dap 👋. Thanks for the great question!
To confirm, you are not missing anything. I did a quick check with my internal resources and confirmed the following:
the paging/list-all endpoint doesn't support listing archived (deleted) engagement objects of any type
We don't have a timeline to add this support to this API yet
I'll follow up with the devex doc writers to see if we can get some language about archived not being supported for all object types.
Thank you very much for taking to share this pain point. It's very helpful.
Best,
Jaycee
May 5, 2022 12:02 PM
Hey, @SKiru_dap 👋. Thanks for the great question!
To confirm, you are not missing anything. I did a quick check with my internal resources and confirmed the following:
the paging/list-all endpoint doesn't support listing archived (deleted) engagement objects of any type
We don't have a timeline to add this support to this API yet
I'll follow up with the devex doc writers to see if we can get some language about archived not being supported for all object types.
Thank you very much for taking to share this pain point. It's very helpful.
Best,
Jaycee