Kibana console introduction

Hello all,

I am trying to get familiarized with my kibana UI DevTools.

I am following this manual

It is clear when I run this command on URL > GET localhost:9200

However, how can I do this on the DevTools? what is the sintax to get the same output?

Same here >

POST localhost:9200/accounts/person/1
{
"name" : "John",
"lastname" : "Doe",
"job_description" : "Systems administrator and Linux specialit"
}

Is this something I can get in the kibana console or do I need to run it in my terminal osx?

Thanks

If I understand what you're asking correctly, the only thing that you need to change in order to get that request to work in the Dev Tools is to remove the host and port... ie:

# Create the accounts index, and a single document
POST accounts/person/1
{
  "name": "John",
  "lastname": "Doe",
  "job_description": "Systems administrator and Linus specialist"
}

# Retrieve that document
GET accounts/person/1

# Delete the accounts index
DELETE accounts

1 Like

Indeed thats correct, I was able to run it that way.
However when I tried to do > POST accounts/person/1/_update
to update the typo is gicing me an error >

{
"error": {
"root_cause":[
{
"type":"action_requested_validation_exeption",
"reason": "validation failed: 1: script or doc is missing;"
}
],
"type":"action_requested_validation_exeption",
"reason": "validation failed: 1: script or doc is missing;"
},
"status":400
}

Thanks!

You don't need the _update. Just POST the new version of the document.

POST accounts/person/1
{
  "name": "John",
  "lastname": "Doep",
  "job_description": "I am the updated description"
}

# Response (note version: 2)
{
  "_index": "accounts",
  "_type": "person",
  "_id": "1",
  "_version": 2,
  "result": "updated",
  "_shards": {
    "total": 2,
    "successful": 1,
    "failed": 0
  },
  "_seq_no": 1,
  "_primary_term": 1,
  "created": false
}

gotcha! I got this, haha I am starting sorry for the questions, I appreciate your help, I am prolly coming back to ask more.

Thanks again!

1 Like

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