First I followed documentation, then forum suggestions - didn't work!!!!
My setup:
- shell script- AUTH=(EMAIL || USERNAME)- PASS=(API_TOKEN || USER_PASSWORD)- curl(-u "AUTH:PASS" || header "base64(AUTH:PASS)" )
curl -u AUTH:PASS -X GET -H "Content-Type: application/json" https://your-domain.atlassian.net/rest/api/2/issue/createmetacurl -X GET -H "Authorization: Basic base64(AUTH:PASS)" -H "Content-Type: application/json" "https://your-domain.atlassian.net/rest/api/2/issue/XXX"Any help?
Hi @ra,
please, what are you trying to do? Get some specific isues's data using REST API?
How exactly does your domain looks like? Is it https://your-domain.atlassian.net or something different like https://jira.your-company.com? I'm just trying to figure out, which hosting option do you use (cloud or server), because there are some differences in REST API. There's "server" in the tags, but if your domain is https://your-domain.atlassian.net, you're probably using cloud.
When I put this question I set: `Server` and add it to the tags too.
I'm trying to retrieve all assigned to currentUser tasks.
The problem is - I cannot login via cURL
P.S.: as an example (also tried with flag -u):curl -s -H "Authorization: Basic ${BASE64}" -X GET -H "Content-Type: application/json" "${URL}/rest/api/2/search?jql=assignee=currentuser()"
What error message is returned? This might tell you where to look for what you're doing wrong.
The response is in HTML and the error is:
Encountered a 401 - Unauthorized error while loading this page.Basic Authentication Failure - Reason : AUTHENTICATED_FAILED
This error doesn't help me at all. The simple AUTH!!! I will understand if I'll make some stuff later on which may cause some errors, but not AUTH.
As I said before I tried multiple combinations.
JIRA - (LOGIN and PASSWORD) works fine.
any suggestions?
This problem has't yet been resolved
Hi @ra ,
sorry for the late response.
For the Jira server this should work:
curl -H "Authorization: Basic AUTH" -X GET -H "Content-Type: application/json" URL/rest/api/2/search?jql=assignee=currentuser()AUTH = base64 of username:passwordURL = your instance url
I would recommend you to try
Maybe there is some other kind of problem - is it possible that something like proxy blocks the access?
It looks like you're new here. Sign in or register to get started.