This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% if header contains 'http://SUBDOMAIN.zendesk.com/hc/requests/' %} | |
| {{header | replace: 'http://SUBDOMAIN.zendesk.com/hc/requests/,''}} | |
| {% else %} | |
| {{header}} | |
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- add code here that should appear in the document head --> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for(i=0;i<200;i++){ | |
| var name = 'Org_' + i; | |
| $.ajax('/api/v2/organizations.json', { | |
| 'type':'POST', | |
| 'contentType':'application/json', | |
| 'data': JSON.stringify({'organization':{'name':name}}) | |
| }) | |
| .done(function(data){console.log("added org #",i);}) | |
| .fail(function(){console.log("request failed");}); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $j(document).ready(function(){ | |
| var path = window.location.pathname; | |
| if (path == "/anonymous_requests/new") { | |
| window.location.replace("/home"); | |
| } | |
| if(path == "/requests/new" && currentUser.tags.indexOf("allowed") === -1) { | |
| window.location.replace("/home"); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.IO; | |
| using System.Net; | |
| using System.Text; | |
| namespace Examples.System.Net | |
| { | |
| public class WebRequestGetExample | |
| { | |
| public static void Main () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'net/https' | |
| require 'uri' | |
| require 'json' | |
| require 'pp' | |
| subdomain = 'SUBDOMAIN' | |
| username = 'EMAIL' | |
| password = 'PASSWORD' | |
| category = 'CATEGORY_ID' | |
| label = {:label => {:name => "cake"}}.to_json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import pandas as pd | |
| s = requests.Session() | |
| s.headers.update({'Content-Type': 'application/json'}) | |
| s.auth = ('USERNAME/token','TOKEN') | |
| df = pd.read_csv('./support_addy.csv') | |
| for count, row in df.iterrows(): | |
| name = row[0] | |
| address = row[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $email = 'SOME_USERNAME'; | |
| $token = 'API_TOKEN'; | |
| $domain = 'ROOT_URL'; //e.g. 'https://z3ndocs.zendesk.com'; | |
| $ticket_id = 0000; // int, not string | |
| $auth_string = $email . '/token:' . $token; | |
| $enc_auth = base64_encode($auth_string); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include("vendor/autoload.php"); | |
| use Zendesk\API\Client as ZendeskAPI; | |
| $subdomain = ""; | |
| $username = ""; | |
| $token = ""; // replace this with your token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "repositories": [ | |
| { | |
| "type": "vcs", | |
| "url": "https://github.com/zendesk/zendesk_api_client_php" | |
| } | |
| ], | |
| "require": { | |
| "zendesk/zendesk_api_client_php": "dev-ggrossman/http_send_from_memory" | |
| } |