jackbot
jackbot

Reputation: 3021

AWS API Gateway with dynamic URL path parameters

I've got an API with an integration to S3 to serve static files. My resource is quite simple in that I only require the filename to serve the file, like so:

/api/v1/{file}

However this requires the consumer to know the exact filename, i.e.

/api/v1/purple.json

I want to make this a little more dynamic. Since my files are all JSON, I want the consumer to not have to provide the .json suffix. Is this currently possible with the URL path parameters? I know I can use method.request.path.file to access the purple value, but can I append .json to it myself?

Upvotes: 1

Views: 2008

Answers (1)

Bob Kinney
Bob Kinney

Reputation: 9040

API Gateway does not currently allow for concatenation of values in parameter mapping. This is a feature other customers have requested and is on our backlog.

Upvotes: 3

Related Questions