Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Error When Using Data Insertion API

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Level 1

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!

View solution in original post

6 Replies

Avatar

Employee Advisor

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

Avatar

Employee Advisor

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.

Avatar

Level 1

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'

Avatar

Level 10

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!

Avatar

Correct answer by
Level 1

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!