The problem was partly because I was doing it wrong. You need to provide 
additional parameters in a body element. And there is a bug in the snapshot 
creation, needs to be a PUT instead of a POST.

See issue:
https://github.com/elasticsearch/elasticsearch-js/issues/170

Op vrijdag 12 december 2014 01:12:28 UTC+1 schreef Jettro Coenradie:
>
> Hi,
> I am capable of creating a snapshot using sense or curl using the command:
>
> PUT /_snapshot/gridshore-repo/gridshore_4
> {
>     "indices": "gridshore*"
> }
>
> The problem is when I start doing something like this using the javascript 
> library in angularjs.
>
> es.snapshot.create({"repository":"gridshore-repo","snapshot":"gridshore_4","indices":"gridshore*"}).then(function(data)
>  
> {
>     callback();
> }, logErrors);
>
> I get back errors like this:
> StatusCodeError: InvalidIndexNameException[[_snapshot] Invalid index name 
> [_snapshot], must not start with '_'] {message: 
> "InvalidIndexNameException[[_snapshot] Invalid index name [_snapshot], must 
> not start with '_']", body: Object, status: 400, stack: (...)}
>
> Does anyone have a clue how to fix this?
>
> thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/3a3614eb-6e07-41ce-82bd-2010ba2d25d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to