An attempt to enable a snapshot by API fails

Hi,

I have an existing cluster and s3 repository created in ECE. When I want to enable snapshots for the cluster using an API call, I'm getting an error.

Request:

curl --request PATCH \
  --url {ece-url}/api/v1/clusters/elasticsearch/e2bf4e7e72274bd0ab8b6ba1ac7b9919/snapshot/settings \
  --header 'content-type: application/json' \
  --data '{
   "enabled" : true,
   "interval" : "1d",
   "pending_interval" : "1m",
   "repository" : {
		 "reference" : {
			 "repository_name": "cluster_repo_s3"
   }
   },
   "retention" : {
      "max_age" : "90d",
      "snapshots" : 90
   }
}'

Response:

{
  "errors": [
    {
      "code": "clusters.cluster_setting_error",
      "message": "Cluster Settings Error: Only one of reference/static/default repository configuration should be defined"
    }
  ]
}

Any thoughts on what I'm doing wrong?

Thank you,

Ondrej

hey @osykora,

One things that I notice is wrong time indication for minutes. Should be min and not m. I've tried using the following payload which worked fine for me. Maybe you can see if it works for you?
One last thing, I assume you have repository configured with cluster_repo_s3 as repo name.

{
    "repository": {
        "reference": {
            "repository_name": "cluster_repo_s3"
        }
    },
    "enabled": true,
    "interval" : "1d",
    "pending_interval" : "1min",
    "retention": {
    	"max_age" : "90d",
    	"snapshots" : 90
    }
}

P.s. I'm using latest version of ECE.

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