Support

Home Forums Event Espresso Premium "Endpoint not yet implemented" Error

"Endpoint not yet implemented" Error

Posted: July 23, 2013 at 4:36 pm

Viewing 11 reply threads


obstacleracermag

July 23, 2013 at 4:36 pm

On the test server, I’m populating a map with my event locations. However, once I transferred it to the live site.. I get this “Endpoint not yet implemented” error. What’s the deal?


Dean

July 24, 2013 at 4:14 am

Hi,

The documentation for the API (https://eventespresso.com/wiki/api-addon/#Status_Codes) states that the endpoint you are using is still a work in progress.

We have no outstanding tickets for the API, so I am assuming this will be looked at in the next version.

I will ask the developer to comment on this.


obstacleracermag

July 24, 2013 at 8:55 am

Whoa, the JSON API is one of, if not *the* reason we purchased a license. It worked perfectly during testing. Is there a major difference between me requesting data from an API on my local dev environment and the request going to the API on my live server?

Again, it works exactly as I expect it to inside my local dev environment.

I am not in any way trying to dangle anything over anyone’s head when I say this, but honestly, if this functionality isn’t available, we may have to ask for a refund. The fact that your event management plugin gave access to it’s data via the JSON API was the primary reason we chose your solution. I really, really hope that we’re able to figure this out.


Michael Nelson

  • Support Staff

July 24, 2013 at 10:14 am

Yes that is odd that you’re getting that message on your live site but not your dev site. Would you mind providing us with the URL you’re requesting the data from?


obstacleracermag

July 24, 2013 at 12:00 pm

http://www.obstacleracermagazine.com/races

but it works perfectly with the same url @ localhost:8888/freelance/ORMag/races

in both places, when I access the respective version of this URL ( http://www.obstacleracermagazine.com/espresso-api/v1/events/public.json ), the data returns with status_code: 200. I don’t understand….


Michael Nelson

  • Support Staff

July 24, 2013 at 12:39 pm

Ok I see what the error was: you’re fetching the data from http://www.obstacleracermagazine.com/espresso-api/v1/events/public.json using jQuery, but you’re using a POST request. In RESTful APIs, a POST request means you want to create a new record. If you change your code to use jQuery.get instead of jQuery.ajax, it should work fine.

You might not have gotten that error on your dev server because jQuery must have been defaulting to instead send a GET request… Maybe because you had URL rewrite turned off? Anyways, I suspect a difference in your environment and not a difference in the API.

Let please us know if the above suggestion fixes your issue


obstacleracermag

July 24, 2013 at 7:29 pm

I understand what you’re saying, however, it has been re-written using authentication and the get request. Now, when using the get request it ends up returning this url and giving me a 404.

GET http://www.obstacleracermagazine.com/races/%5Bobject%20Object%5D?_=1374715069499 404 (Not Found)

The authentication runs first and returns status_code: 200, giving me a session key.

Is there something else that could be the issue?


obstacleracermag

July 24, 2013 at 8:41 pm

Got that last part squared away. What could this error be in reference to? The query doesn’t look like that at all…

Object {status: “OK”, status_code: 200, body: Object}
http://www.obstacleracermagazine.com/:906
Object {status: “Query parameter ‘_’ not a valid parameter of resource ‘Event'”, status_code: 400}


obstacleracermag

July 25, 2013 at 10:05 am

I’m still stuck on this issue. When I console log the address to the json data, the data and the address are in working order. What could this be in reference to, and why does it work perfectly on my local version? It’s not a url rewrite issue, as both installations are carbon copies of one another. Please help!


Michael Nelson

  • Support Staff

July 25, 2013 at 10:47 am

It seems your javascript is still adding some unexpected querystring variables. I see in the console’s error log the following:

GET http://www.obstacleracermagazine.com/races/obstacleracermagazine.com/espresso-api/v1/events/0n8g7gcsw5?_=1374770503070 404 (Not Found)

Here’s a link explaining why jquery adds that underscoe (its news to me): http://stackoverflow.com/questions/12709686/what-is-the-underscore-for-in-the-query-string-of-a-jquery-jsonp-ajax-request.
So I think I’d just add ‘cache=false’ in your jQUery.get request and it should be good.

Also, it’s probably not a good idea to have your username and password in the javascript, as that’s viewable by everyone who inspects your code. It was probably a better idea to enable ‘public’ querying, and use http://www.obstacleracermagazine.com/espresso-api/v1/events/public.json like you did originally. It doesn’t expose your admin’s username and password, and the data returned from that URL is all public knowledge anyways (whereas using the non-public version of the endpoint returns some sensitive data, like promo codes).

And no, there’s no reason I know of why this should behave differently in development VS on live, as the API doesn’t know whether it’s being run on the live or development site.


obstacleracermag

July 25, 2013 at 10:57 am

After adding cache=false, I still get the same error in the log. The thing is, though, when I console log the url it’s supposed to be pulling from, it logs the url exactly as it should. No additions or modifications.


Michael Nelson

  • Support Staff

July 25, 2013 at 1:05 pm

The modification to the URL is happening within the jQuery library code that sends the request. The error I saw in the log of

GET http://www.obstacleracermagazine.com/races/obstacleracermagazine.com/espresso-api/v1/events/0n8g7gcsw5?_=1374770503070 404 (Not Found)

was pulled from my browser. I didn’t add the “?_1374770503070”. So I actually disagree: jQuery is adding that “?_1374770503070” onto the URL you’re sending it, which setting cache to false should have prevented. Here’s another stackoverflow question about it: http://stackoverflow.com/questions/3687729/who-add-single-underscore-query-parameter.

Also, I noticed the URL you were sending should have started with http://, instead you were just sending jQuery the url obstacleracermagazine.com/espresso-api/v1/events/0n8g7gcsw5, which was being interpreted as a relative URL, so it was adding that onto the current URL of the page, thus resulting in http://www.obstacleracermagazine.com/races/obstacleracermagazine.com/espresso-api/v1/events/0n8g7gcsw5.

Viewing 11 reply threads

The support post ‘"Endpoint not yet implemented" Error’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso