Method arguments problem when using variables in REST route

I am totally baffled by a recent problem I have not seen before.

This is my API method:

I have one parameter, and route using one variable (userId). When running this, without any code added yet, just adding values to the parameters, it fails like this:

If I remove the path variable (userId), it works. If I change the string variable to an object, it executes, but the object is always null for some reason (this is how I discovered this being a problem).


It shoud go without saying that I want to keep using REST route variables, so this is not going to be an option.

What am I doing wrong here or not understanding? Please advice :slight_smile:

Hello, @Egil_Helland

Here is the video, which should help you How to create a Codeless API service…

Also, you can view this documentation Creating API Service

If this does not help, please let us know.

Regards.
Serhiy

Hi Egil,

I was able to reproduce the problem. I am not sure what it would take to get this fixed. For now, I recommend using method arguments outside of the REST routes.

Regards,
Mark

Thanks @mark-piller, I’ll do that in the meantime!