Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to login using JSON-RPC

stefanmeisnerlarsen
November 23, 2011

I have problems logging in using the JSON-RPC service on JIRA OnDemand. As I understand, this service should be available, and the system settings indicates this too.

I send:

{"id":123,"jsonrpc":"2.0","method":"login","params":["stefan@meisner-larsen.dk","mypassword"]}

replacing mypassword with the correct to the url:

http://ayeoaps.atlassian.net:80/jira/rpc/json-rpc/jirasoapservice-v2

and keep getting 404 response back.

Replacing http with https results in 403 response instead.

Any help appreciated!

/Stefan

7 answers

1 accepted

0 votes
Answer accepted
Michael Knight
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 24, 2011

You should be using HTTPS and not forcing port 80, since all OnDemand instances are served through HTTPS (on the conventional port 443). This snippet should work for you:

#!/bin/bash
URL='https://ayeoaps.atlassian.net/rpc/json-rpc/jirasoapservice-v2'
DATA='
{
    "jsonrpc" : "2.0",
    "method" : "login",
    "params" : ["admin","password"],
    "id" : 12345
}
'
curl -H 'Content-type: application/json' -d "$DATA" $URL

stefanmeisnerlarsen
November 24, 2011

Thanks Michael. Actually i did try the https url in your script, the problem was that I did a PUT not a POST which was then answered with a 403 Forbidden, which seems OK. But trying your script with success made me realize what the real problem was :-)

0 votes
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 24, 2011
Are you sure you can use the email address as parameter name? Could you try it using the user name
0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 23, 2011

Oh yeah, I keep being surprised about this new soap-rpc bridge, then forgetting about it, then getting surprised again. My bad.

0 votes
stefanmeisnerlarsen
November 23, 2011

Jamie, I got the URL from the documentation: https://developer.atlassian.com/display/JIRADEV/JIRA+JSON-RPC+Overview

The jirasoapservice-v2 is aparently because it a wrapper around the SOAP interface

0 votes
Azwandi Mohd Aris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 23, 2011
0 votes
stefanmeisnerlarsen
November 23, 2011

I have tried the following URL (without 'jira' after hostname) with the same result:

http://ayeoaps.atlassian.net/rpc/json-rpc/jirasoapservice-v2

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 23, 2011

Think you're muddling the soap and json rpc urls, but don't have the correct url to hand.

Suggest an answer

Log in or Sign up to answer