Contributions
Re: Zephyr Scale RESTAPI: Help needed with request format
I found the answer and resolved my issues. Within the Authorization header I had an extra ':' after 'Bearer' and before my API token. Removing this and changing my base URI tohttps://api.zephyrscale.smartbear.com/v2resolved my issues. For full explanation here is the valid GET request format. curl -X GET -H "Authorization: Bearer <API Token>" -i https://api.zephyrscale.smartbear.com/v2/testcases In order to filter by project this is the request format curl -X GET -H "Authorization: Bearer <API Token>" -i https://api.zephyrscale.smartbear.com/v2/testcases?projectKey=<Project Key>813Views0likes0CommentsZephyr Scale RESTAPI: Help needed with request format
Hello, I am wanting to retrieve a list of test cases from Zephyr Scale for a project within Jira. Here is my request: curl -X GET -H "Authorization: Bearer:<Zephyr Scale API Token>" -i "https://campbellscientific.atlassian.net/projects/CI/rest/atm/1.0/testcase/I2-T2" The response I receive is as follows: HTTP/1.1 302 Found Server: AtlassianProxy/1.19.3.1 vary: Accept-Encoding Content-Type: text/html;charset=UTF-8 Strict-Transport-Security: max-age=315360000; includeSubDomains; preload Date: Tue, 29 Jun 2021 18:51:09 GMT ATL-TraceId: c96e62b531211a3c x-arequestid: 71fb5a96-1eeb-45e2-b713-c9213fc2bb1a location: /login.jsp?os_destination=%2Fprojects%2FCI%2Frest%2Fatm%2F1.0%2Ftestcase%2FI2-T2&permission-violation=true X-XSS-Protection: 1; mode=block timing-allow-origin: * x-envoy-upstream-service-time: 46 X-Content-Type-Options: nosniff Connection: keep-alive set-cookie: atlassian.xsrf.token=b24f8288-2294-4bb0-8c68-7ae969b4091d_6792bd27469ea9f755c68dc9fea9e35081799a54_lout; Path=/; Secure Expect-CT: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400 Content-Length: 0 The response redirects me to a n Atlassian 'Something went wrong' page. Any guidance for what I am doing wrong?Solved835Views0likes1CommentProblems with RESTAPI GET request
I am wanting to GET a test case through the Zephyr Scale RESTAPI within Jira. The project I am wanting to access is called 'CI' and the test case I am interested in is 'I2-T2'. Is there anyone who can help me identify what I am doing wrong? Below is my request to the RESTAPI for Zephyr scale: curl -X GET -H "Authorization: Bearer:<Zephyr Scale API Token>" -i "https://campbellscientific.atlassian.net/projects/CI/rest/atm/1.0/testcase/I2-T2" Here is the response I am receiving: HTTP/1.1 302 Found Server: AtlassianProxy/1.19.3.1 vary: Accept-Encoding Content-Type: text/html;charset=UTF-8 Strict-Transport-Security: max-age=315360000; includeSubDomains; preload Date: Tue, 29 Jun 2021 18:22:38 GMT ATL-TraceId: 2e8c2b89dbfbcb35 x-arequestid: 55035ab9-173e-4420-b000-2d599b26c189 location: /login.jsp?os_destination=%2Fprojects%2FCI%2Frest%2Fatm%2F1.0%2Ftestcase%2FI2-T2&permission-violation=true X-XSS-Protection: 1; mode=block timing-allow-origin: * x-envoy-upstream-service-time: 63 X-Content-Type-Options: nosniff Connection: keep-alive set-cookie: atlassian.xsrf.token=b24f8288-2294-4bb0-8c68-7ae969b4091d_6d7e09b2243a5c0d9bbd878b73072cfc92561c59_lout; Path=/; Secure Expect-CT: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400 Content-Length: 0 If I alter my request to point to the URL given (/login.jsp?os_destination=%2Fprojects%2FCI%2Frest%2Fatm%2F1.0%2Ftestcase%2FI2-T2&permission-violation=true) then I will receive a 200 ok response but the data is a login page in a state of error like so: HTTP/1.1 200 OK Date: Tue, 29 Jun 2021 18:25:21 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 9823 Server: globaledge-envoy X-Ratelimit-Limit: 1600 X-Ratelimit-Remaining: 1599 X-Ratelimit-Reset: 1624991181 Cache-Control: private, no-cache, max-age=0, no-store, must-revalidate Pragma: no-cache X-Frame-Options: SAMEORIGIN Set-Cookie: atlassian.account.ffs.id=82afe2a2-2404-4c42-bd2d-2b32ed2c2125; Expires=Wed, 29 Jun 2022 18:25:21 GMT; HttpOnly Set-Cookie: atlassian.account.xsrf.token=1eea8f42be0c554c2f33ddf68127c559a8f2605f; Path=/; Secure; HttpOnly Set-Cookie: atlassian.account.code.verifier=A-pIE6xg2pLWL_jRqjDxQ0Bw5QIwXQi1Mtc3haOdK2w; Expires=Tue, 29 Jun 2021 19:25:21 GMT; Path=/; HttpOnly Set-Cookie: cloud.session.token=deleted; Expires=Wed, 01 Jan 1800 00:00:00 GMT; Path=/; Secure; HttpOnly Set-Cookie: cloud.session.token=deleted; Expires=Wed, 01 Jan 1800 00:00:00 GMT; Domain=id.atlassian.com; Path=/; Secure; HttpOnly X-Envoy-Upstream-Service-Time: 16 Referrer-Policy: origin Expect-Ct: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/idproxy", max-age=86400 X-Logging-Id: SkaBM08G Strict-Transport-Security: max-age=63072000; preload X-Content-Type-Options: nosniff X-Xss-Protection: 1; mode=block Atl-Traceid: c7ecf0a44d25a665 <!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="Log in to Jira, Confluence, and all other Atlassian Cloud products here. Not an Atlassian user? Sign up for free."><meta name="google-site-verification" content="HNNnCkeVQ-w56fqPpX2TTEMRmta5QJ-bDunwoaUep-o"><meta name="" content=""><meta name="" content=""><link rel="shortcut icon" href="https://cpfs-cdn.atlassian.com/assets/shared/id-summit/id-summit-aa-favicon.ico"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="preconnect" href="https://t.castle.io"><link rel="preconnect" href="https://api.segment.io" crossorigin><link rel="preconnect" href="https://accounts.google.com"><link rel="preconnect" href="https://sentry.io" crossorigin><title>Log in with Atlassian account</title><style>.grecaptcha-badge{visibility:hidden}.scriptLoadError{display:flex;align-content:center;background-color:#0747a6;position:absolute;top:0;left:0;width:100%;height:100%;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857142857143;letter-spacing:-.005em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.scriptLoadError .container{color:#fff;margin:0 auto;align-items:center;display:flex;flex-direction:column}.scriptLoadError .content{background:#fff;border-radius:3px;box-shadow:0 10px 10px rgba(0,0,0,.1);box-sizing:border-box;color:#172b4d;padding:48px;width:400px}.scriptLoadError .content{margin-top:48px}.scriptLoadError .content p:first-child{margin-top:0}.scriptLoadError .content a{text-decoration:none;color:#0052cc}.scriptLoadError .logo{margin-top:48px;margin-bottom:0;font-size:40px;line-height:48px}.scriptLoadError .heading{color:#deebff;font-size:24px;font-weight:500;line-height:28px;margin-top:48px}</style><script src="https://metal.prod.atl-paas.net/1.24.0/metal-head.min.js"></script><link href="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.240/static/css/39.c8940395.chunk.css" rel="stylesheet"></head><body data-app-state="{"appConfig":{"contextPath":"","recaptchaEnterpriseInvisibleKeySite":"6LcTpeAZAAAAACEXJuZmTp5YVTOUVXnN3TYR_fLM","auth0Config":{"clientId":"tDP5by46cc3gEck7d2vbHZsqsfrDK6t9","tenant":"atlassian-account-prod","domain":"auth.atlassian.com","tokenIssuer":"https://atlassian-account-prod.pus2.auth0.com","callbackUrl":"https://id.atlassian.com/login/callback"},"recaptchaEnterpriseCheckboxKeySite":"6LfnteAZAAAAAH3vsGy_TA6P6wBH6jtbMqAeVI8k","recaptchaKeySite":"6LewHQcTAAAAAJgaYVKlQOahz4gnQME8wqUA0z0J","segmentIoKey":"cb2egpwag7","recaptchaInvisibleKeySite":"6LcqAHAUAAAAAKcO583Ymvnq-uRBDPq4njcoW-jK","castleAppId":"337683121243755","bitbucketSignupUrlOverrideEnabled":false,"sentryUrl":"https://71e54c28be0d49f0bcd732ab30f35faa@sentry.io/275199","recaptchaEnable":true,"bitbucketSignupUrl":"https://bitbucket.org/account/signup","marketingConsentApiUrl":"https://preferences.atlassian.com/rest","googleAuthClientId":"596149463257-9oquqfivs9on8t8erq23c8qso6vk3cp1.apps.googleusercontent.com"},"featureFlags":{"aid_signup.microsoft.auth.enabled":true,"aid_signup.authenticate.via.id.authentication":true,"aid_signup.disallow.bitbucket.username.login":true,"aid_signup.apple.auth.enabled":true,"aid_signup.block.csrf.mismatches.login.authorize":true,"sign-in-with-slack.enabled":true,"manage-account.email.change-email-refresh.enabled":false,"aid_signup.experiment.user_segmentation":"variation","aid_signup.state.redirect.logout.distribution.enabled":true,"aid_signup.passwordless.signup":true,"aid_signup.disallow.passwordless.login.for.google.users":true,"aid_signup.apple.show.hidden.email.warning.enabled":true,"aid_signup.google.auth.call.get.user.info":true,"aid_signup.sev.enabled":true,"aid_signup.domain.claim.data.login.analytics":true,"aid_signup.recaptcha.threshold":true,"aid_signup.bans.validate.authentication":true,"aid_signup.passwordless.signup.mobile.new.flow":false},"hashedCsrfToken":"b37489bdb68031f1b6ee3deea56354b4b85eae6a02c700e536b41174089d41b2","locale":"en-US","csrfToken":"1eea8f42be0c554c2f33ddf68127c559a8f2605f","microbranding":{"application":"jira","applicationNameShort":"jira.atlassian.com","applicationLogoClass":"jira","isEmbedded":"false","applicationName":"Atlassian Bug Reporting & Feature Requests","applicationBaseURI":"http://idm-web-staging.private.atlassian.com:8080/jira/"},"tenantCloudId":"e7d85e29-46ce-48cc-8ba2-0b5bff108a88"}"><div id="root"><noscript><div class="scriptLoadError"><div class="container"><h1 class="logo">Atlassian</h1><div class="heading">JavaScript is disabled</div><div class="content"><p>You should enable JavaScript to work with this page.</p></div></div></div></noscript><div id="javaScriptLoadError" style="display:none"><div class="scriptLoadError"><div class="container"><h1 class="logo">Atlassian</h1><div class="heading">JavaScript load error</div><div class="content"><p>We tried to load scripts but something went wrong.</p><p>Please make sure that your network settings allow you to download scripts from the following domain:</p><p><b>https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.240</b></p></div></div></div></div></div><script>var mfaServerUrl="",ticket="",requestToken="",postActionURL="",userData={userId:"",email:"",friendlyUserId:"",tenant:"",tenantFriendlyName:""},globalTrackingId="";window.onload=function(){document.getElementById("javaScriptLoadError")&&(document.getElementById("javaScriptLoadError").style.display="block")}</script><script>!function(e){function t(t){for(var n,c,d=t[0],i=t[1],u=t[2],l=0,s=[];l<d.length;l++)c=d[l],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&s.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(t);s.length;)s.shift()();return a.push.apply(a,u||[]),r()}function r(){for(var e,t=0;t<a.length;t++){for(var r=a[t],n=!0,d=1;d<r.length;d++){var i=r[d];0!==o[i]&&(n=!1)}n&&(a.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={38:0},a=[];function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var a,d=document.createElement("script");d.charset="utf-8",d.timeout=120,c.nc&&d.setAttribute("nonce",c.nc),d.src=function(e){return c.p+"static/js/"+({27:"cancel.account.delete",28:"delete.request.confirmation",29:"expired.password",30:"inactive.account",31:"login",33:"mfa",34:"mfa.apps",35:"mfa.enrollment",36:"multi.factor",37:"pending.deletion"}[e]||e)+"."+{0:"7b4a730f",1:"ecd059d2",2:"21d56a68",3:"cea6d11b",4:"cadadbb4",5:"3d08c149",6:"d8a5952c",7:"de2c8faa",8:"5b996d8e",9:"0192baf0",10:"20b061ba",11:"851154bb",12:"580d5c64",13:"5d355b37",14:"1c6c374d",15:"4dec04bb",16:"2e08c2ba",17:"7ed8fd31",18:"1534ec28",19:"a4a8301e",20:"1ec03e2b",21:"ca067d80",22:"11b45caf",23:"c2b1c618",24:"20e1a100",25:"bab3c863",26:"2d8db227",27:"dbbc4023",28:"61960e86",29:"4ba19127",30:"da09d2ff",31:"4f30fd11",33:"9feac6d3",34:"83e26a79",35:"6d9e39a4",36:"71d4bda2",37:"c0d9b0be",40:"862d7dd4",41:"b149bfbc",42:"397012e1",43:"b22d3b3d"}[e]+".chunk.js"}(e);var i=new Error;a=function(t){d.onerror=d.onload=null,clearTimeout(u);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+a+")",i.name="ChunkLoadError",i.type=n,i.request=a,r[1](i)}o[e]=void 0}};var u=setTimeout((function(){a({type:"timeout",target:d})}),12e4);d.onerror=d.onload=a,document.head.appendChild(d)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.240/",c.oe=function(e){throw console.error(e),e};var d=this["webpackJsonpaid-frontend"]=this["webpackJsonpaid-frontend"]||[],i=d.push.bind(d);d.push=t,d=d.slice();for(var u=0;u<d.length;u++)t(d[u]);var f=i;r()}([])</script><script src="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.240/static/js/39.9ab39e49.chunk.js"></script><script src="https://aid-frontend.prod.atl-paas.net/atlassian-id/front-end/5.0.240/static/js/main.7bf5bbce.chunk.js"></script></body></html>Solved1.9KViews0likes1Comment