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.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Search code API on private repository not working

Hello,

I am trying to search code via API but for some reason it won't return code that is not in a public repository. I have tried repo:repo_slug, but it still won't return it. It will return however code in public repositories of the workspace.

I am using the same token on other routes, and never had that issue between public and private repository.

 

Example request : {{protocol}}://{{host}}/{{basePath}}workspaces/:workspace/search/code?search_query=repo:{uuid} SearchQuery

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 20, 2023

Hi @codec,

Could you please let me know what kind of access token you are using for authentication?

There is currently a limitation with workspace access tokens, that cannot be used for authentication with the code search endpoint:

It should be possible to search using basic auth with username and app password or with an OAuth access token.

Kind regards,
Theodora

PS : it would work with Basic Auth, but not with bearer, is that intended ?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events