SpinTheMic
Pro

Interview practice question

IDs exposed in public URLs

Backend Engineering · API Design · Experienced

Your API exposes auto-increment IDs like /invoices/1052. Security asks you to stop. Why, and what would you use instead?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Sequential IDs reveal volume and enable enumeration.
  • Use UUIDs or random public IDs.
  • Keep internal integer PK if needed.
  • Map public ID to internal ID.
  • Still enforce authorisation.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics