API issue POST/set/value/{variableValue} when the variableValue is itself a url

getting "HTTP 404 Not Found."

please advise

actually getting a <Response [500]> errror.

so I am looking for an escape character for / in the value of the POST {variableValue}

Thanks

I found that : can be replaced with %3A, so all I need is a replacement for /

thanks

was hoping %2F would work, but does not seem to be working

Hi @joe.626723128786​ ,

I was reading through your question, and I am not sure I am following. Are you trying to use API Profile or API Extract Profile to make a POST to a URL that you are passing in a variable somewhere that requires the use of a forward slash(/)?

If so, which are you using API Profile or API Extract Profile? The other question would be, have you been able to successfully call this API using something like Curl? If so, could you post what that curl statement looked like? This extra info might help us give you a better answer.

Are you trying to use API Profile or API Extract Profile to make a POST to a URL that you are passing in a variable somewhere that requires the use of a forward slash(/)? YES

I can duplicate the same error using POSTMAN. The code itself is in Python using the requests library.

POST/set/value/{variableValue}http://<InstanceAddress>/rest/v1/group/name/<groupname>/project/name/<projectName>/environment/name/<environmentName>/variable/name/<variableName>/set/value/<variableValue>Set new value for current Environment Variable.

The code works fine when <variableValue> does not contain a /

: can be replaced with %3A and works fine

I dont understand why  %2F does not work for /

Just taking a guess here... I am guessing you have already tried urlencoding the variableValue before passing it in? Meaning the value has the %2F within the value?

 

The only other debugging approach that I can think of is to turn on debug on the API Query component run it and then look at the server logs. It should output the full URL it's sending. This will give you an indication of what being called from a URL perspective. You can then print the URL from the Python script and compare them. From there it may give you and idea of what needs to be changed/adjusted. Hopefully this helps or sparks an idea.