Zephyr API to access test steps not working - jira-zephyr

I need to access test steps of a test case.
When I tried the following URL using CURL GET request,
http:///rest/zapi/latest/teststep//
I am getting the following error message
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved here.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at <jira_server> Port 80</address>
</body></html>
Same request using the browser gives {}
I got the issue ID using the REST API
"https:///rest/api/2/issue/testCaseId
So I am sure that the issue Id is correct.
Is this something because of latest zephyr update?
Can some one help me what is the issue with the request?

Unfortunately I think you have to purchase a plugin to use the ZAPI:
https://marketplace.atlassian.com/plugins/com.thed.zephyr.zapi
You can, however, connect to your database yourself and try to extract the test steps by looking for a table called [SOME_PREFIX_SUCH_AS_A7AEFBD]_TESTSTEP in your jira database. It holds an ID for the issue it belongs to so combining it with the jiraissues table you can fetch all test steps for a test issue you've made. Put that query result into an excel sheet and you have yourself a cheap extraction of your test steps.

Related

Mailchimp No Host Exception when Subscribing Email to A List

I'm trying to send a subscription call, but got an error saying the the URL is invalid.
This is the URL I used:
https://us14.api.mailchimp.com/3.0/lists/<list-id>/members/
then I get this back in the response:
<HTML>
<HEAD>
<TITLE>Invalid URL</TITLE>
</HEAD>
<BODY>
<H1>Invalid URL</H1>
The requested URL "http://%5bNo%20Host%5d/3.0/lists/41e44e1bde/members/", is invalid.
<p>
Reference #9.cc6a1db8.1483891456.16189371
</BODY>
</HTML>
which translates to:
http://[No Host]/3.0/lists/<list-id>/members/
us14 is definitely the right data center according to the documentation so I'm not quite sure what's wrong.
It turned out that if you set HTTP header field "Host" in the request, it will always return this error. I tested this out by removing every fields one-by-one and this was the only one that caused an issue.
Many environments use the Host header for stuff like virtual sites where you are running more than one website behind the same IP Address (i.e. api.mailchimp.com and www.mailchimp.com could be on the same server) It is definitly possible for an error to be received if you set an invalid host since their proxies can't route it correctly. Normally, the host header is set automatically by the browser or HTTP client and usually not something you would override.
Are you still having trouble? If so, would be useful to see a screenshot of something like PostMan or https://ApiRequest.IO to see what your inputs are.

Project Server 2013 - Update Task using REST ODATA

I wanted to update Project 'Task' metadata (for example the 'PercentComplete') from my own website. This update needs to be over HTTP as I am outside of hosted sharepoint server.
READ the property of Task using GET URL works:
https://myserver/_api/ProjectServer/Projects('proj_id')/Tasks('task_id')/PercentComplete
Response:
<?xml version="1.0" encoding="utf-8" ?>
<d:PercentComplete m:type="Edm.Int32">30</d:PercentComplete>
So I know authentication and validation works fine. But what call do I make to UPDATE this property of the Task.
I tried some of the posts like simple HTTP update with % in payload and creating a JSON with property name, but nothing works.
Could someone please share a code snippet that updates using javascript/jquery/ajax over HTTP to update the value from 30% to say 50%?

Facebook can't scrape my site correctly - PHP Site

I am running this website www.miswag.net which is highly dependent on Facbeook. When I share my site on Facebook, I get a "403 Forbidden", here's Facebook's debugger output when I try to scrape my site: https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.miswag.net
Please help figure this out.. Thanks
Facebook's scraper doesn't need to read the full page, so they only request part of it by sending a Range header. However, your server seems to be responding incorrectly to that request and returning a 403 error code. You need to check your server and make sure it handles the range header correctly.
To see this in action, try this CURL command:
curl -H "Range: bytes=0-524287" http://www.miswag.net
This is the response I got:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
Compounding on #Waleed'sanswer, if you want to test right away, use Online CURL
fill in www.wiswag.net
ADD OPTION options, choosing --header (-H)
next to it "Range: bytes=0-524287"
CURL button

Unable to create(POST) objects (Account, customer...) on QB Windows using IDS and Sync Manager

Here I am provideing you the complete scenario where I am getting the error while posting request for creating a new account.
I am using Intuit OAuth Access and OAuth API console for testing (Using all security tokens).(https://appcenter.intuit.com/Playground/OAuth)
And the URL and request:
URL: https://services.intuit.com/sb/account/v2/570357960
Method : Post
Format: XML/JSON
Request:
<?xml version="1.0" encoding="UTF-16"?><Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RequestId="4df87bw2-916a-
4r95-h5d6-06dce3667562"
xmlns="http://www.intuit.com/sb/cdm/v2"><ExternalRealmId>570357960</ExternalRealmId><Objectxsi:type="Account"><Name>CurrentAccount</Name><Active>true</Active><Type>Expense<
/Type><Subtype>Expense</Subtype><AcctNum>1111</AcctNum></Object></Add>
And getting the response (error in html):
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
and I have also checked with RESTClient utility, but getting the same above error.
Please note that the same url
(https://services.intuit.com/sb/account/v2/570357960) with same
security tokens is working fine for GET data , I am getting data from
QB desktop into my online Application.
As Keith said, check the Content-Type. You will also need to use a RestClient for testing. The playground will not work for testing API calls. It only works for platform calls.
If I had to guess... I'd guess you're sending the wrong Content-Type header... but it's impossible to tell for sure until you post more code/the rest of your HTTP request.
A few things to try. Be sure the XML is in the same order as this sample and try it.
the other is a common mistake when you use Oauth in a GET you are including just the url in the signature, but in a POST you need to include the Body in the signature too or it will not pass Oauth validation.
Lastly, as Keith mentioned to check the content type. Although you would generally get a content type error.
156234822
CurrentAccount
true
Expense
Expense
1111

Facebook Device Flow Support

According to the Facebook docs, OAuth Device Flow is supported.
However, when I follow their directions on starting the Device Flow process, I receive a status code of 400 (Method not implemented).
Has anyone successfully able to get the Facebook Device Flow process functioning?
curl -X post https://graph.facebook.com/oauth/device?type=device_code&client_id={appId}
<HTML>
<HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD>
<BODY>
<H1>Method Not Implemented</H1>
Invalid method in request<P>
</BODY>
</HTML>
About your specific error, it seems facebook docs made you do it wrong: FAIL
You must send a POST request, which you're asking cURL to do, but request data must not be part of the URL. Instead, you should use the -d option to specify the sent data and use the URL up to the ? sign, like shown in this superuser question
But! Even if you used the right HTTP method, you'd get an error that reads:
Unsupported type: 'device_code'. Supported types: web_server, user_agent, client_cred, username
Now the best part: this happens unless you use the client_id facebook themselves used for their demo! In that case, you get a 200 (OK) response with the expected code, user_code and verification_uri. Apparently their application is somehow different from those we're trying with. No hint in the app configuration page about this.
By the way, I haven't found anyone claiming to have successfully used facebook's Device Flow, have you?
Here's an example implementation, but I haven't managed to get it working with my own project:
https://oauth-device-demo.appspot.com/
I also encountered the same error.
look this article
http://forum.developers.facebook.net/viewtopic.php?id=105132
it's teach your how set app, but after trying, nothing change~
you can try~