It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the API to get subdomain or base url of confluence?

How to get subdomain using API, as accessible resource API isnt working

2 answers

0 votes

What do you mean by "subdomain"?

Also, if you want to get something from the API, you need to ask for it by the base url.  If you don't know the base url of a Confluence already, you don't know where it is, so you can't ask.  Whatever confluence you're trying to talk to, you already have the base url.

@Nic Brough _Adaptavist_ 

Consider following example,

curl --request GET \ --url '' \ --header 'Accept: application/json'


I am referring to, Is there an API which returns domains for current user. 

It is mentioned in

that, accessible resource API does not return base url. so what is the alternative to that API?

Like # people like this

To issue your example call, you have used the base url already.  So you know it.  It is   ' . 

As for the wider question, what you're really asking is "what services does a particular Atlassian account have access to?".  There is no API on Atlassian's services for that because it's illegal for you to get that information.

Like Veera likes this
0 votes
Veera Atlassian Team Jan 25, 2020

@Anuja Deshpande 

When you subscribe for Confluence Cloud version, you can choose your domain name so that your Cloud site will be created as with that domain name. 

Let's say if you choose, anuja as your domain, your Cloud site will be created with URL:

Your Cloud URL is the base URL you need to use in the REST API calls. So, in this case becomes Base URL for your REST API calls.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

5,966 views 4 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you