APIs & Integrations

SKiru_dap
Member

Paging through deleted objects is not yet supported for custom object

SOLVE

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)

 

but when I want to obtain all deleted objects (archived=True) I receive that error:
 

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:

  • some HubSpot limitations in terms of listing archived custom objects
  • with definition/configuration of my object (I don't create this custom object and don't have any experience with them;/)
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Paging through deleted objects is not yet supported for custom object

SOLVE

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

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

View solution in original post

0 Upvotes
2 Replies 2
AWhyBravo
Contributor

Paging through deleted objects is not yet supported for custom object

SOLVE

Hi Jaycee,

 

Thanks for your clarification.


Has there been any update on this? Since there is no Webhook for engagements, I'm polling every few minutes to detect changes. However, whenever I set "archived" to true within the API, I get the same error stated above. Therefore,  the only way I can detect if a call has been deleted or not is if it appeared at one point and then disappeared later on. This is very much suboptimal. Is there anything else we can do here?

 

Thanks again,

Brad

0 Upvotes
Jaycee_Lewis
Solution
Community Manager
Community Manager

Paging through deleted objects is not yet supported for custom object

SOLVE

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

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes