Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


What is the API used to get file contents?



Are there any APIs for getting the content of a file without giving the sha of the commit which is mentioned here.. 


I tried url to read the file and it works fine.

But if it's a feature branch or bugfix etc, and if we try

it gives error as

    "type": "error",
    "error": {
        "message": "Commit not found",
        "data": {
            "shas": [
    "data": {
        "shas": [
what is the solution for this??

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 10, 2023

Hi @Mohammed Muthahhar,

This endpoint works with branch names that don't include the slash character ( / ) but it will not work for branches that have a slash in their name.

We have a bug report in our issue tracker here:

The bug report mentions the commit endpoint, but this applies to the src endpoint as well.

For these branches that include a slash in their name, you will need to provide a commit hash instead. You can use the following endpoint to get the commit hash of a branch's last commit:

You can filter the output to return only the commit hash with a url as follows:

Kind regards,

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events