Chilkat Online Tools

PHP (Extension) / MongoDB Atlas / Return All Snapshots Of One Serverless Instance

Back to Collection Items

<?php

include("chilkat_9_5_0.php");

$http->put_DigestAuth(true);$http->put_Login('username');$http->put_Password('password');$json->UpdateString('description','On Demand Snapshot');$json->UpdateInt('retentionInDays',5);$json->EmitSb($sbRequestBody);
?>

Curl Command

curl -X GET
	--digest -u 'username:password'
	-d '{
    "description": "On Demand Snapshot",
    "retentionInDays": 5
}'
https://domain.com/api/atlas/{{version}}/groups/{{ProjectID}}/clusters/{{CLUSTER-NAME}}/backup/snapshots

Postman Collection Item JSON

{
  "name": "Return All Snapshots Of One Serverless Instance",
  "protocolProfileBehavior": {
    "disableBodyPruning": true
  },
  "request": {
    "method": "GET",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"description\": \"On Demand Snapshot\",\n    \"retentionInDays\": 5\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{base_url}}/api/atlas/{{version}}/groups/{{ProjectID}}/clusters/{{CLUSTER-NAME}}/backup/snapshots",
      "host": [
        "{{base_url}}"
      ],
      "path": [
        "api",
        "atlas",
        "{{version}}",
        "groups",
        "{{ProjectID}}",
        "clusters",
        "{{CLUSTER-NAME}}",
        "backup",
        "snapshots"
      ]
    },
    "description": "https://docs.atlas.mongodb.com/reference/api/cloud-backup/backup/return-one-snapshot-of-one-serverless-instance/"
  },
  "response": [
  ]
}