405 error when replacing hardcode with variable

I am trying to use postman to delete recordings in WebEx. If I hard code the video ID it all works fine. If I use a parameter I get a 405 error.

Method is “Delete”
This works - https://webexapis.com/v1/admin/recordings/d874be549e8949548e0e0eacd61e6015
this does not - https://webexapis.com/v1/admin/recordings?recordingId=d874be549e8949548e0e0eacd61e6015

Any help will be appreciated

Hi @ekuligowski. Welcome to the Postman Community :postman:.

Can you share a screenshot of how you add the parameters as variables and what errors you get?

Additionally, can you open the console and share me a screenshot of the request headers that were logged?

Thx for the help here is the screen shot

Thanks for sharing @ekuligowski. The value for the recordingId is not set.

You’ve mistakenly set the value on the next line.

Also, it appears that you can’t use a DELETE request method to perform this operation according to the error message.

Thats an oops when i ran it i had the value in the correct place. The DELETE method works if you put the value in the url instead of the variable so I know I can use the DELETE method


You have two completely different requests here.

The working request is using a full path, and the failing one is using query parameters.

It’s unusual for an API to mix the two types (but not unheard of).

The API is literally telling you that you can’t use DELETE on this resource. This isn’t really a Postman thing, but an API specific issue.

Can you please share a link to the documentation which shows that you can use query parameters?

Your screenshot is also showing unsaved changes!

Why is it important to use query parameters if the other way works?

Not using the variable was just to verify the syntax was correct and that I could send a DELETE. I need the variable because I have a couple hundred deletes to do. I have found away to do what I need using 2 POST commands, however still would like to know how adding the variable breaks it.

Thx for the help

You can still use a variable.

You can just add it to the URL.

 https://webexapis.com/v1/admin/recordings/{{myVar}} 
 or
 https://webexapis.com/v1/admin/recordings/{{recordingID}}

I can’t tell why it breaks it without seeing the API documentation, but it sounds like the API doesn’t support query parameters for that method.