REST API Not Working For Events With Status Pending (or any other status)

Home Forums Calendar Products Events Calendar PRO REST API Not Working For Events With Status Pending (or any other status)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1534987
    sngsheftel
    Participant

    swagger docs indicate that a status query param can be added to the get /wp-json/tribe/events/v1/events request to filter the status of the events coming back however when i send a get request (both through swagger editor and via a browser) I get the following response:

    {“code”:”rest_invalid_param”,”message”:”Invalid parameter(s): status”,”data”:{“status”:400,”params”:{“status”:”Invalid parameter.”}}}

    moreover, when I just send a get request to /events i only get back published events.

    How can the rest api be used to get ALL events both published and unpublished? Also, it would be helpful if you documented the status strings that can be used.

    #1536455
    Andras
    Keymaster

    Hi sngsheftel,

    Thanks for reaching out to us!

    I will need to reach out to our REST API expert on this one, please hang in there. We’ll get back to you as soon as possible.

    Thanks for your patience!

    Cheers,
    Andras

    #1536483
    Andras
    Keymaster

    One idea that came up:

    Are you sending authenticated requests, and does the level/role/caps of the user account you are authenticating with allow checking post staus? Just the same as a logged out user shouldn’t be able to access drafts or pending posts, nor can an API request do this.

    Here’s a nice article where you can learn more about authentication:

    Cheers,
    Andras

    #1552507
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘REST API Not Working For Events With Status Pending (or any other status)’ is closed to new replies.