Getting 401 errors for Atlassian pricing APIs
Asked by Abbas Ismail:

Trying to import pricing from public with query filter.  
It was working fine till 2023-11-30.  

<https://www.atlassian.com/hamlet/1.0/public/pricing/query>  

We were using it without Auth as it seems to be a public endpoint.   
It recently stopped working and receiving 401 (unauthorized) errors now.


Answers:
author: Artem Grotskyi
body: [@Abbas Ismail](/t5/user/viewprofilepage/user-id/5381881),  

You should add the second "public" in the URL (between "pricing" and "query").  
I can't post the URL here, unfortunately.  

![Screenshot 2023-12-22 at 13.38.50.png](https://community.atlassian.com/t5/image/serverpage/image-id/297956i41BC3573E16739A7/image-size/large?v=v2&px=999 "Screenshot 2023-12-22 at 13.38.50.png")  

comments: author: David Bakkers
body: Hello [@Artem Grotskyi](/t5/user/viewprofilepage/user-id/3524178)

Where is the documentation for how to use that endpoint? What authentication methods does it support? What are the parameters that are passed to it?

When I query that endpoint with no authentication, it just returns an empty *products* array:

**GET** <https://www.atlassian.com/hamlet/1.0/public/pricing/public/query>

returns:

```
{"products":[],"currency":"USD"}
```


author: Abbas Ismail
body: [@Artem Grotskyi](/t5/user/viewprofilepage/user-id/3524178) - Yep this this one working as expected, guess just an endpoint path change by Atlassian.


author: David Bakkers
body: Hello [@Abbas Ismail](/t5/user/viewprofilepage/user-id/5381881)

Can you please provide a complete example of how you are making a request to that*'working as expected'* endpoint, including any language / tool being used, auth method, request parameters, and a complete copy / screen grab of the response of that request.

Again, to a request with no auth or parameters, all I get is a response with a single empty array.


author: Artem Grotskyi
body: [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730) ,  

Sorry, I'm not aware of the documentation.  
I'd suggest reaching out to the Atlassian support team and asking them if they have anything that they can share.  

It doesn't require any authentication method, though.  
I use it to get information about specific Atlassian products, e.g.:  

<br />

```
query?currency=USD&licenseType=ACADEMIC&licenseType=COMMERCIAL&licenseType=STARTER&requestingApplication=WAC&productKey=com.atlassian.bitbucket&productKey=pricingplan.stash-data-center
```


author: Artem Grotskyi
body: Hi [@Abbas Ismail](/t5/user/viewprofilepage/user-id/5381881) ,  

Were you able to find a solution?


author: Marc - Devoteam
body: Hi [@Abbas Ismail](/t5/user/viewprofilepage/user-id/5381881)

Welcome to the community.

I never heard of this before.

I suggest to raise an issue via [Atlassian Support](https://support.atlassian.com/contact/#) as this seems to be an Atlassian functionality


author: David Bakkers
body: Hello [@Abbas Ismail](/t5/user/viewprofilepage/user-id/5381881)

I've never heard of this 'pricing API' before.

Can you provide a link to the location of the documentation for it that describes what it is used for and how it's accessed (authentication methods and parameters etc).

comments: author: Abbas Ismail
body: Hello [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)  

Here is the URL endpoint for the API (public)  

: <https://www.atlassian.com/hamlet/1.0/public/pricing/query>  

It was supposed to be No Auth endpoint, but it's responding with 401 errors


author: David Bakkers
body: All you have provided is the path to the endpoint, again. You didn't provide the location of the documentation about this endpoint that says you're allowed to use it and that says you don't need authentication.

I get a feeling you're just randomly querying one of Atlassian's internal APIs that provides functionality to its public websites. Atlassian probably don't want people querying that endpoint directly, so they've now added authentication to prevent public access to it.


author: Abbas Ismail
body: Yes [@David Bakkers](/t5/user/viewprofilepage/user-id/1575730)

I wasn't able to find any documentation around this endpoint path.


Tags: atlassian-guard

atlassian-support

cloud

confluence-cloud

rest

rest-api