My question:
Hi everyone,
Using API from MongoDB Atlas, more exactly from this site:
Locally works fine with curl:
β ~ curl --user "$MONGO_PUBLIC:$MONGO_PRIVATE" --digest --include \
--header "Accept: application/json" \
--request GET https://cloud.mongodb.com/api/atlas/v1.0/groups/$GROUP_ID/accessList\?pretty\=true
HTTP/2 401
www-authenticate: Digest realm="MMS Public API", domain="", nonce="MJi/YKDJmgBmJzHGABbZDgLGIFfz3Iuk", algorithm=MD5, qop="auth", stale=false
content-type: application/json
content-length: 106
x-envoy-upstream-service-time: 2
date: Fri, 23 Jul 2021 13:05:07 GMT
server: envoy
HTTP/2 200
date: Fri, 23 Jul 2021 13:05:07 GMT
x-mongodb-service-version: gitHash=2af297105dee23a69fd711f24c27edfe4b6f90ce; versionString=v20210707
content-type: application/json
strict-transport-security: max-age=31536000
x-frame-options: DENY
vary: Accept-Encoding, User-Agent
content-length: 537
x-envoy-upstream-service-time: 38
server: envoy
{
"links" : [ {
"href" : "https://cloud.mongodb.com/api/atlas/v1.0/groups/*****/accessList?pretty=true&pageNum=1&itemsPerPage=100",
"rel" : "self"
} ],
"results" : [ {
"cidrBlock" : "XX.xx.xx.xx/32",
"comment" : "Home IP",
"groupId" : "60**********",
"ipAddress" : "90..xx.xx.xx",
"links" : [ {
"href" : "https://cloud.mongodb.com/api/atlas/v1.0/groups/******/accessList/90.xx.xx.xx%2F32",
"rel" : "self"
} ]
} ],
"totalCount" : 1
}%
From Atlas MongoDB site, information published:
Syntax
Base URL: https://cloud.mongodb.com/api/atlas/v1.0
GET /groups/{GROUP-ID}/accessList
But trying run from postman, only get βerrorβ: 401,
I have tried diferent ways of authentication, but no success. What is wrong ? because i have not clear why is not working. Any suggestion will be welcomed
Kind regards