{"id":1349,"date":"2022-09-14T10:58:45","date_gmt":"2022-09-14T08:58:45","guid":{"rendered":"https:\/\/www.quisted.net\/?p=1349"},"modified":"2023-06-30T22:51:46","modified_gmt":"2023-06-30T20:51:46","slug":"cisco-tac-upload","status":"publish","type":"post","link":"https:\/\/www.quisted.net\/index.php\/2022\/09\/14\/cisco-tac-upload\/","title":{"rendered":"[QoL] Uploading files to Cisco TAC via CXD"},"content":{"rendered":"\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1388 \" src=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/dnac.png\" alt=\"\" width=\"480\" height=\"212\" srcset=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/dnac.png 842w, https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/dnac-300x133.png 300w, https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/dnac-768x339.png 768w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p><span style=\"color: #3366ff;\"><strong>Uploading files to a Cisco TAC case.<\/strong><\/span><\/p>\n<p>Have you ever needed to upload large (log)files from an appliance to a Cisco TAC?<\/p>\n<p>Troubleshooting DNA-Center for example usually involves creating Root Cause Analysis (RCA) files which can be well over 1GB. After generating the files we have to copy them from the controller and either mail them to the case, or upload them via the webinterface with the Case File Uploader. Both of these options require additional steps of copying and transferring.\u00a0<br \/><br \/><span style=\"color: #3366ff;\"><b>Customer eXperience Drive.<\/b><\/span><\/p>\n<p>There is an easier way to upload the files directly from the controller using the\u00a0<a href=\"https:\/\/www.cisco.com\/c\/en\/us\/support\/web\/tac\/tac-customer-file-uploads.html#cxd\" target=\"_blank\" rel=\"noopener\">Customer eXperience Drive (CXD)<\/a>.<\/p>\n<p><em>The Customer eXperience Drive (CXD) is a multi-protocol file upload service with no limitation on the uploaded file size. It allows Cisco customers with active Service Requests (SRs) to upload data directly to a case using a unique set of credentials created per SR. The protocols supported by CXD are natively supported by Cisco products which allows for uploading directly from Cisco devices to SRs.<\/em><\/p>\n<p>You will need the following things;<\/p>\n<ul>\n<li>Service Request Number<\/li>\n<li>CXD Token<\/li>\n<\/ul>\n<p>To generate the CXD Token complete these steps:<\/p>\n<p><b>Step 1<\/b>\u00a0\u00a0 Log in to\u00a0<a href=\"https:\/\/mycase.cloudapps.cisco.com\/\">SCM<\/a>.<br \/><b>Step 2<\/b>\u00a0\u00a0 Open the case you would like to get the upload token for.<br \/><b>Step 3<\/b>\u00a0\u00a0 Click the\u00a0<strong>Attachments<\/strong>\u00a0tab.<br \/><b>Step 4<\/b>\u00a0\u00a0 Click\u00a0<strong>Generate Token<\/strong>. Once the token is generated it will be displayed next to the Generate Token button.<\/p>\n<p><a href=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/Generate_token.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1357\" src=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/Generate_token.png\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" srcset=\"https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/Generate_token.png 1208w, https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/Generate_token-300x64.png 300w, https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/Generate_token-1024x218.png 1024w, https:\/\/www.quisted.net\/wp-content\/uploads\/2022\/09\/Generate_token-768x163.png 768w\" alt=\"\" width=\"940\" height=\"200\" \/><\/a><\/p>\n<p><strong><span style=\"color: #3366ff;\">Uploading files using CURL<\/span><\/strong><\/p>\n<p>Once we have the SR number (SR<span style=\"color: #ff0000;\"><strong>60000000<\/strong><\/span>) and the token (<span style=\"color: #339966;\"><strong>aaaabbbbccccdddd<\/strong><\/span>) we can use that to upload directly from a controller. We can transfer the file with our SR credentials to <em>https:\/\/cxd.cisco.com\/home\/\u00a0<\/em>and the file will be automatically added to the case.<\/p>\n<p><strong>CURL without a proxy:<\/strong><\/p>\n<ul>\n<li>curl -T \u201c[path\/to\/file]\/[file]&#8221; -u <span style=\"color: #ff0000;\"><strong>60000000<\/strong><\/span>:<span style=\"color: #339966;\"><strong>aaaabbbbccccdddd<\/strong><\/span>\u00a0<strong>https:\/\/cxd.cisco.com\/home\/<\/strong><\/li>\n<\/ul>\n<p><strong>CURL with a proxy:<\/strong><\/p>\n<ul>\n<li>curl -T \u201c[path\/to\/file]\/[file]&#8221; <span style=\"color: #800080;\">-x http:\/\/[proxy:8080]<\/span> -u <span style=\"color: #ff0000;\"><strong>60000000<\/strong><\/span>:<span style=\"color: #339966;\"><strong>aaaabbbbccccdddd <\/strong><\/span><strong>https:\/\/cxd.cisco.com\/home\/<\/strong><\/li>\n<\/ul>\n<p><strong><span style=\"color: #3366ff;\">Sample Python Code to use the PUT API<\/span><\/strong><\/p>\n<p>Note that the following code assumes the file is stored in the same path you are running it from.<\/p>\n<blockquote>\n<pre>import requests\nfrom requests.auth import HTTPBasicAuth\nurl = 'https:\/\/cxd.cisco.com\/home\/'\nusername = 'SR Number'\npassword = 'Upload Token'\nauth = HTTPBasicAuth(username, password)\nfilename = 'showtech.txt'\nf = open(filename, 'rb')\nr = requests.put(url + filename, f, auth=auth, verify=False)\nr.close()\nf.close()\nif r.status_code == 201:\n\u00a0\u00a0\u00a0 print(\"File Uploaded Successfully\")<\/pre>\n<\/blockquote>\n<p>Enjoy your no limit uploads!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Uploading files to a Cisco TAC case. Have you ever needed to upload large (log)files from an appliance to a Cisco TAC? Troubleshooting DNA-Center for example usually involves creating Root Cause Analysis (RCA) files which can be well over 1GB. After generating the files we have to copy them from the controller and either mail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[126],"tags":[27,125,123,124],"class_list":["post-1349","post","type-post","status-publish","format-standard","hentry","category-various-2","tag-cisco","tag-cxd","tag-tac","tag-upload"],"_links":{"self":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/1349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/comments?post=1349"}],"version-history":[{"count":33,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/1349\/revisions"}],"predecessor-version":[{"id":1403,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/posts\/1349\/revisions\/1403"}],"wp:attachment":[{"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/media?parent=1349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/categories?post=1349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quisted.net\/index.php\/wp-json\/wp\/v2\/tags?post=1349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}