dioxic / python-atlas-api

Examples for using Atlas API with Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB Atlas API

Examples for using python to interrogate the MongoDB Atlas Public API

Setup

Create the following environment variables:

ATLAS_API_PUBLIC
ATLAS_API_PRIVATE
ATLAS_PROJECT_ID
ATLAS_CLUSTER_NAME

These will be used by the cli commands if they exist but can also be passed in manually if required. The usage examples assume these have been created.

Example usage

get-process-measurements --process-id atlas-ct3yft-shard-00-02.bj7ub.mongodb.net:27017
get-cluster-info
get-processes
get-process-by-id --process-id atlas-ct3yft-shard-00-02.bj7ub.mongodb.net:27017
get-process-log --hostname atlas-ct3yft-shard-00-02.bj7ub.mongodb.net

About

Examples for using Atlas API with Python


Languages

Language:Python 100.0%