Skip to content

Create new hosts or services via REST API #1145

Answered by sni
Beatlor asked this question in Q&A
Discussion options

You must be logged in to vote

when using & in the shell, you need to put it in quotes, otherwise the shell will interpret that as a background command.
try something like this:

curl \
  -X POST \
  --header "Content-Type: application/json" \
  -d '{":TYPE": "host", ":FILE":"testhosts.cfg","name":"testhost123"}' \
  http://localhost:3000/thruk/r/config/objects

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Beatlor
Comment options

Comment options

You must be logged in to vote
1 reply
@Beatlor
Comment options

Answer selected by Beatlor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants