Support

Home Forums Event Espresso Premium EE 2.1.4p JSON API Add on giving: Could not find Class of Type:Events, Resource

EE 2.1.4p JSON API Add on giving: Could not find Class of Type:Events, Resource

Posted: May 16, 2018 at 2:37 am


JPujuri

May 16, 2018 at 2:37 am

Hi,
We have installed EE 2.1.4p API Plugin into our website. and trying to access events with “mysite.com/espresso-api/v1/events/{session}”, but the API returning
{
“status”: “EspressoAPI Class Loader Error. Could not find Class of Type:Events, Resource”,
“status_code”: 500
}

Can some one help me to resolve this issue.


Tony

  • Support Staff

May 16, 2018 at 6:03 am

Hi there,

Are you using EE3 or EE4 on the site?

Can you add a link to your site so we can take a look, please?


JPujuri

May 17, 2018 at 7:38 pm

Hi Tony,

We are using EE4 on site.
http://aandk.staging.wpengine.com


Tony

  • Support Staff

May 18, 2018 at 2:47 am

Ok, the JSON API you are referring to is for EE3:

https://eventespresso.com/wiki/json-api-add-on/

EE4 includes the REST API within core:

https://eventespresso.com/2015/07/event-espresso-4-rest-api-add-on-available/

See so on your site you can start here:

http://aandk.staging.wpengine.com/wp-json/ee/v4.8.36


JPujuri

May 19, 2018 at 11:51 am

Hi Tony,

Thank you. Here another issue coming. We are passing basic Auth in headers and modified .htaccess file. Now events list are coming in API .
http://aandk.staging.wpengine.com/wp-json/ee/v4.8.36/events

but still getting below error. Can you check and help me out to resolve issue.

Sorry, you are not allowed to list people related to Event. Missing permissions: ee_read_people


Seth Shoultes

  • Support Staff

May 21, 2018 at 6:12 am

Hi there,

You may need to add the ee_read_people capability to the user profile that’s trying to access the records via the API. If you have a role and capability management plugin installed, such as Members by Justin Tadlock, then you should be able to assign the capability to the user’s profile.

Here’s more information about the Roles and Capabilities in Event Espresso 4: https://eventespresso.com/wiki/event-espresso-4-roles-permissions/

Please let us know if you have further questions.


JPujuri

May 22, 2018 at 6:57 am

Hi Seth,

Thanks for your reply. our team following your instructions and resolving issue. we areable to get data except “http://aandk.staging.wpengine.com/wp-json/ee/v4.8.29/events/573/people”.

1. Event Category List
2. Category and date wise Events.
3 Events b/w selected start and end dates.

Can you help me out on this APIs.


Josh

  • Support Staff

May 22, 2018 at 1:30 pm

Did you remove the wp/v2 endpoint? The reason I ask is because normally you can get a list of event categories with:

/wp-json/wp/v2/espresso_event_categories

but /wp/v2/ isn’t listed on your site’s discovery route.

To get a list of events by a specific category (in this example category ID 123) :

/wp-json/ee/v4.8.36/events?where[Term_Taxonomy.term_id]=123&include=EVT_name

The support post ‘EE 2.1.4p JSON API Add on giving: Could not find Class of Type:Events, Resource’ 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