Posted: July 13, 2016 at 3:41 am
|
Hi Support, I have installed your premium event espresso plugin on my site and I want to use its REST API but I am getting error here: [{“code”:”json_no_route”,”message”:”No route was found matching the URL and request method”}] Can you please help me out with this. Thanks |
Hi there, Since the REST API wasn’t a part of WordPress core until WordPress 4.5, you’ll need to update your site to have the newer current of WordPress. |
|
|
Hi Josh, Thanks for your reply. I have updated my site “https://fellowshipoffiduciaryeducation.com” to the latest version of wordpress. But still getting the same error as given below: [{“code”:”json_no_route”,”message”:”No route was found matching the URL and request method”}] Can you please assist. Thanks |
Hi there, It looks like Event Espresso is not currently active on your site, have you de-activated it? |
|
|
Hi Tony, Yes, I tried deactivating and then re-activating the event plugin but still the API is not working. Can you please check what’s the issue. Thanks |
Do you currently have any REST API plugins listed within Dashboard -> Plugins? |
|
|
I have “WP REST API” and “WP REST API Log” installed at my end. |
De-activate the WP REST API plugin (you don’t need that for EE to work, only if you are using the REST API for ‘other’ areas of your site) Then navigate to Settings -> Permalinks. Make no changes and save the settings. We need: https://fellowshipoffiduciaryeducation.com/wp-json/ To load the enpoints before moving any further, I suspect you have V1 of the REST API add-on installed which is causing problems. |
|
|
I have deactivated the “WP REST API” plugin and reset the Permalinks. Actually, I need to use https://fellowshipoffiduciaryeducation.com/wp-json/ee/v4.6/events on one of my third site to display event data on it. So I need the event data via this API. Thanks |
|
Now I am getting this error {“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method”,”data”:{“status”:404}} Please help |
I understand that you are trying to get the EE data from the REST API, however you need https://fellowshipoffiduciaryeducation.com/wp-json/ to load all of the endpoints, THEN move onto getting EE endpoints to work. Previously that URL would show:
Which meant the REST API wasn’t working at all on your site…. Now you have de-activated the V1 plugin, if you take a look here: https://fellowshipoffiduciaryeducation.com/wp-json/ You’ll notice its loading all the data from EE, meaning its now working as expected. The reason your getting an error on this url: https://fellowshipoffiduciaryeducation.com/wp-json/ee/v4.6/events is because it’s the wrong url. There is no /v4.6/ enpoint, you need to use this: https://fellowshipoffiduciaryeducation.com/wp-json/ee/v4.8.36/events/ We have some documentation on using the EE REST API here: |
|
|
Thank for you help. Let me check this and will revert you soon. Also I would like to know that what does “v4.8.36” means in the url https://fellowshipoffiduciaryeducation.com/wp-json/ee/v4.8.36/events/ Is that something kind of version number? |
|
Also When I am trying to use https://fellowshipoffiduciaryeducation.com/events/ I get the following error in the error box: An error has occurred: |
Yes, its basically the versions of the API you are using within EE. When we make changes to the API we create a new version based on the release version number. So lets so we introduce a new change to how the API works, and we released that with the next version of EE, we may then have: /wp-json/ee/v4.9.4/ You can continue to use: /wp-json/ee/v4.8.36/ For the same current functionality (meaning we don’t break of of the existing use cases the REST API is being used for) or if you want to use the next features use the new endpoint. It also means that we can identify the features available to use based on the version number of EE in use on the site and the version of the API in use, there’s a little more to it, but that’s the general idea for the version numbering. |
|
re: the error. You need to deactivate the Event Espresso REST API plugin as it’s no longer used. The Event Espresso REST API is now included in Event Espresso core. |
|
|
Hi Josh, thanks for your reply. I am a bit stuck right now. I have same plugin setup on my staging site here: http://fofed-s.sevenverbs.com/ The plugins installed on these are: Event Espresso – REST API (EE4.x+) – activated Still I am unable to access the REST API on my staging/development. Can you please help me with this issue as soon as possible. Am I doing wrong somewhere? Thanks |
Event Espresso – REST API (EE4.x+) – activated Please de-activate and remove this plugin, it is no longer needed as the REST API is now in Event Espresso core Then flush your permalinks and retest. |
|
|
Hi Tony, I made the above changes and yes its working now. Also I would like to know that is there any changes made in the return json format of the API. I am getting issue with it if decode it into Csharp. Please have a look at the screenshot below. http://svmktools.com/ars-bp-d/json.png Can you please check and verify. Thanks Roma Dahiya |
|
I need a proper key-value pair when decoded in Csharp |
hey @adminsevenverbs, are you asking if “htts://api.eventespresso.com/datetimes” is the key? Yes it is. And its value is a JSON array, whose individual items are JSON objects with properties “href” (a string) and “single” (a boolean). |
|
|
Hi Michael Nelson I am csharp developer. I am decoding your json in csharp.Everthing is working fine.But when I decode link array this what I get. public class Links Csharp does not support special characters in keys like the one above (https://api.example.com/registrations).If it is possible can you please make the keys public class Links Looking forward to hear a positive response from you.This is going to great help for me and other developer working with Event Espresso API. Thanks |
|
Hi Michael, Is there any updates regarding the query above. I need solution to this problem as soon as possible. Kindly assist. Thanks |
Hi @adminsevenversb, I’ve only worked in C sharp once. What library or code are you using to generate Csharp code from our JSON responses? For now, I would suggest one of the following: 1. Before parsing the JSON, you could perform a string replace on it. ie, remove all the strings like “https://api.eventespresso.com/wp_user” and replace with “httpsapieventespressocomwp_user” etc. |
|
|
Hi Michael Thanks for you response here. 4). I can not exclude those values. I need those in proper format that’s why I am here with an issue. Thanks |
You can’t do a string replace on the keys you need changed? We’re really not in a position to make a breaking change to the API as that will affect everyone else that’s already using the API. |
|
The support post ‘REST API not working’ 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.