API Timestamp failing tests - SOLVED


I just started API project section but instead of JS I went with Python. I am seeing all test cases fail and I would really appreciate some feedback of what I am doing wrong.

link: https://micro-api-fcc.herokuapp.com/

Much appreciated!

Did you try this date format api call: https://micro-api-fcc.herokuapp.com/api/timestamp/2020-04-19 ? Without these ?

Also for second endpoint, you need to pass it a timestamp in previously said format.

Hey codename11,

Thanks a lot for replying but I didn’t get “without these” part.
Screenshot from 2020-04-19 01-35-51
Not sure If I’m seeing some wicked formatting or i just spent too much in-front of PC and I need a break :slight_smile:

] [ Square brackets. FCC editor does iffy stuff with them. And yes square brackets.

For anyone interested:

I managed to make it work by removing trailing ‘/’ from the url configuration:)

Just to make sure that someone else won’t have to spend hours trying to figure out why the test cases fail here’s what was wrong in my project:

My initial API endpoints required trailing ‘/’:
project/api/timestamp/2020-15-12/ <-- this last slash was causing test to fail and once i made it optional everything passed.

Final version: project/api/timestamp/2020-15-12