REST CALL Details
API: - (GET) - https://sriitservicesllc.atlassian.net/rest/api/3/project
Hello @Sri IT Services LLC
First note that the API you are using has been deprecated.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-get
You should be using this API instead:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-search-get
See if you get different results using the newer endpoint.
Disclaimer: I have not tried to replicate you scenario myself and have not worked with API Token scopes.
@Sri IT Services LLC
Adding to @Trudy P Claspill answer, when using OAuth 2.0 tokens, you'll first need to construct the request using the appropriate resource URL that includes your Cloud ID, as outlined in the documentation:🔗 Enabling OAuth 2.0 (3LO) for Atlassian Cloud
Your API endpoint should look like this:
https://api.atlassian.com/ex/jira/{cloudid}/rest/api/3/project/search
You can also retrieve the cloudid following the steps mentioned in this Atlassian guide.
Below curl command should work for fetching paginated projects ,
curl --request GET \--url 'https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/project/search' \--user 'email@example.com:<api_token>' \--header 'Accept: application/json'
Note: The above end point only requires (read:jira-work) classic scope.
It looks like you're new here. Sign in or register to get started.