[invalid] REST API v2: Getting 405 "METHOD_NOT_ALLOWED" on POST to convert-ids-to-types, but docs say this must work

I try to get the content type for a Confluence content ID using the v2 endpoint /convert/convert-ids-to-types.

But I get a 405 back, telling me POST is not allowed, despite the docs telling me to use POST. This is the error response from the API:

{“errors”:[{“status”:405,“code”:“METHOD_NOT_ALLOWED”,“title”:“org.springframework.web.HttpRequestMethodNotSupportedException: Request method ‘POST’ not supported”,“detail”:null}]}

Is there some magic sauce that I am missing when making the call?

In our app a POST to /api/v2/content/convert-ids-to-types works.

1 Like

Thanks for letting me know. Then I need to find the magic sauce that is missing on my machine and I’ll dig deeper. (Was hoping for a simple Oops on Atlassian’s side.)

Tried again and had a look in Fiddler - no luck for me :man_shrugging:

image


The URL is not quite correct. It should be /wiki/api/v2/content/convert-ids-to-types.

1 Like

Now that is embarrassing. You are right and my mental auto-correct did not catch that.

@klaussner Thanks for catching that. Blind I am.

1 Like