Create on Demand snapshot through API with opsmanager

Hi

I try to create and on demand backup with api call

curl --user "$publicKey:$privateKey" \
    --digest  \
    --header "Accept: application/json" \
    --include \
    --request POST $base_url/api/public/v1.0/groups/$projectId/clusters/$clusterId/snapshots?pretty=true \
    --data '{ "description" : "On Demand Snapshot by API call", "retentionInDays" : 3 }'

But I get a 405 answer “Method not allowed”, this seems possible with Atlas but not with ops manager. Can someone confirm my understanding ?

@chris provide the solution

curl --user "$publicKey:$privateKey" \
    --digest  \
    --header "Accept: application/json" \
    --include \
    --request POST $base_url/api/public/v1.0/groups/$projectId/clusters/$clusterId/snapshots/onDemandSnapshot?retentionDays=10
1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.