How to get subdomain using API, as accessible resource API isnt working
Community moderators have prevented the ability to post new answers.
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: https://anuja.atlassian.net.
Your Cloud URL is the base URL you need to use in the REST API calls. So, in this case https://anuja.atlassian.net becomes Base URL for your REST API calls.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Consider following example,
curl --request GET \ --url 'https://your-domain.atlassian.net/wiki/rest/api/audit' \ --header 'Accept: application/json'
I am referring to your-domain.atlassian.net, Is there an API which returns domains for current user.
It is mentioned in https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/
that, accessible resource API does not return base url. so what is the alternative to that API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To issue your example call, you have used the base url already. So you know it. It is 'https://your-domain.atlassian.net/wiki .
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.