I am using OAuth 2 to connect to the Jira API. I have followed the documentation. The authentication and API calls go through, but when running a search query, I see no results.
reqBody, _ := json.Marshal(map[string]interface{}{
"expand": []string{"names"},
"jql": `text ~ ` + request.Query + ` order by created DESC`,
})
u := jiraAPIBaseURL + "/ex/jira/" + resource.ID + "/rest/api/3/search"
req, err := http.NewRequest(http.MethodPost, u, bytes.NewReader(reqBody))
The `resource.ID` is obtained through the call to `/oauth/token/accessible-resources`, as instructed in the documentation.
I have a project set up with two cards, but the result set is empty:
~
❯ curl localhost:8080/search/jira -d '{"query": "Lasagna"}'
{"results":{"issues":[],"maxResults":50,"startAt":0,"total":0}}
Raw request:
{"expand":["names"],"jql":"text ~ Lasagna order by created DESC"}
But the same JQL returns results in advanced search in my account:
Figured it out: the call was missing the Access Token.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.