Welcome to the Panopto Community

Is there something wrong with my REST API requests?

Samuel ChanSamuel Chan Crackerjack

I have created a new API client for "Server Application". I am using Postman to test running the REST API with this API Client. I can see that it authenticates without problem, but when I test run some REST API endpoints, (with GET), they always return me with an empty result:

{    "Results": [] }

To list a few, here are some endpoints I have tested running:

  • /api/v1/users/me/sessions/viewed
  • /api/v1/folders/search?searchQuery=2 (Pretty sure out of so many folders we have, there must be lots of folders with names that consist of a '2' in it. )
  • /api/v1/folders/{id}/children (Using my own folder's GUID)
  • /api/v1/users/search?searchQuery=a (Pretty sure there are many users with an 'a' in their names)

I am not sure if there are settings I have missed.

Answers

  • Samuel ChanSamuel Chan Crackerjack

    Not sure if this is related to recent outage of service.

  • Hello Samuel,

    Did you retry and get the results you expected?

    - Aish

  • Samuel ChanSamuel Chan Crackerjack

    I did retry and I am still getting empty result array back.

  • Hi Samuel,

    Please make sure to have "Panopto" in your URL when testing with Postman such as…
    https://{base_server}/Panopto/api/v1/sessions/…

    I hope this helps.

    Thanks,

    Adis

  • Samuel ChanSamuel Chan Crackerjack

    Yes, I have already included that. If I leave out /Panopto, it will just return 403 Forbidden error. But currently I am getting a 200 OK status with empty results instead.

  • Samuel ChanSamuel Chan Crackerjack

    To make this sound more complicated… when I make a POST request to

    /api/v1/scheduledRecordings?resolveConflicts=false

    I am getting a 401 Unauthorised error, with response:

    {

        "Error": {

            "ErrorCode": "",

            "Message": "Not authorized",

            "Success": false,

            "ErrorSource": null

        }

    }

    I thought I have always been authorised as I did try to create schedules successfully via REST API before. I hope my access hasn't been downgraded… but still… I don't think me getting empty results has anything to do with my access.

  • Hi Samuel,

    If your permissions are downgraded you would get empty results since you would not have permissions to get the result.

    I hope this helps.

    Thanks,

    Adis

Sign In or Register to comment.