OK, I generated a new API token to be sure, copied that and still no data is returned although I am no longer getting the 401 issues so that’s progress.
When using my logged in Jira session, and passting the command, I get the expected data:
{
"self": "https://citation.atlassian.net/rest/api/3/project/search?maxResults=50&startAt=0",
"maxResults": 50,
"startAt": 0,
"total": 50,
"isLast": true,
"values": [
{
"expand": "description,lead,issueTypes,url,projectKeys,permissions,insight",
"self": "https://citation.atlassian.net/rest/api/3/project/12543",
"id": "12543",
"key": "A3L",
"name": "Atlas 3rd Line - Test (UAT)",
"avatarUrls": {
"48x48": "https://citation.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/13424",
"24x24": "https://citation.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/13424?size=small",
"16x16": "https://citation.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/13424?size=xsmall",
"32x32": "https://citation.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/13424?size=medium"
},
"projectTypeKey": "software",
"simplified": false,
"style": "classic",
"isPrivate": false,
"properties": {}
},
I then double checked the email address used as my profile, and then used the new API_TOKEN, I enabled verbose mode for curl, it responds 200 OK but still no data! WE ARE CLOSE, I feel it in my bones!
Here is the curl output and the request:
curl \
-vvv \
--request GET \
--url 'https://citation.atlassian.net/rest/api/3/project/search' \
--user 'sean.charles@citation.co.uk:$API_TOKEN' \
--header 'Accept: application/json'
and the output:
>
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 64)!
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 200
< date: Fri, 22 Mar 2024 17:24:01 GMT
< content-type: application/json;charset=UTF-8
< server: AtlassianEdge
< timing-allow-origin: *
< x-arequestid: 77d190c3491d08641f92c5fca5e70adf
< x-seraph-loginreason: AUTHENTICATED_FAILED
< set-cookie: atlassian.xsrf.token=a20ecab8dd12604d36186174ebe902619c04de22_lout; Path=/; SameSite=None; Secure
< cache-control: no-cache, no-store, no-transform
< vary: Accept-Encoding
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< atl-traceid: 83c3b2ab0de043a48505ca045f1ac929
< strict-transport-security: max-age=63072000; includeSubDomains; preload
< report-to: {"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}
< nel: {"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}
<
* Connection #0 to host citation.atlassian.net left intact
{"self":"https://citation.atlassian.net/rest/api/3/project/search?maxResults=50&startAt=0","maxResults":50,"startAt":0,"total":0,"isLast":true,"values":[]}%
Hope that helps, I feel we are close to resolution!