Api key in path

It is possible to configure endpoint with api-key in the path it self?
e.i.: /myapi/{api-key}/getsomething

Is it the right way using rewrites with loops, to rewrite to e.i. tyk://self/getsomething?api_key=$1 some how?

Nope, can’t do it this way. Maybe with some custom middle-ware?

If I understand you correctly, then yes. You should be able to use custom middle-ware to achieve a rewrite from an auth call to /myapi/{api-key}/

Is it the right way using rewrites with loops, to rewrite to e.i. tyk://self/getsomething?api_key=$1 some how?

You should also be able to use context variables. Something as simple as tyk://self/$tyk_context.token/getsomething should work when using url rewrite and looping.

Tyk expects apikey way before in the flow gets to the rewrite part.
I managed it with js plugin. I parsed apikey from path and put it into Authorization header.
This works for now.