Has anyone figured out how to hit the Zendesk API to post to their endpoints and PUSH data into Zendesk, i.e. organizations or users. I know the Zendesk Query component is used to PULL data from your Zendesk account into your Warehouse, but I need to go the other direction. How is this possible?
This is a POST command https://developer.zendesk.com/rest_api/docs/support/organizations#create-or-update-organization
I was thinking
6 Community Answers
Arawan Gajajiva —
Hi Jay -
Your best bet would likely to execute the POST API call in a Python Script. This would allow you to define a context cursor to fetch the data you want to POST from your Snowflake instance, prepare it in the format required by the API and submit the POST request all in a single Python script.
I figured that this was possible in the Python scripts Arawan, but honestly I'm going to need to see a concrete example of this in action before I understand how to do it. It doesn't need to be a zendesk post api call, any will do. Also - this is a pretty major need out there in the Zendesk user space so this is the sort of thing once demonstrated you should be writing a blog about and buying Google adwords for related to this concept (bulk inserting/update Zendesk users and bulk inserting/updating Zendesk organizations).
I know how to do a context cursor but I haven't seen any Restful API calls in the Python component in any documentation etc.
We are definitely discussing if we should support posting data back to services like Zendesk, Salesforce etc. We’ve had other customers request for somethign similar. Hopefully we will support this in a future release.
As for a Python POST example, please refer to the following link and section “Creating Data”.
I'm testing a basic Zendesk API call as referenced here: https://develop.zendesk.com/hc/en-us/articles/360001074168-Making-requests-to-the-Zendesk-API#topic_y1l_55x_3m
and I'm getting this issue in the python component:
"requests.exceptions.SSLError: hostname 'rechargeapps.zendesk.com' doesn't match either of 'ssl385002.cloudflaressl.com', '*.zdorigin.com', 'zdorigin.com' in <script> at line number 21"
I'm pretty sure this is an issue on the ZD side, but wondered based on this what the default Outgoing EC2 security group settings are? Do we as Matillion users need to crack open any specific IP addresses or is outgoing traffic automatically allowed?
My EC2 instance's security group outbound rule is set up as: Type: All Traffic Protocol: All Port Range: All Destination: 0.0.0.0/0
I think the error you are seeing is not related to your AWS configuration. Rather, it looks like an SSL validation error because the SSL certificate that Zendesk is providing does not match the domain. The simplest way to get around this issue in Python is with the “verify” parameter. Note the section titled “SSL Cert Verification” in this documentation.