Configuring ttn http integration forward to elastic cloud without success

I’m about to forward my sensor data to elastic cloud 5.x. for test i did a curl which worked - only using GET
curl -u user:password https://…myelastic1.cloud.es.io:9243/myid/mytype -XPOST -d ‘{“msg”:“test”}’
this worked successfully
in the http integration i did the following

  • url: https://…myelastic1.cloud.es.io:9243
  • method:GET
  • authorization: Authorization: Basic abcdef
  • custom header name: Content-Type
  • custom header value: application/json

what else do I miss?

That’s not a valid value for Basic. See also https://www.thethingsnetwork.org/forum/t/http-integration/5271/28

I doubt that’s supported; a GET does not have a request Content Type. I’d use POST like you did with curl. And I’d test with https://requestb.in to see what you get.

Well, abcdef was confusing.
what I did:
Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l
the authorization string is structured according to the following rules:
'Authorization: Basic '+Buffer.from(‘elastic’ + ‘:’ + ‘passwordFromElastic’).toString(‘base64’)
and I tried GET and POST

So:

  • Configure the integration to use https://requestb.in to capture the headers and JSON payload
  • Make sure that looks good (and does not include duplicate haders; looking at you, Content-Type)
  • Use those headers and JSON to test with curl towards Elastic Cloud

tested it using chrome/postman - which worked
here a snapshot of the configuration grafik
I guess it is where to put the type and id. for that I’ve already checked out adding it to “POST /type/id” and also as in the picture at the end of the url.

checked again with the following syntax structure
url:port/type/id
(copied authentication string from chrome/postman)
(copied custom header:Content-Type and value:application/json)
it’s still not working - but as mentioned already it worked using chrome/postman. For me it seems like the TTN request isn’t merged properly or the port firewall settings of the TTN block the request on the port 9243.

furthermore I tried the URL like elastic.co:9243 and then added the type and id to the POST command like this:
POST /test_201712_201801/abc
and also with this (postman cutout)
POST /test_201712_201801/abc HTTP/1.1