Curl to add an index pattern and a json file to create dashboard

I have one last question :pray: . I should install a plugin or what to use saved object API

I would like to run this command but I don't know where.

POST api/saved_objects/index-pattern/logstash
{
  "attributes": {
    "title": "logstash-*"
  }
}