Chilkat Online Tools

Python / MongoDB Atlas / Get One Legacy Backup Restore Job

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}}/groups/{{ProjectID}}/clusters/{{CLUSTER-NAME}}/restoreJobs/{{JOB-ID}}",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}}/groups/{{ProjectID}}/clusters/{{CLUSTER-NAME}}/restoreJobs/{{JOB-ID}}

Postman Collection Item JSON

{
  "name": "Get One Legacy Backup Restore Job",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{base_url}}/api/atlas/{{version}}/groups/{{ProjectID}}/clusters/{{CLUSTER-NAME}}/restoreJobs/{{JOB-ID}}",
      "host": [
        "{{base_url}}"
      ],
      "path": [
        "api",
        "atlas",
        "{{version}}",
        "groups",
        "{{ProjectID}}",
        "clusters",
        "{{CLUSTER-NAME}}",
        "restoreJobs",
        "{{JOB-ID}}"
      ]
    },
    "description": "https://docs.atlas.mongodb.com/reference/api/legacy-backup/restore/get-one-restore-job/"
  },
  "response": [
  ]
}