Chilkat Online Tools

Python / MongoDB Atlas / Get All Organization Events

Back to Collection Items

import sys
import chilkat

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = chilkat.CkHttp()

http.put_DigestAuth(True)
http.put_Login("username")
http.put_Password("password")

sbResponseBody = chilkat.CkStringBuilder()
success = http.QuickGetSb("https://domain.com/api/atlas/{{version}}/orgs/{{ORG-ID}}/events",sbResponseBody)
if (success == False):
    print(http.lastErrorText())
    sys.exit()

print("Response status code = " + str(http.get_LastStatus()))
print(sbResponseBody.getAsString())

Curl Command

curl -X GET
	--digest -u 'username:password'
https://domain.com/api/atlas/{{version}}/orgs/{{ORG-ID}}/events

Postman Collection Item JSON

{
  "name": "Get All Organization Events",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{base_url}}/api/atlas/{{version}}/orgs/{{ORG-ID}}/events",
      "host": [
        "{{base_url}}"
      ],
      "path": [
        "api",
        "atlas",
        "{{version}}",
        "orgs",
        "{{ORG-ID}}",
        "events"
      ]
    },
    "description": "https://docs.atlas.mongodb.com/reference/api/events-orgs-get-all/"
  },
  "response": [
  ]
}