Post Method

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:15:17 +0000.
Sender:Ijlal EL HAZITI.
Date:Thursday, 11 June 2015 14:49:10 UTC+1.

Hi team,
I need some clarifications about how to set endpoints (POST,PUT & DELETE). All I managed to do now is to set GET endpoints and print my records, but no insert/update or delete, always getting the error: {“error”: “Requested endpoint is forbiden”}.
I believe I have to have my endpoints in a whitelist but I don’t know how to do it.

Thank you
Regards

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 11 June 2015 15:10:52 UTC+1.

Do you need a white list?

White listing a single endpoint (e.g. GET widgets/{stuff}) will cause ALL other apths to be forbidden.

By default, tyk proxies EVERYTHING, so you don;t necessarily need a white list unless it’s a core requirement of your API

To add to a white list, simply add the GET, POST, PUT and Delete path combos to the API designer and ensure the “White list” checkbox is selected.

Are you using the dashboard or APi definition file?

Cheers,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Ijlal EL HAZITI.
Date:Thursday, 11 June 2015 15:29:52 UTC+1.

If I disable using whitelist IPs, here’s the error:

Imported Google Group message.
Sender:Ijlal EL HAZITI.
Date:Thursday, 11 June 2015 14:59:06 UTC+1.

*I’m using Tyk v1.6

Regards,

Imported Google Group message.
Sender:Ijlal EL HAZITI.
Date:Thursday, 11 June 2015 15:26:20 UTC+1.

Martin,
I’m using the dashboard.
I thought about the whitelist because of the error I get “Request endpoint is forbiden” and because, for the POST method, if I don’t check the radio “whitelist”, once I save , the “POST” becomes a “GET”.

please find attached screenshots of what I’ve done.

Thank you

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 11 June 2015 15:29:52 UTC+1.

If I disable using whitelist IPs, here’s the error:

Imported Google Group message.
Sender:Ijlal EL HAZITI.
Date:Thursday, 11 June 2015 15:42:55 UTC+1.

I removed my api and recreated it … all methods work just fine
thank you