Error When Using Data Insertion API | Community
Skip to main content
neela_balkaran
June 14, 2016
Solved

Error When Using Data Insertion API

  • June 14, 2016
  • 6 replies
  • 1626 views

Greetings!

I'm currently trying to utilize the Data Insertion API on my company site (using Ruby on Rails), but am getting an error when trying to post. I believe I am using the correct format/variables.
 

Below is the XML request:

"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<request>\n  <reportSuiteID>pluralsight-codeschool-dev</reportSuiteID>\n  <visitorID>146</visitorID>\n  <pageName>Testing Successful Payment</pageName>\n  <category>Individual</category>\n  <events>purchase</events>\n  <products>;Individual;1;55</products>\n  <purchaseID>137</purchaseID>\n</request>\n"

I'm using Faraday to send a post request to: "http://sc.omtrdc.net.112.2o7.net/b/ss//6"

And the response: 

<Faraday::Response:0x007fb4684d6ec0 @env= #<struct Faraday::Env method=:post, body="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<status>FAILURE</status>\n<reason>NO account</reason>\n", #removed some info here status=200>, @on_complete_callbacks=[]>

Any thoughts on what could be wrong? The <reason>NO account</reason> implies that my report suite ID is missing, but it should be correct and was copied directly from my Omniture account.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by neela_balkaran

Yep - got the issue sorted out! Turns out it was more of a Faraday problem than an Adobe problem. Thank you all for your help!

6 replies

Gigazelle
Adobe Employee
Adobe Employee
June 14, 2016

Hi Neela, where are you sending the API request to?

neela_balkaran
June 14, 2016

Hi!

I am sending the data to the following URL: "http://sc.omtrdc.net.112.2o7.net/b/ss//6"

Gigazelle
Adobe Employee
Adobe Employee
June 15, 2016

Can you try sending it to "http://sc.omtrdc.net/b/ss//6"? The current URL you have there is a bunch of subdomains to 112.2o7.net.

neela_balkaran
June 15, 2016

Ah, good idea. But that didn't quite work.

That leads to an error of: 
Faraday::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
from /Users/neela/.rbenv/versions/2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'

TanmayMathur
Adobe Employee
Adobe Employee
June 30, 2016

Hi Neela, 

Have you been able to sort this issue out? Let us know if you need more help around this. If you have found the solution, please share it so it could benefit the community. Thanks!

neela_balkaran
neela_balkaranAuthorAccepted solution
July 6, 2016

Yep - got the issue sorted out! Turns out it was more of a Faraday problem than an Adobe problem. Thank you all for your help!